Skip to main content

What it flags

In a Next.js project, the App Router root layout (app/layout.tsx) exports metadata whose robots is a literal { index: false } or a string with a noindex or none directive (each comma-separated directive is compared whole, so max-image-preview:none does not count), or the root layout, pages/_app or pages/_document renders <meta name="robots"> (or googlebot) with such content outside any condition. Every route then tells search engines not to index it, which usually means a staging setting reached production. A robots value behind a ternary, && or if, or a metadata object chosen at runtime, is left alone. The finding appears with --include-contextual, because private and internal apps noindex on purpose.

How to review or fix

Confirm whether the deployment is meant to appear in search. If it is, set noindex only outside production, for example robots: process.env.VERCEL_ENV === 'production' ? undefined : { index: false }, or move it to the layouts of the routes that must stay hidden. See the Next.js robots metadata reference.