How to fix noindex detected on Next.js (Headless)

Remove or replace the noindex directive on any page you want to appear in Google search results.

Steps for Next.js (Headless)

  1. Audit every route for `noindex` signals: search the entire project for the strings `noindex`, `robots`, and `X-Robots-Tag` across all files in `app/` or `pages/`, `next.config.js`, middleware, and any HTTP-header configuration.
  2. For App Router routes (`app/`): open the relevant `page.tsx` (or `layout.tsx`) and remove or replace the `noindex` value in the `robots` field of the exported `metadata` object / `generateMetadata()` return value. Set `index: true, follow: true` instead.
  3. For Pages Router routes (`pages/`): open the relevant page file and remove the `<meta name='robots' content='noindex' />` (or any variant) tag inside the `<Head>` component imported from `next/head`.
  4. Check `next.config.js` for custom `headers()` that set `X-Robots-Tag: noindex` and delete or change those entries to `X-Robots-Tag: index, follow` for the affected paths.
  5. Check any middleware (`middleware.ts`) that injects `X-Robots-Tag` response headers and remove the `noindex` value for the affected routes.
  6. Deploy and verify with Google's Rich Results Test or a `curl -I` on the live URL that no `X-Robots-Tag: noindex` header and no `<meta name='robots' content='noindex'>` tag is present.
Official Next.js (Headless) documentation ↗

What is noindex detected?

A "noindex" directive is an instruction you send to search engines telling them: "Do not include this page in your index." It can appear as a robots meta tag in a page's HTML (e.g., `<meta name="robots" content="noindex,nofollow">`) or as an HTTP response header. When Google sees noindex, it respects it completely — the page will never show up in search results, no matter how many links point to it or how great its content is. This setting is intentional and useful for things like order-confirmation pages, staff-only pages, or duplicate staging content — but it is catastrophic if it appears on pages you actually want customers to find through Google.

Any page carrying a noindex directive is completely invisible to search engines — it cannot rank, it cannot drive organic traffic, and it cannot generate revenue from search. A single misconfigured template setting can silently remove your entire product catalogue, blog, or homepage from Google overnight. Because noindex takes effect as soon as Google re-crawls the page, you may not notice the traffic drop until days or weeks later, by which point significant revenue has already been lost. Fixing it promptly restores your pages to the index and allows your existing SEO authority to start driving clicks again.

See the complete Noindex detected 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 noindex detected and every other issue across your whole site.

Scan my site free

Fix noindex detected on another platform