No unintended noindex tags or X-Robots-Tag headers on indexable pages
Why it matters
A stray robots: { index: false } in app/layout.tsx or a middleware-injected X-Robots-Tag: noindex header can deindex the entire site overnight without any code deploying fresh errors — the most common cause is a staging-guard that was never environment-gated. Once pages drop from the index, recovery takes weeks even after the tag is removed, and organic revenue vanishes during the wait.
Severity rationale
Medium because unintended noindex can deindex the site but is detectable and reversible within a recrawl cycle.
Remediation
Gate every noindex directive on process.env.VERCEL_ENV !== 'production' and keep the guard co-located with the directive. In app/layout.tsx:
export const metadata = {
robots: process.env.VERCEL_ENV === 'production' ? undefined : { index: false, follow: false }
}
Add a CI check that greps for unguarded noindex strings before merge.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Advanced SEO Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from seo-advanced·automated