Skip to content

Rule · Lint

No robots.txt

lint/missing-robotswarnvoid lintupdated

Why it matters

Without robots.txt crawlers get a 404, you can't point them at the sitemap, and there is no explicit policy for AI crawlers (GPTBot, ClaudeBot, PerplexityBot).

How to fix it

Add app/robots.ts with the sitemap URL, an explicit AI-crawler policy and a preview-environment guard.

Example

ts
export default function robots(): MetadataRoute.Robots {
  return { rules: [{ userAgent: '*', allow: '/' }], sitemap: 'https://example.com/sitemap.xml' }
}

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.