Skip to content

Discoverability · Next.js (App Router)

Why is my site not appearing in Google — noindex in Next.js (App Router)

A noindex directive tells search engines to exclude the page outright. No amount of content or backlinks produces traffic until it is removed, and it is the most common thing to survive a staging-to-production move.

The fix for Next.js (App Router)

13x detects your framework from the response and hands you this version rather than the generic one — below 50% confidence it hedges and gives you the generic one instead.

In the App Router, metadata belongs in a metadata export or generateMetadata. Setting it with <head> tags inside a component works by accident and breaks streaming.

Look for a robots key in a metadata export, and for a guard that fires in production by mistake:

ts code
// app/layout.tsx — the bug
export const metadata: Metadata = {
  robots: { index: false, follow: false }, // remove, or gate correctly
};

// The correct gate: only non-production deployments are hidden
export const metadata: Metadata = {
  robots:
    process.env.VERCEL_ENV === "production"
      ? { index: true, follow: true }
      : { index: false, follow: false },
};

Also check next.config.ts for a headers() entry adding X-Robots-Tag.

On a different stack? The general version of this fix explains what 13x checks and why it matters, without assuming a framework.

Check your Next.js (App Router) site

113 deterministic checks against your live URL, in about 30 seconds. Framework detected from the response, so every fix comes back in the form your stack actually uses.

No signup. Results in 30 seconds.

The same fix, other stacks