You publish a P1 page at /about, and your Next.js app already has an /about route. Which one does a visitor see? This page explains how P1 and Next.js divide a site's URLs, so you can predict the answer and decide where each URL should live. In short, routes claimed by code in Next.js' app router will win in a conflict with paths claimed by pages in P1.
![Flowchart of how a request reaches a P1 page. P1 middleware applies any P1 redirect set for the path. Next.js then picks the most specific route, and a fixed or dynamic route you wrote renders ahead of P1. Otherwise the catch-all route asks P1 for a page at the exact path, then for a matching template path. The starter's optional catch-all also serves /, and a site that keeps its own app/page.tsx uses app/[...puckPath] instead.](https://media.p1.pantheon.io/image/a3723de1-7087-4409-bb5a-15385f0874d2/assets/bd9004a8-08af-424c-84fd-5d365ac8bf50/f1a1a999-74fb-4699-aef1-6ddf73d224cf-routing-request-flow.png?format=auto&quality=85&width=1760)
This page uses route for a Next.js route (a folder under app/ that contains a page or route file) and path for the URL path of a P1 page. On this page, a template path is a path with a colon segment (a segment that is a colon followed by a parameter name; the naming rule is below), such as /company/leadership/:name. The document at a template path lays out each page whose URL matches it and that has no page of its own. A template path isn't a page template; a page template is a reusable layout. See Page templates and content types for page templates.
P1 doesn't add a Next.js route for each page. P1 stores pages in its content repository, not in your code repository, so creating a page adds no file to your codebase. The starter kit serves them, and the home page at /, from one optional catch-all Next.js route, app/[[...puckPath]]. See step 2 of the install guide.
A catch-all route receives only the requests that no more specific route claims. The starter's catch-all turns the URL segments into a path and calls P1's getPage for that path. If P1 returns nothing, the starter shows a screen with links to the editor. Editing requires signing in to P1.
On a site with locales, each URL serves the page at that path in that page's own locale. P1 adds no locale prefix to the path and removes none.
In the App Router, Next.js ranks routes by specificity: a fixed path such as /about first, then a dynamic segment such as [name], then a catch-all.
For the catch-all syntax, see Next.js dynamic routes.
Inside the catch-all, P1 looks for a page at the exact path. If it finds none, it tries the template paths. A page always wins over a template path. See Site structure.
For example, take a P1 template path /company/leadership/:name and a page at /company/leadership/josh. A request for /company/leadership/josh gets the page. A request for /company/leadership/jane has no page of its own, so the template path handles it.
A template path matches a URL path when the two have the same number of segments and every segment that isn't a colon segment matches exactly. A colon segment matches one segment, so /company/leadership/:name matches /company/leadership/jane but not /company/leadership/jane/bio.

The catch-all is code in your app, so you choose what it checks and in what order.
To add routes that P1 doesn't render, see Page rendering.
This page uses route for a Next.js route (a folder under app/ that contains a page or route file) and path for the URL path of a P1 page. On this page, a template path is a path with a colon segment (a segment that is a colon followed by a parameter name; the naming rule is below), such as /company/leadership/:name. The document at a template path lays out each page whose URL matches it and that has no page of its own. A template path isn't a page template; a page template is a reusable layout. See Page templates and content types for page templates.
P1 doesn't add a Next.js route for each page. P1 stores pages in its content repository, not in your code repository, so creating a page adds no file to your codebase. The starter kit serves them, and the home page at /, from one optional catch-all Next.js route, app/[[...puckPath]]. See step 2 of the install guide.