How do I block AI crawlers like GPTBot in robots.txt?
To block an AI crawler, add a robots.txt group that names its token with Disallow: /. Each operator uses separate tokens for training, search and user-requested fetches, so blocking one does not block the others. robots.txt is a request, not access control, and some user-triggered fetchers may ignore it.
The short version
- A crawler obeys the group that matches its own token, and uses the
*group only if no group names it. - Tokens differ by purpose. OpenAI:
GPTBotfor training,OAI-SearchBotfor search,ChatGPT-Userfor fetches a user asks for. Anthropic:ClaudeBot,Claude-SearchBot,Claude-User. - Blocking
Google-Extendeddoes not affect Search: Google says it “does not impact a site's inclusion in Google Search”. Google's AI features in Search are controlled throughGooglebotand snippet controls. - A change takes time: OpenAI and Perplexity say up to about 24 hours, and Google caches robots.txt for up to 24 hours.
- Blocking looks forward. None of the operator pages we read says it removes what was already collected; Anthropic says a restriction signals that a site's “future materials” should be excluded.
The tokens, in each operator's words
| Operator | Token | What the operator says it is for | What it says about robots.txt |
|---|---|---|---|
| OpenAI | GPTBot | Crawling content that may be used in training its generative AI foundation models. | “Disallowing GPTBot indicates a site's content should not be used in training generative AI foundation models.” |
| OpenAI | OAI-SearchBot | Surfacing websites in ChatGPT's search features. | Independent of GPTBot: a site can allow one and disallow the other. Changes take about 24 hours for search. |
| OpenAI | ChatGPT-User | Actions initiated by a user, not automatic crawling. | “robots.txt rules may not apply.” |
| Anthropic | ClaudeBot, Claude-SearchBot, Claude-User | Training content, search indexing, and answering a user's question. | “Anthropic’s Bots respect ‘do not crawl’ signals by honoring industry standard directives in robots.txt.” |
Google-Extended | Whether crawled content may be used for training Gemini models and for grounding in Gemini Apps. | A control token with no separate user agent string; it does not affect Search inclusion or ranking. | |
| Perplexity | PerplexityBot, Perplexity-User | Surfacing sites in Perplexity search (not for training), and user-requested fetches. | Perplexity-User “generally ignores robots.txt rules” because a user asked for the fetch. |
| Apple | Applebot-Extended | Whether data crawled by Applebot may be used to train Apple's generative models. | It “does not crawl webpages”; disallowing it does not remove you from search results. |
| Common Crawl | CCBot | An open repository of web crawl data. | It checks robots.txt first; to block it, use Disallow: /. |
| Meta | Meta-ExternalAgent, Meta-ExternalFetcher | Training and indexing, and fetching a link at a user's request. | Meta-ExternalFetcher “may bypass robots.txt rules”. |
The rules to write
Block a training crawler and keep a search crawler (the independence OpenAI describes):
User-agent: GPTBot
Disallow: /
User-agent: OAI-SearchBot
Allow: /Block several, each by its own token:
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
Disallow: /The file must be at the root of each host: https://www.example.com/robots.txt, and a subdomain has its own. The RFC that defines the protocol says plainly that these rules “are not a form of access authorization”, so do not rely on robots.txt to keep anything private.
Check what your file really says for one URL
Paste a page address. The checker reads that site's live robots.txt and reports, for Googlebot, Bingbot and six AI and dataset crawlers (GPTBot, ClaudeBot, Google-Extended, CCBot, PerplexityBot, Applebot-Extended), whether each may crawl that URL, and which line decides.
What we tested
On 2026-10-13 we ran the live Robots.txt Checker on real, public sites. We chose them because their robots.txt files treat AI crawlers in different ways, and then compared the checker's verdicts with the file itself.
| URL entered | What the file says | What the checker reported |
|---|---|---|
| www.nytimes.com | Names GPTBot, ClaudeBot, Google-Extended, CCBot, PerplexityBot and Applebot-Extended, each with Disallow: /. | 6 of 6 blocked, each with the line number of its rule. |
| www.theguardian.com | One group lists ClaudeBot, CCBot, PerplexityBot, Applebot-Extended and others together. GPTBot and Google-Extended are not named. | 4 of 6 blocked. GPTBot and Google-Extended “allowed”: no group names them, so the * group applies, and it has no rule for this URL. |
| www.cloudflare.com | Names GPTBot, Google-Extended, CCBot, PerplexityBot, Anthropic-AI and Claude-Web, all with Allow: /. ClaudeBot is not named. | 0 of 6 blocked. ClaudeBot is allowed through the * group, not by a rule of its own. |
| github.com (home page) | One group for GPTBot, OAI-SearchBot, ClaudeBot, anthropic-ai and PerplexityBot with a list of Allow and Disallow paths. | 0 of 6 blocked, allowed by Allow: /$. |
| github.com/pricing | The same group. | 0 of 6 blocked, allowed by Allow: /pricing. |
| github.com/torvalds/linux/commits/master | The same group. | 6 of 6 blocked, by Disallow: /*/*/commits/. |
| en.wikipedia.org | No AI crawler is named. | 0 of 6 blocked. |
What this shows:
- The token must match. Cloudflare lists two Anthropic names but not ClaudeBot, which is the token Anthropic's current help page gives for training, so the checker reports ClaudeBot as allowed.
- The answer is per URL. The same GitHub file allows its home page and blocks a repository's commit history for the same crawlers. Check the URLs you care about, not only the home page.
- Not naming a bot means the
*group. That is how the Guardian's file blocks some AI crawlers and leaves GPTBot allowed. The RFC says that when no group matches, a crawler obeys the*group.
One thing about our own tool. On the Cloudflare and Guardian files the checker listed a line it does not recognise (a Content-Signal line and a License line) under “Review”, with the advice “Fix the spelling, or remove the lines”. Both are deliberate extensions by those sites, so that advice does not fit them; treat the line as a note that the checker does not know the directive.
What this can't tell you
The checker reads the file; it does not test any crawler's behaviour. Whether an operator honours its own token is the operator's statement, quoted above, not something we measured. Operators' pages say user-initiated fetchers may ignore robots.txt, and Google and Common Crawl both warn that user agent strings can be faked. Several operators (OpenAI, Anthropic, Google, Perplexity, Apple and Common Crawl) publish IP ranges, but Anthropic cautions that blocking its IP addresses can stop it reading your robots.txt, so the opt-out may not work.
Related: Blocked by robots.txt (the Search Console status) and Blocked due to access forbidden (403).
Sources
We read these official pages on 2026-10-13.
- Overview of OpenAI Crawlers
- Does Anthropic crawl data from the web, and how can site owners block the crawler? - Claude Help Center (page dated 2026-04-07)
- Google's common crawlers (page dated 2026-07-14)
- Google User-Triggered Fetchers (page dated 2026-08-19)
- AI Features and Your Website (page dated 2025-12-10)
- Perplexity Crawlers
- About Applebot - Apple Support (page dated 2026-09-04)
- Common Crawl - CCBot
- Meta Web Crawlers - Meta for Developers (page dated 2026-05-21)
- RFC 9309: Robots Exclusion Protocol
- How Google Interprets the robots.txt Specification (page dated 2026-08-31)
- Updating Your Robots.txt File (page dated 2025-11-21)
Fixed this one? Before you send people to the page, run the full pre-publish check for everything else: indexing signals, link preview, broken links, alt text, structured data and HTTPS in one pass.