Route Groups

Route groups allow you to organize routes without adding the grouping folder to the URL. A folder such as (marketing) can group marketing pages while keeping the URLs clean.

This becomes valuable when different sections require different layouts. For example, (auth) can contain login and registration pages, while (dashboard) can contain authenticated application pages.

Route Group Structure
app/
  (marketing)/
    page.tsx
    pricing/
      page.tsx
  (auth)/
    login/
      page.tsx
    register/
      page.tsx
💡 The parentheses indicate organizational route groups. They do not become part of the public URL.
Key Takeaways
  • Route groups organize related routes without changing their URL.
  • They are useful for applying different layouts to different application areas.
  • Grouping is especially useful in large applications.