Creating Pages and Routes

Add new pages by creating folders — each folder with a page.js becomes a real URL, so /about and /contact appear just by making files.

Step 1 of 3

A folder plus a page.js makes a URL

This is the payoff of file-system routing: to add a new page, you make a folder inside app/ and put a page.js in it. The folder's name becomes the URL.

  • app/about/page.js/about
  • app/contact/page.js/contact
  • app/blog/page.js/blog

No route table, no config, no registration step — the file's location is the route. Nest folders to nest paths: app/blog/news/page.js becomes /blog/news. This is exactly how big sites organize hundreds of pages.

Think of it this way: Think of app/ as a filing cabinet. Each folder is a labeled drawer, and the page.js inside is the actual document people can pull out. Want a new section of the site? Add a new drawer.
Web Standard — only page.js is public

Just creating a folder doesn't make a URL — the folder needs a page.js to be reachable. You can keep helper files and components in route folders without exposing them; only page.js (and a few other special files) become routes.