All posts
Web design & development

Next.js SEO Checklist: Metadata, Sitemaps, Rendering and Schema

A Next.js SEO checklist for the App Router: generateMetadata, canonicals, sitemap.ts, robots.ts, JSON-LD, rendering and redirects, in launch order.

By Mehdi Hassan7 min read

The short answer

Next.js SEO comes down to five App Router jobs: render content on the server, generate titles, descriptions and canonicals with the Metadata API, publish sitemap.ts and robots.ts, add JSON-LD in the page HTML, and handle redirects and 404s with real status codes. Get those right and the framework stops being an SEO risk.

Key takeaways

  • Content must be in the server-rendered HTML; client-only content is invisible to many crawlers.
  • Set metadataBase once, then use generateMetadata for per-page titles, descriptions and canonicals.
  • Generate sitemap.ts and robots.ts from the same data that builds your routes, so they never drift.
  • Render JSON-LD in a script tag on the page, but don't expect schema alone to win AI citations.
  • Use notFound() and permanent redirects so missing and moved pages return the right status codes.

Part of Next.js for Marketing Websites: When It's the Right Choice

What does a Next.js site need for good SEO?

A Next.js site needs server-rendered content, complete metadata from the Metadata API, a generated sitemap and robots file, structured data in the HTML, and correct status codes for redirects and missing pages. The App Router has a built-in convention for each of these, so good Next.js SEO is mostly a matter of using them consistently.

This checklist is part of our guide to Next.js for marketing websites. It's written for the App Router in 2026 and ordered the way we work through a launch. Each item says what to set and the mistake we see most often.

Area

App Router tool

Common mistake

Rendering

Server Components, generateStaticParams

Key content fetched in the browser after load

Titles and descriptions

metadata, generateMetadata, title.template

Same title on every page

Canonicals

alternates.canonical with metadataBase

Relative or missing canonicals, or all pointing home

Sitemap

sitemap.ts, generateSitemaps for large sites

Hand-written file missing new pages

Robots

robots.ts

Staging rules shipped to production

Structured data

JSON-LD script tag in the page

Schema describing content not on the page

Social previews

openGraph fields, opengraph-image files

No image, or one generic image everywhere

Status codes

notFound(), permanentRedirect(), redirects config

Missing pages returning 200 with an empty template

Which rendering setup is best for Next.js SEO?

Static rendering is best for Next.js SEO on marketing pages: content is in the HTML at build time, served instantly from a cache, and readable by every crawler. Server rendering is fine when a page needs request-time data. Client-only rendering for primary content is the one setup to avoid.

Our research found that many AI crawlers don't run JavaScript, so anything assembled in the browser may never be seen by them. In practice, keep pages as Server Components, prerender CMS pages with generateStaticParams, and use on-demand revalidation when editors publish. Interactive widgets can still be client components, as long as the text that matters is rendered on the server. Our guide to static vs server rendering in Next.js covers each page type.

What is the Next.js SEO checklist for launch?

Work through this Next.js SEO checklist in order before launch, because later items depend on earlier ones. Canonicals need metadataBase, the sitemap needs final routes, and structured data needs final content.

  1. Set metadataBase and a title template

    In the root layout, set metadataBase to your production URL so all metadata URLs resolve as absolute, and a title template such as "%s | Brand" so page titles stay consistent.

  2. Write generateMetadata for every dynamic route

    Pull the title, description and Open Graph fields from the CMS for each page. Give editors dedicated SEO fields with sensible fallbacks, not just the page heading.

  3. Add self-referencing canonicals

    Return alternates.canonical as the page's own clean URL, without tracking parameters. For multilingual sites, add alternates.languages for hreflang.

  4. Generate sitemap.ts

    Build the sitemap from the same CMS queries that generate routes, with lastModified dates. Split very large sites with generateSitemaps.

  5. Generate robots.ts

    Allow the crawlers you want, including AI search crawlers if you want to be cited, point to the sitemap, and make sure the production file differs from staging.

  6. Add JSON-LD

    Render Organization, Article or Product data as a script tag of type application/ld+json inside the page component, built from the same data shown on the page.

  7. Fix status codes

    Call notFound() for missing slugs, use permanentRedirect() or the redirects config for moved pages, and check the custom 404 returns a real 404.

  8. Verify in the rendered HTML

    View source on production for a few page types and confirm the title, canonical, robots meta, structured data and content are all present without JavaScript.

How should you handle Next.js metadata API details?

Handle the Next.js Metadata API by defining defaults once in the root layout and overriding them per page with generateMetadata. Metadata is merged from layouts down to pages, so shared settings live at the top and page-specific fields at the bottom.

  • Titles. Keep them specific per page; the template adds the brand. Avoid duplicating the brand inside each page title.
  • Descriptions. Write one per page in the CMS. Fall back to a page summary field, never to the same site-wide sentence.
  • Open Graph and social images. Use an opengraph-image file per route segment, or generate images from page data, so shared links show the right title.
  • Robots per page. Set robots: noindex on thank-you pages, internal search results and thin utility pages rather than blocking them in robots.txt.
  • Data fetching. Fetch requests in generateMetadata and the page are deduplicated, so you don't pay twice for the same CMS query.

How do you set up a Next.js sitemap and structured data?

Set up the Next.js sitemap by exporting a function from app/sitemap.ts that returns every indexable URL with its last-modified date, built from the same source as your routes. Set up structured data by rendering JSON-LD in each page from the page's own data.

Exclude noindex pages, redirects and paginated duplicates from the sitemap, and include localized alternates if you run several languages. Our guide to Next.js i18n shows the multilingual version. For large generated sections, such as integrations or templates, our guide to programmatic SEO with Next.js covers splitting sitemaps and avoiding thin pages.

For structured data, use the types defined at schema.org that match what's actually on the page: Organization on the home page, Article with an author on posts, BreadcrumbList on deep pages, FAQPage where a visible FAQ exists. Keep expectations realistic. Ahrefs' controlled test found no significant AI citation lift from adding schema, and Google says no special markup is needed for its AI features. Schema is hygiene for rich results and parsing, not a ranking shortcut.

Hypothetical example: auditing a Next.js site that isn't ranking

For example, suppose a startup's Next.js site has been live for months and almost none of its feature pages appear in search.

Viewing source shows the cause quickly. Each feature page fetches its content in a client component after load, so the server HTML contains only a header, a footer and a loading skeleton. Every page also shares the same title and description from the root layout, and the canonical on every page points to the home page because it was hard-coded.

The fixes are all standard App Router conventions: move the content fetch into the Server Component and prerender with generateStaticParams, add generateMetadata reading SEO fields from the CMS, and return a self-referencing canonical per page. None of this required a new framework; it required using the one they had as designed.

How does performance affect Next.js SEO?

Performance affects Next.js SEO through Core Web Vitals and through the plain fact that slow pages lose visitors before they read anything. Next.js gives you good tools, but sites still fail, most often on Interaction to Next Paint.

Core Web Vitals field data for Q2 2026 in our research shows only about two-thirds of Next.js sites pass INP, with a median around 236ms. The usual causes are heavy hydration, large client components and third-party scripts. Our guide to improving INP on Next.js sites covers the fixes, and our explainer on next/image, fonts and scripts covers images, fonts and script loading. To see how Next.js compares with other platforms, read our Core Web Vitals guide for Framer, Webflow and Next.js.

Frequently asked questions

Is Next.js good for SEO?
Yes, when it's used as intended. Next.js can prerender every page as static HTML, generate metadata and sitemaps from your content, and return correct status codes, which covers the technical basics search engines need. Problems come from implementation choices, such as fetching key content in the browser or copying one title across every page, not from the framework itself.
Do I still need an SEO plugin with Next.js?
No. Unlike WordPress, Next.js has no plugin layer for SEO; the Metadata API, sitemap.ts, robots.ts and JSON-LD in your components do the same jobs. What you need instead is a CMS with SEO fields for editors and a developer who wires them into generateMetadata and the sitemap correctly.
How do I handle redirects in a Next.js marketing site?
For a known list of moved URLs, use the redirects option in next.config with permanent set to true. For redirects that editors manage, store them in the CMS and apply them in middleware or at build time. Inside a page, permanentRedirect() sends a permanent redirect. Avoid redirect chains, and update internal links to the final URLs.
Does the Pages Router or App Router matter for SEO?
Both can produce SEO-friendly sites. The App Router has more built-in conventions, such as generateMetadata, sitemap.ts, robots.ts and file-based Open Graph images, and renders Server Components by default, which makes the right setup easier. New marketing sites in 2026 should use the App Router; existing Pages Router sites don't need migrating for SEO alone.
How do I check what Google sees on my Next.js site?
Use the URL Inspection tool in Google Search Console to view the crawled and rendered HTML for a page. Also view source on the live page in your browser with JavaScript disabled. If the main content, title, canonical and structured data aren't in the source, the page depends on client-side rendering and needs fixing.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Website, $8,000.

A multi-page marketing site, designed by us, developed in Next.js and animated. $8,000, one-time, up to 6 pages. Book a free 30-minute call to see if it fits.

Schedule Call