Keep /blog as page one, put later batches of published posts at /blog/page/2, /blog/page/3, and so on, and link each batch to its posts and neighboring archive pages. The essential handoff is one published-post query, one stable sort order, one page size, and a shared renderer for every page. Then check the deployed links all the way to an older article—not just whether its direct URL works.
Start with the posts readers can actually open
Find the loader or query that supplies your existing published article pages. Use it for the archive too, rather than maintaining a second array of slugs. Map its fields to a title, article URL, publication status, publication date, and stable unique identifier. Include only posts that meet your site’s public-publishing rule; exclude drafts and scheduled posts that are not yet public. If your publishing process requires deployment before an article becomes accessible, make sure the archive and article route update together.
Choose a page size—for example, five—and sort the selected posts newest first by publication date, breaking equal-date ties with the unique identifier. Apply the same selection and ordering to both the post count and the page slice. For page number n, calculate the starting offset as (n - 1) * pageSize, then take pageSize posts. Calculate the last page as Math.max(1, Math.ceil(publishedPosts.length / pageSize)); page one can show an empty-state message when there are no posts. A tie-breaker prevents equal-date posts from swapping positions between renders.
Give each archive batch a route and real links
Have app/blog/page.tsx render batch one and app/blog/page/[page]/page.tsx render later batches through the same archive function. Next.js defines a folder in square brackets as a dynamic route segment and passes its value to the page through params; in the documented server-page API, await params before reading page. Keep this route distinct from your article route: /blog/page/2 must not be mistaken for a post whose slug is page.
In the dynamic page, validate the raw segment before slicing: accept only decimal digits in canonical form, convert with Number(rawPage), and require Number.isSafeInteger(page), page >= 2, and page <= lastPage. Reject /blog/page/1, /blog/page/0, /blog/page/2x, and pages beyond the current count with notFound(). Next.js documents that notFound() terminates rendering of the route segment and renders its not-found UI. Recalculate the last page from the published-post source used to render that page, so an empty out-of-range batch is not presented as a valid archive.
Share a URL helper that returns /blog for page one and /blog/page/${n} for every later page. Render each post title as a link to its existing article URL. In a navigation region, render a Previous link when page > 1 and a Next link when page < lastPage; page two’s Previous link must point to /blog, not /blog/page/1. You can also show numbered links, but the neighboring links alone give a path through every batch. Use Next.js Link with an href: it renders an HTML anchor, so the destination exists in the page’s links rather than only behind a click handler.
If you prerender page numbers with generateStaticParams, plan how newly added posts and newly needed archive pages will become available. Next.js runs that function during the build, not again during ISR revalidation. Depending on your site’s route and caching configuration, that may mean rebuilding or explicitly supporting new dynamic paths; test the behavior rather than assuming a new page number appears when an article is published.
Ship the routes, then follow an older post
Consider a fictional blog with 13 published posts, sorted newest first, and a page size of five. /blog contains posts 1–5; /blog/page/2 contains posts 6–10; /blog/page/3 contains posts 11–13. In this fictional example, page three links “Choosing a Trial Length” to /blog/choosing-a-trial-length, “Writing a Welcome Email” to /blog/writing-a-welcome-email, and “Planning a Launch Checklist” to /blog/planning-a-launch-checklist; the last is post 13, the oldest. Before release, check that all three routes use the same post source, page three links to the three oldest article URLs, and pages one and two link forward. Publish the archive destinations and their inbound links together. If your release cannot do that atomically, make the later archive destinations available before linking to them.
After deployment, open /blog on the public site, follow Next to /blog/page/2, follow Next again to /blog/page/3, and, for the fictional example, follow “Planning a Launch Checklist” to /blog/planning-a-launch-checklist. Also load pages two and three directly in a fresh tab and check that each displays its expected batch without prior navigation. Finally, try an out-of-range page such as /blog/page/4: with 13 posts at five per page, it should not display an empty valid archive. Record the public archive URLs and the older article URL so a failed check identifies the exact route to fix.
Ranks documents automatic article setup and publishing for Next.js App Router sites using TypeScript, but your site owns this archive pagination and its public-link checks. A generated draft is not a deployed article. For the broader decision about archive navigation and a site-wide reachability audit, use the older-post discoverability guide; this implementation check is specifically about whether your page-number routes expose the published posts they should.



