robots.txt exists and is properly configured
Why it matters
A missing robots.txt means crawlers operate without guidance: Googlebot and other search engines will crawl everything by default, including staging pages, admin routes, or duplicate parameter URLs that dilute crawl budget and can create duplicate-content penalties. A misconfigured Disallow: / blocks all crawlers from indexing the entire site, which causes complete de-indexing — the site disappears from search results within days. RFC 9309 formalizes the robots.txt protocol; non-compliance means crawler behavior is undefined across different search engines.
Severity rationale
High because a missing robots.txt wastes crawl budget on non-canonical URLs, and a `Disallow: /` misconfiguration causes complete search engine de-indexing of the site.
Remediation
Create public/robots.txt with at minimum an allow-all rule and a sitemap reference:
User-agent: *
Allow: /
Sitemap: https://yoursite.com/sitemap.xml
In Next.js App Router, generate it programmatically from app/robots.ts so the sitemap URL stays in sync with your environment:
// app/robots.ts
import type { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
return {
rules: { userAgent: '*', allow: '/', disallow: ['/admin/', '/api/'] },
sitemap: `${process.env.NEXT_PUBLIC_SITE_URL}/sitemap.xml`,
}
}
Verify the live output at https://yoursite.com/robots.txt after deploying. Never set Disallow: / in production.
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 SEO Fundamentals Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- external · RFC-9309 — Robots Exclusion Protocol
Taxons
History
- 2026-04-18·v1.0.0·Initial import from seo-fundamentals·automated