robots.txt for AI crawlers
Definition
robots.txt for AI crawlers means using the standard robots exclusion file at a site's root to allow or block AI bots individually, by addressing each bot's documented user agent token, such as GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot or Google-Extended, with Allow and Disallow rules. Because each token governs a different system, training, search indexing or live fetching, a precise file makes separate decisions per bot rather than one blanket choice.
How AI crawler directives work
robots.txt predates AI by three decades. It began as a 1994 convention and was formalized as RFC 9309 in 2022: a plain text file at the domain root where each rule group names a user agent token and lists what that agent may or may not fetch. AI operators adopted the same mechanism, so controlling AI crawlers requires learning which tokens exist and what each one feeds rather than learning any new syntax.
The grammar is three lines deep. User-agent: GPTBot followed by Disallow: / blocks OpenAI's training crawler everywhere. Disallow with a path, such as Disallow: /internal/, blocks a section. Allow: / grants explicit permission, useful when a wildcard group elsewhere in the file is restrictive. An empty Disallow: line permits everything for that agent. Rules bind per token, so a file can welcome OAI-SearchBot in one group while refusing GPTBot in the next.
Two inherited behaviors cause most AI-related accidents. First, a bot with no rule group of its own falls back to the wildcard User-agent: * group, so a legacy blanket Disallow silently blocks every AI bot you never mentioned. Second, robots.txt must be reachable and valid: a file returning errors, or one left over from staging with Disallow: /, takes whole sites out of AI indexes with a single line.
The tokens that matter, sorted by what they feed
Training crawlers collect content to train future models: GPTBot (OpenAI), ClaudeBot (Anthropic), and Google-Extended, which is a data-use token applied by Googlebot rather than a crawler you will see in logs. Blocking these keeps your future content out of training corpora and changes nothing about today's AI search answers. This group is where a licensing stance belongs, if you have one.
Search index crawlers build the retrieval indexes behind AI answers: OAI-SearchBot for ChatGPT search, Claude-SearchBot for Claude, PerplexityBot for Perplexity. Blocking these removes your pages from the source pools those engines cite, which is a direct commercial cost. User-triggered fetchers, ChatGPT-User, Claude-User and Perplexity-User, retrieve single pages when a person asks. Blocking them breaks the moment a buyer pastes your URL into a chat, and Perplexity states Perplexity-User generally ignores robots.txt anyway because a human initiated the request.
A sane default policy for a brand that wants AI visibility, written as rule groups: allow OAI-SearchBot, PerplexityBot, Claude-SearchBot, ChatGPT-User and Claude-User with Allow: /, then decide the training trio, GPTBot, ClaudeBot and Google-Extended, on your actual licensing position, blocking them only if withholding training data serves a real strategy. Most small and mid-size brands allow everything, since being known to future models is itself a visibility surface.
The asymmetry to respect: blocking Googlebot itself removes you from Google Search, AI Overviews and everything built on the search index, while blocking Google-Extended is a narrow, reversible training opt-out. Confusing those two tokens is the most expensive robots.txt mistake in the AI era.
Where robots.txt stops working
robots.txt is a convention rather than an enforcement mechanism. Nothing at the protocol level compels compliance; the documented bots from OpenAI, Anthropic and Google state that they honor it, but scrapers wearing famous bot names do not, and Cloudflare published research in August 2025 alleging that even Perplexity reached blocked content through undeclared crawlers, which Perplexity disputed. Treat the file as a policy statement the honest actors respect.
Verification closes half the gap. Each major operator publishes the IP ranges its bots crawl from, OpenAI at openai.com/gptbot.json and its sibling files, Anthropic at claude.com/crawling/bots.json, Perplexity at perplexity.com/perplexitybot.json. Before writing policy around a heavy crawler in your logs, confirm its IPs match the operator's list. When enforcement genuinely matters, CDN-level bot management and emerging pay-per-crawl schemes are the harder backstop, since they act on requests rather than requesting cooperation.
The reverse failure is more common for brands: intending to allow AI crawlers while something upstream blocks them. Security plugins ship AI blocklists switched on by default, CDNs enable bot challenges that stop legitimate crawlers, and inherited wildcard rules override good intentions. The result is invisible in analytics and shows up only as absence from AI answers. Reachroller's free checker at /bot-access tests which AI crawlers can actually read your site, which is the fastest way to confirm your file does what you decided.
Frequently asked questions
Which robots.txt lines block all major AI training crawlers?+
Three rule groups cover the majors: User-agent: GPTBot with Disallow: /, User-agent: ClaudeBot with Disallow: /, and User-agent: Google-Extended with Disallow: /. That opts out of OpenAI, Anthropic and Google training pipelines while leaving search index crawlers like OAI-SearchBot and PerplexityBot untouched, so your AI search citations are preserved.
Can I allow AI search bots but block AI training bots?+
Yes, and it is the most popular split among publishers. Rules bind per user agent token, so allow OAI-SearchBot, Claude-SearchBot and PerplexityBot while disallowing GPTBot and ClaudeBot in their own groups. The operators designed their fleets this way precisely so indexing and training are independent decisions.
Do AI crawlers actually obey robots.txt?+
The documented crawlers from OpenAI, Anthropic and Google state they honor it, and publish IP ranges so you can verify visits. Compliance is voluntary, though: spoofed user agents ignore it, Perplexity says its user-triggered Perplexity-User fetcher generally bypasses it, and Cloudflare has alleged undeclared crawling. Enforcement requires CDN-level bot management.
How do I check whether my robots.txt is blocking AI crawlers by accident?+
Read the wildcard User-agent: * group first, since bots without their own rules inherit it, then check for security plugins and CDN bot protections that block outside robots.txt entirely. A direct test is faster than an audit: the free tool at /bot-access fetches your site as each major AI crawler and reports who gets through.
Sources referenced
- RFC 9309, Robots Exclusion Protocol, IETF, 2022
- OpenAI, Overview of OpenAI crawlers (developers.openai.com/api/docs/bots)
- Anthropic, Does Anthropic crawl data from the web? (support.claude.com, article 8896518)
- Perplexity, Perplexity crawlers documentation (docs.perplexity.ai)
- Cloudflare, research on undeclared crawling, August 2025
See this metric on your own brand
Reachroller tracks the questions your buyers ask and shows exactly what AI answers. Three days free, no card.
Check my brand free