Next.js uses the file system for routing. A file at app/about/page.tsx is shown at /about.
// app/about/page.tsx
export default function AboutPage() {
return <h1>About us</h1>;
}Linking pages
Use the Link component from next/link for navigation inside your site. It loads pages without a full refresh.
import Link from "next/link";
<Link href="/about">About</Link>Code examples
app/page.tsx -> /
app/about/page.tsx -> /about
app/blog/page.tsx -> /blogCommon mistakes
Common mistake: Naming the file index.tsx
In the App Router a route's file must be called page.tsx.