GuidesApril 11, 20268 min read

How to Add SEO to a Next.js App: The Complete 2026 Checklist

The exact checklist for production-grade SEO on a Next.js App Router site. Metadata, JSON-LD, sitemap, robots, canonicals, OG images, Core Web Vitals — in order.

Next.js gives you the APIs. This guide tells you which ones to use, in what order, and what to check before calling it done. Organized as a checklist — work through it top to bottom.

Foundation (do first)

  1. Set metadataBase in app/layout.tsx. Every OG image, canonical, and sitemap URL resolves against this. Without it, paths are relative and social previews break.
  2. Add generateMetadata to every public page. Title (55–60 chars), description (150–160 chars), alternates.canonical pointing to itself.
  3. Set the title template: { default: "Site", template: "%s | Site" }. Use title.absolute on the homepage to avoid double-branding.
  4. Create sitemap.ts with all public routes. Tier priorities: homepage 1.0, money pages 0.8–0.9, blog 0.6–0.7. Use real lastModified dates, not new Date().
  5. Create robots.ts. Disallow /api/, /dashboard, /editor/, auth routes. Point to sitemap.

Structured data

  1. Organization JSON-LD in root layout (once, globally).
  2. BreadcrumbList on every non-homepage page.
  3. FAQPage on any page with a visible FAQ accordion.
  4. BlogPosting on blog posts with datePublished, dateModified, author.
  5. Product + Offer on pricing pages with real prices.

Open Graph images

  1. Create opengraph-image.tsx in the app root. Use ImageResponse with edge runtime. 1200×630px.
  2. Per-route OG images for money pages. Each route folder can have its own opengraph-image.tsx.
  3. Test with the Facebook Debugger and Twitter Card Validator.

Core Web Vitals

  1. Font display: swap on all Google Fonts.
  2. images.formats: ["image/avif", "image/webp"] in next.config.
  3. Above-fold images get priority. Below-fold get loading="lazy".
  4. DNS prefetch for external image domains.
  5. Third-party scripts use strategy="lazyOnload".

Security headers (trust signals)

  1. HSTS with includeSubDomains; preload.
  2. X-Content-Type-Options: nosniff
  3. X-Frame-Options: SAMEORIGIN
  4. Referrer-Policy: strict-origin-when-cross-origin
  5. X-Robots-Tag: noindex on preview/non-canonical hosts.

Internal linking

  1. Header nav links to all money pages.
  2. Footer links to all public pages + legal pages.
  3. Every page has ≥3 inbound internal links.
  4. Blog posts cross-link to related posts.
  5. No href="#" placeholder links anywhere.

Final verification

Before submitting to Google Search Console:

  • Every page has a unique title and description.
  • Every page has exactly one <h1>.
  • Sitemap returns 200 and valid XML.
  • No noindex'd pages appear in the sitemap.
  • Rich Results Test passes for all schema types.
  • PageSpeed Insights scores green on all three Core Web Vitals.

Frequently asked questions

Does Next.js handle SEO automatically?

Partially. Next.js provides the APIs (generateMetadata, sitemap.ts, robots.ts), but you have to use them correctly. A default Next.js app has no meta descriptions, no structured data, and no sitemap until you add them.

What's the minimum SEO setup for a Next.js site?

metadataBase in root layout, generateMetadata on every page, sitemap.ts with all public routes, robots.ts disallowing private routes, and alternates.canonical on every page. That's the floor — takes 20 minutes.

Is SSR required for SEO?

No. Google renders JavaScript well in 2026. But SSR is faster for first contentful paint, which improves Core Web Vitals, which is a ranking signal. SSR also ensures the HTML contains the content when Googlebot fetches it — no waiting for client rendering.

Ready to build?

Turn your next idea into a production-ready app in minutes.

Keep reading