What is the Pages Router in Next.js?
The Pages Router is the original Next.js routing system, where each file in pages/ becomes a route and data is loaded with getStaticProps, getServerSideProps and getStaticPaths. It is still supported in Next.js 16, but new features land in the App Router.
How it works
pages/index.tsxmaps to/,pages/about.tsxto/about,pages/blog/[slug].tsxto/blog/:slug.pages/_app.tsxwraps every page (global CSS, providers, persistent layout).pages/_document.tsxcustomizes the<html>and<body>markup.pages/api/*defines API routes with a Node-style(req, res)handler.
Data fetching
getStaticPropsruns at build time (SSG), optionally withrevalidatefor ISR.getServerSidePropsruns on every request (SSR).getStaticPathslists which dynamic paths to prerender.- Components on the client use
useRouterfromnext/router.
Why the App Router replaced it as the default
Every page in the Pages Router is a Client Component that hydrates fully, so all page code ships to the browser. Layouts are not nested natively, data fetching is page-level only, and there is no streaming per component. The App Router adds Server Components, nested layouts, streaming and the Cache Components model.
Status today
The Pages Router is maintained, receives bug and security fixes, and works with Turbopack. Both routers can live in the same project, which allows incremental migration: routes in app/ take precedence when both define the same path. AMP support and next lint, which some older Pages Router projects relied on, were removed in Next.js 16.
Code example
1// pages/blog/[slug].tsx - classic Pages Router page2import type { GetStaticPaths, GetStaticProps, InferGetStaticPropsType } from "next";34type Post = { slug: string; title: string; body: string };56export const getStaticPaths: GetStaticPaths = async () => {7 const posts: Post[] = await fetch("https://cms.example.com/posts").then((r) => r.json());8 return {9 paths: posts.map((p) => ({ params: { slug: p.slug } })),10 fallback: "blocking", // render unknown slugs on first request11 };12};1314export const getStaticProps: GetStaticProps<{ post: Post }> = async ({ params }) => {15 const res = await fetch(`https://cms.example.com/posts/${params!.slug}`);16 if (!res.ok) return { notFound: true };17 return { props: { post: await res.json() }, revalidate: 60 }; // ISR18};1920export default function BlogPost({ post }: InferGetStaticPropsType<typeof getStaticProps>) {21 return (22 <article>23 <h1>{post.title}</h1>24 <p>{post.body}</p>25 </article>26 );27}
Practice this question
Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the Next.js set.