Technical SEO · 5 min read · Answerwell
How to control AI crawlers with robots.txt
Which AI crawler tokens to allow or block in robots.txt, how training, search and user-triggered bots differ, and how to confirm the rules in your logs.
Key takeaways
- AI crawlers fall into three groups: training crawlers, search crawlers and user-triggered fetchers. Each group needs its own decision.
- Blocking a training crawler such as GPTBot or ClaudeBot does not remove you from ChatGPT or Claude search. Blocking OAI-SearchBot or Claude-SearchBot can.
- Google-Extended and Applebot-Extended are control tokens, not crawlers. Google AI Overviews use content fetched by Googlebot, so Google-Extended does not control them.
- User-triggered fetchers such as ChatGPT-User and Perplexity-User may not follow robots.txt. Operators say so in their own documentation.
- robots.txt is a request, not access control. Check what bots actually do in your server logs.
What robots.txt can and cannot do
robots.txt is a plain-text file at the root of a host (for example https://www.example.com/robots.txt) that tells crawlers which paths they may fetch. The format is standardized in RFC 9309, the Robots Exclusion Protocol, published by the IETF in 2022. Each protocol and host combination needs its own file, so shop.example.com does not inherit the rules of www.example.com.
Three limits matter for AI crawlers:
- Compliance is voluntary. Reputable operators document that they honor robots.txt, but the file cannot stop a client that ignores it. Use authentication or server rules for content that must stay private.
- Disallow is not noindex. A blocked URL can still appear in search results if other pages link to it. To keep a page out of an index, allow crawling and use a
noindexrobots meta tag orX-Robots-Tagheader. - Changes are not instant. RFC 9309 lets crawlers cache the file, and Google states that it generally caches robots.txt for up to 24 hours.
The three kinds of AI crawlers
Operators publish separate user-agent tokens for different purposes. The tokens below come from each operator’s own documentation; our AI crawler access tool keeps the full list with links to the sources.
Training crawlers
These collect content that may be used to train foundation models. Blocking them is an opt-out from future training data; it does not affect search features.
- GPTBot (OpenAI)
- ClaudeBot (Anthropic)
- CCBot (Common Crawl, whose public datasets are widely reused for model training)
- meta-externalagent (Meta)
- MistralAI-Training (Mistral AI)
- Google-Extended (a token, not a separate crawler: it governs use of Googlebot-crawled content for Gemini training and grounding)
- Applebot-Extended (a token that opts Applebot-crawled content out of Apple’s generative model training)
Search and index crawlers
These build the indexes that AI search products retrieve from and cite. Blocking them can remove your pages from those answers.
- OAI-SearchBot (ChatGPT search)
- Claude-SearchBot (Claude search results)
- PerplexityBot (Perplexity search results)
- Meta-WebIndexer, Amzn-SearchBot, MistralAI-Index
- Googlebot and bingbot: classic search crawlers that also feed Google AI Overviews and AI Mode, and Microsoft Copilot. Blocking them removes you from far more than AI answers.
User-triggered fetchers
These fetch a single page when a person asks an assistant about it: ChatGPT-User, Claude-User, Perplexity-User, meta-externalfetcher, Amzn-User, MistralAI-User and Google’s user-triggered fetchers. OpenAI, Perplexity, Meta, Amazon and Google state that robots.txt rules may not apply to some or all of these visits, because a user initiated the request. Anthropic and Mistral AI say their user fetchers honor robots.txt. Treat these rules as a signal and verify behavior in logs.
How crawlers read your groups
Most robots.txt mistakes come from misunderstanding how groups are matched. Under RFC 9309:
- A crawler obeys only the most specific group that names it. If you add a
User-agent: GPTBotgroup, GPTBot ignores everything underUser-agent: *. Repeat any general rules you still want it to follow. - Several
User-agentlines can share one group of rules. - Within a group, the longest matching path wins. When an
Allowand aDisallowrule match with equal length, the less restrictiveAllowapplies. - Paths are case-sensitive, and
*and$wildcards are supported by the major crawlers.
Three common policies
Allow AI search, opt out of training
This is the most common choice for businesses that want to be cited but do not want their content in training sets:
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: meta-externalagent
User-agent: MistralAI-Training
User-agent: Google-Extended
User-agent: Applebot-Extended
Disallow: /
User-agent: *
Disallow: /account/
Allow: /
Sitemap: https://www.example.com/sitemap.xml
OAI-SearchBot, Claude-SearchBot and PerplexityBot have no group of their own here, so they follow the * rules and can crawl everything except /account/.
Allow everything, protect one section
If only a premium library or a dataset should stay out of AI products, scope the rule:
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Disallow: /research-library/
User-agent: *
Allow: /
Remember that a crawler which ignores robots.txt, or a user-triggered fetch, can still request those URLs. Pair the rule with authentication if the content is licensed.
Opt out of AI products entirely
You can disallow every AI-specific token, but think twice before adding Googlebot or bingbot: that also removes you from Google and Bing search. To limit how Google uses your pages in AI Overviews without leaving Search, Google documents the nosnippet, max-snippet and data-nosnippet controls, which also restrict classic snippets.
Confirm the rules in your logs
A robots.txt file states intent; server logs show behavior. After a change:
- Filter logs by user agent and compare requests to disallowed paths before and after the change, allowing for the cache period.
- Verify identity. User-agent strings are easy to fake. Operators such as OpenAI, Google and Microsoft publish IP ranges or reverse DNS methods for their crawlers; requests that claim a token but fail verification are impostors and can be blocked at the server or CDN.
- Watch for new tokens. Operators add and rename crawlers. Review your list against official documentation every quarter.
- Test the file. Fetch it from outside your network, confirm it returns HTTP 200 as
text/plain, and keep it well under the 500 KiB that RFC 9309 asks crawlers to parse at minimum.
A short checklist
- Decide separately for training, search and user-triggered access.
- Give each AI token you want to restrict an explicit group, and repeat the general rules inside it.
- Never block Googlebot or bingbot to control AI features.
- List your XML sitemaps in robots.txt.
- Verify crawler identity by IP or reverse DNS, not by user agent alone.
- Recheck the token list quarterly.
Put it into practice
The free AI crawler access tool builds a robots.txt policy from your choices, with an explanation for each token. If you want the work done and checked, XML Sitemap & robots.txt Setup writes standards-compliant rules for every crawler you care about, and Log File & Bot Traffic Analytics shows which bots honor them and which ones only pretend to be search engines. Terms such as user agent and crawl budget are defined in the SEO and GEO glossary.
Put this into practice
All Technical SEO services →Have a question about your own site? Request a proposal →
More insights (6)
Recommender systems for mid-size e-commerce
What a mid-size online shop needs to run its own recommender system: interaction data, model choices, compute estimates and how to prove it adds revenue.
How to connect SEO and GEO work to revenue
Build a measurement chain from search and AI visibility to leads and revenue: event dictionaries, attribution limits, controlled tests and predictive models.
IndexNow, sitemaps and Google Indexing API
IndexNow, XML sitemaps and the Google Indexing API solve different problems. Which engines support each, their limits, and one setup that covers all three.
Schema markup and entities: a practical guide
How to plan schema markup around entities: choosing Organization, Service and Product types, linking them with @id and sameAs, and validating the result.
How to measure AI search visibility
A practical method for measuring AI search visibility: prompt sets, repeated sampling, mention, citation and accuracy scores, and AI referrals to revenue.
What is generative engine optimization?
A practical definition of generative engine optimization (GEO): how AI answers choose sources, how GEO relates to SEO, and the work that earns citations.
