What is robots.txt?
By SearchChamp teamUpdated
robots.txt is a plain-text file served at the root of a domain (example.com/robots.txt) that tells web crawlers which paths they can or cannot fetch. Defined by the Robots Exclusion Protocol, formalized as RFC 9309 in 2022. Modern robots.txt files include rules for Googlebot, Bingbot, AI bots (GPTBot, ClaudeBot, PerplexityBot), and SEO crawlers (AhrefsBot, SemrushBot). Critical distinction: robots.txt blocks crawling, not indexing — to remove a page from the index, use noindex meta or HTTP header instead.
robots.txt in context
The Robots Exclusion Protocol was created by Martijn Koster in 1994 — the same year as the first search engines. It remained an informal convention for 28 years until standardized as RFC 9309 in 2022. The 2023-2026 era saw an explosion of new bot User-Agents from AI companies — OpenAI's GPTBot (Aug 2023), Anthropic's ClaudeBot (Oct 2023), and Perplexity's bot all gained adoption. Most sites now make explicit allow/block decisions for AI bots — SearchChamp's robots.txt allows GPTBot, ClaudeBot, PerplexityBot, and Google-Extended; blocks AhrefsBot, SemrushBot, and MJ12bot.
Example
A typical SaaS robots.txt: User-agent: GPTBot Allow: / User-agent: ClaudeBot Allow: / User-agent: AhrefsBot Disallow: / User-agent: * Disallow: /api/ Disallow: /dashboard/ Disallow: /auth/ Sitemap: https://example.com/sitemap.xml Allows AI engines to read the public marketing surface. Blocks SEO competitors from scraping the link graph. Blocks generic crawlers from authenticated paths. Points to the sitemap.
Related terms
Common questions about robots.txt.
Catch robots.txt mistakes before crawlers do.
SearchChamp’s Site Audit parses your robots.txt for syntax errors, conflicts, and accidentally blocked critical paths — alongside 40+ technical and AI-readiness checks. 7-day free trial.