How to fix catalog coverage on Next.js (Headless)

Audit your XML sitemap and internal linking so that every product and category page is discoverable and crawlable by Google — not hidden behind JavaScript, pagination, or missing links.

Steps for Next.js (Headless)

  1. Create `app/sitemap.ts` (App Router) to dynamically fetch every product and category slug from your commerce API and return a fully-typed `MetadataRoute.Sitemap` array — this file is automatically served at `/sitemap.xml` by Next.js with no extra configuration.
  2. Create `app/robots.ts` (App Router) to emit a `robots.txt` that explicitly allows all crawlers and points to your sitemap URL, overriding any accidental `Disallow: /` rules that may have been set in a static `public/robots.txt`.
  3. Audit `generateMetadata` (or `next/head`) in `app/products/[slug]/page.tsx` and `app/categories/[slug]/page.tsx` — ensure NO page sets `robots: 'noindex'` or `X-Robots-Tag: noindex` unless intentional (e.g. draft/out-of-stock pages that should remain hidden).
  4. Replace any JavaScript-only navigation (e.g. `router.push()` triggered by a `<div onClick>`) with real `<Link href='...'>` components from `next/link` so crawlers can follow internal links without executing JS event handlers.
  5. Verify `next.config.js` contains no `headers()` rule that adds `X-Robots-Tag: noindex` to product/category routes, and that no middleware (`middleware.ts`) redirects or blocks crawlers by user-agent.
  6. After deploying, submit the sitemap URL (`https://your-domain.com/sitemap.xml`) to Google Search Console and use the URL Inspection tool to confirm key product and category pages return HTTP 200 with `robots: index, follow`.
Official Next.js (Headless) documentation ↗

What is catalog coverage?

Search engines like Google discover your pages by following links and reading your XML sitemap. "Catalog coverage" refers to how many of your actual product and category pages a crawler can find and index. If a crawler visits your site and finds far fewer product or category pages than you actually have — for example, 95 products when you sell 500 — it means the missing pages are invisible to Google. Pages that Google cannot find cannot rank, which means shoppers searching for those products will never see your store.

Every product page that Google cannot crawl is a page that earns zero organic traffic and zero revenue from search. Poor catalog coverage is one of the most common and costly SEO problems for ecommerce stores: your products simply do not exist in search results. Beyond lost traffic, thin category structures cause Google to misunderstand your site's depth and topical authority, which can suppress rankings across your entire catalog. Fixing coverage means more pages indexed, more long-tail product searches captured, and a direct increase in organic revenue with no ongoing ad spend.

See the complete Catalog coverage guide for every platform and the full background.

Not sure if your Next.js (Headless) store has this?

Run a free SEOLZ scan — we’ll find catalog coverage and every other issue across your whole site.

Scan my site free

Fix catalog coverage on another platform