A robots.txt guide for AI crawlers: training, search and user fetch bots
AI companies run separate bots for training, search and pages a user asks about. How to tell them apart and write rules that keep you in AI answers.
By AVE editorial team · Published
On this page
Many sites added a line to robots.txt in the last two years to “block AI.” Some of them meant to opt out of model training and accidentally removed themselves from AI search answers instead. That happened because the large AI companies run several crawlers, each with a different job, and blocking one does not block the others.
This guide explains the three kinds of bots, lists the common user agents and offers a sensible default for brands that want to be cited in AI answers.
The three kinds of AI bots
Training crawlers collect pages that may be used to train future models. Blocking them affects what later model versions learn about you. It does not change what assistants retrieve and cite today.
Search crawlers build the index an assistant searches when it answers a question. Blocking them can remove your pages from cited answers in that assistant, which is usually the opposite of what a marketing team wants.
User fetchers visit a page because a person asked the assistant to open, read or summarize it. Operators describe these visits as actions taken on behalf of a person, and some say robots.txt rules may not apply to them.
There is also a fourth item that is not a crawler at all. Google-Extended and Applebot-Extended are control tokens. Google and Apple keep crawling with their regular bots, and these tokens tell them whether that content may be used for their models. Google states that Google-Extended does not affect inclusion or ranking in Google Search. AI Overviews and AI Mode are part of Search and follow the rules for Googlebot.
The common user agents
| User agent | Operator | Purpose | If you block it |
|---|---|---|---|
GPTBot |
OpenAI | Training | Future OpenAI models learn less from your site |
OAI-SearchBot |
OpenAI | Search | Your pages can drop out of ChatGPT search answers |
ChatGPT-User |
OpenAI | User fetch | ChatGPT may fail to open links people paste |
ClaudeBot |
Anthropic | Training | Future Claude models learn less from your site |
Claude-SearchBot |
Anthropic | Search | Fewer of your pages in Claude search results |
Claude-User |
Anthropic | User fetch | Claude may fail to read pages people share |
PerplexityBot |
Perplexity | Search | Your pages can drop out of Perplexity answers |
Perplexity-User |
Perplexity | User fetch | Perplexity may fail to open requested pages |
CCBot |
Common Crawl | Open datasets | Fewer copies of your pages in public datasets many model builders use |
Google-Extended |
Control token | Content stays out of Gemini training and grounding, Search is unaffected | |
Applebot-Extended |
Apple | Control token | Content stays out of Apple model training |
Operators add and rename agents from time to time, so check each company’s crawler documentation when you review your file.
A sensible default for most brands
Most marketing and ecommerce sites want to appear in AI answers. For them, a reasonable starting point is to allow search crawlers and user fetchers, and to make the training decision separately and on purpose.
# Search and user fetches: allowed, so answers can cite us
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /
Disallow: /checkout/
Disallow: /account/
# Model training: a business decision, shown here as opted out
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
User-agent: Applebot-Extended
Disallow: /
# Everyone else, including Googlebot and Bingbot
User-agent: *
Disallow: /checkout/
Disallow: /account/
Notice that the private paths appear twice. Under the Robots Exclusion Protocol, a crawler follows the group that names it and uses the User-agent: * group only when no group names it. In this example, OAI-SearchBot never reads the rules under User-agent: *, so anything you want kept out must be repeated inside its own group. It is an easy detail to miss.
Should you block training?
There is no universal answer, and it is worth deciding deliberately rather than by default.
Arguments for allowing training: future models will know your brand, products and positioning from your own words, not only from what others write about you. For smaller and newer brands, being absent from training data can mean assistants describe a competitor when asked about your category.
Arguments for blocking: if your content is the product, for example paid research or original journalism, you may not want it used to train systems that compete with you for attention. Blocking can also strengthen your hand in licensing talks, though that is a legal and commercial question rather than a technical one.
Either way, remember two limits. Blocking now does not remove what earlier models already learned. And blocking training crawlers does nothing to protect content from search crawlers or user fetchers, which serve a different purpose.
Common mistakes
- A staging file in production. A blanket
Disallow: /underUser-agent: *, copied from a staging site, blocks every compliant crawler, AI or not. - Rules that say yes while the firewall says no. Bot protection, rate limits and one click “block AI bots” settings at the CDN can return a challenge or an error to crawlers your robots.txt allows. Some providers switch this on by default for new sites. Check server logs for error responses to the agents above.
- Treating robots.txt as privacy. The protocol, standardized as RFC 9309 in 2022, is explicit that its rules are not a form of access authorization. Anything sensitive needs authentication.
- Content that only exists after JavaScript runs. Many AI crawlers read the raw HTML and do not execute scripts. If prices or specifications load client side, the crawler may see an empty page.
- Expecting robots.txt to control AI Overviews. For Google, the controls that limit how your text appears in AI Overviews are the same ones that govern snippets, such as
nosnippetandmax-snippet. They also affect your regular search snippets, so use them with care. - A list nobody reviews. New agents appear every year. Put a quarterly review on the calendar.
How to check what is really happening
- Read your live file. Fetch
/robots.txtfrom production, not from the repository, and test each agent against your key URLs with a parser that follows RFC 9309. - Read your logs. Look for the user agents above, the paths they request and the status codes they receive. A crawler that gets a 403 or a challenge page is blocked, whatever the rules say.
- Verify identity. User agent strings are easy to fake. Several operators publish the IP ranges their crawlers use, so check that traffic claiming to be a known bot comes from those ranges.
- Retest after changes. CDN rules, new plugins and redesigns often change bot access without anyone noticing.
Our agent ready website service tests robots.txt, bot protection and rendering on every key template, and reads your server or CDN logs. For the bigger picture of how retrieval feeds citations, see how answer engines choose which sources to cite.