# How to block AI crawlers

> Block AI bots with robots.txt: choose which jobs to block, name each bot's token, add CDN or server rules for bots that ignore it, then test.

Canonical: https://promptlyfound.com/crawlers/block-ai-crawlers
Updated: 2026-11-23

## Short answer

**To block AI bots with robots.txt, decide which jobs to block, then name each bot's token in a User-agent line.** A GPTBot or ClaudeBot rule keeps content out of training, and an OAI-SearchBot rule removes the site from ChatGPT search answers. For fetchers that ignore robots.txt, add a CDN or server rule. Keep /robots.txt reachable, because a bot that cannot read the file cannot see your opt-out.

## Key findings

- OpenAI says disallowing GPTBot indicates that a site's content should not be used to train its generative AI foundation models. Its GPTBot and OAI-SearchBot settings are independent. [1]
- Anthropic says blocking its IP addresses may not give a reliable opt-out, because the block stops its bots from reading robots.txt. [2]
- Google-Extended has no user agent of its own. Google says it does not affect a site's inclusion in Google Search and is not a ranking signal. [3]
- Perplexity says Perplexity-User generally ignores robots.txt rules, because a user requested the fetch. [4]
- Meta says it supports robots.txt rather than non-standard formats such as NoAI tags. [8]

When you block AI bots with robots.txt, you decide whether your content trains AI models and whether your site can appear in AI search answers, and different bots control the two. In our crawl of websites cited by AI answers, 8.52% of domains with a valid robots.txt fully blocked at least one AI crawler. You block an AI crawler in up to three places: robots.txt for bots that follow it, a CDN or firewall for bots that do not, and the web server. A rule for one bot never covers another bot, even one from the same company. Each operator documents what a block on its own bots changes.

## Decide what to block

The choice comes down to how much AI search visibility you are willing to give up for control. Choose one of three levels. Each level adds bots to the one before it.

  <thead><tr><th scope="col">Choice</th><th scope="col">Bots to name</th><th scope="col">Main effect</th></tr></thead>
  <tbody>
    <tr>
      <th scope="row">Block training, allow AI search</th>
      <td>GPTBot, ClaudeBot, Google-Extended, meta-externalagent, Applebot-Extended, CCBot</td>
      <td>Operators that document a training opt-out stop using the site for future training</td>
    </tr>
    <tr>
      <th scope="row">Block AI search too</th>
      <td>Add OAI-SearchBot, Claude-SearchBot, PerplexityBot, meta-webindexer</td>
      <td>The site leaves ChatGPT search answers and can lose visibility in Claude, Perplexity and Meta AI</td>
    </tr>
    <tr>
      <th scope="row">Block everything</th>
      <td>Add ChatGPT-User, Claude-User, Perplexity-User, meta-externalfetcher, Bytespider</td>
      <td>Some of these fetchers ignore robots.txt, so this choice needs a CDN or server rule</td>
    </tr>
  </tbody>

[What is the difference between training bots and search bots?](https://promptlyfound.com/crawlers/training-vs-search-bots) describes the job of each bot. The sections below give what each operator says a block changes.

### Block training, allow AI search

This split opts a site out of training and keeps it eligible for AI search. [OpenAI's crawler overview](https://developers.openai.com/api/docs/bots) says that disallowing GPTBot "indicates a site's content should not be used in training generative AI foundation models." Each OpenAI setting is independent, so OAI-SearchBot can stay allowed for ChatGPT search.[1]

The [Anthropic Help Center](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler) says a ClaudeBot restriction signals that the site's future materials should be excluded from its training datasets.[2] [Google's list of common crawlers](https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers) says Google-Extended controls training of future Gemini models and grounding in Gemini Apps and Grounding with Google Search on Vertex AI. Google says the token does not affect inclusion in Google Search and is not a ranking signal.[3] A Google-Extended block therefore also covers grounding, which is a use at answer time.

[Apple's About Applebot page](https://support.apple.com/en-us/119829) says disallowing Applebot-Extended opts content out of training Apple's foundation models. Pages that disallow it can still appear in search results in Spotlight, Siri and Safari.[5]

Two more bots need a decision:

- [Meta's crawler page](https://developers.facebook.com/docs/sharing/webmasters/web-crawlers) says meta-externalagent crawls for uses such as training foundation AI models or improving products by indexing content directly. Meta does not say what a block changes.[8]
- [Common Crawl's CCBot page](https://commoncrawl.org/ccbot) describes an open repository of web crawl data that anyone can access and analyze.[7] A CCBot block keeps future pages out of that dataset. [How to check whether your site is in Common Crawl](https://promptlyfound.com/crawlers/common-crawl) covers its use for training.

[How to allow or block AI bots in robots.txt](https://promptlyfound.com/crawlers/robots-txt-for-ai#allow-ai-search-block-training) gives the complete rule set for this split. In our crawl of the websites that AI answers cited in October and November 2026, 8.52% of domains with a valid robots.txt fully blocked at least one AI crawler. A smaller share, 4.15%, blocked GPTBot and let OAI-SearchBot fetch the site. [Do websites cited by AI answers block AI crawlers?](https://promptlyfound.com/research/ai-crawler-blocking) has the figures for each crawler.

### Block AI search too

A search block removes the site from some AI answers. OpenAI says sites opted out of OAI-SearchBot "will not be shown in ChatGPT search answers," though they can still appear as navigational links.[1] Anthropic says disabling Claude-SearchBot prevents indexing for search, which may reduce the site's visibility and accuracy in search results.[2]

[Perplexity](https://docs.perplexity.ai/docs/resources/perplexity-crawlers) says PerplexityBot is not used to crawl content for AI foundation models. It recommends allowing the bot to ensure a site appears in its search results.[4] A PerplexityBot block is therefore a search decision only. Meta says allowing meta-webindexer helps it cite and link to content in Meta AI's responses.[8]

### Block everything

Blocking everything takes a CDN or server rule, because three of the four operators say their user-request fetchers may not follow robots.txt. These fetchers act when a person asks an assistant about a page. Anthropic says disabling Claude-User prevents its system from retrieving content in response to a user query.[2] The other three operators say their fetchers may not follow robots.txt. OpenAI says the rules may not apply to ChatGPT-User, because a user starts these actions.[1] Perplexity says Perplexity-User generally ignores them,[4] and Meta says meta-externalfetcher may bypass them.[8]

[ByteDance's page about Bytespider](https://zhanzhang.toutiao.com/docs/intro/26899) names it as the crawler of Toutiao Search. The page does not say whether Bytespider follows robots.txt or whether its data trains models.[9]

Leave Googlebot, Bingbot and Applebot out of all three choices unless you also want to leave their search results. Google says rules for Googlebot affect Google Search.[3] Apple says allowing Applebot lets content appear in search results in its products.[5] Cloudflare says a block of all three stops them from reaching a site for search as well.[10]

## Write the robots.txt groups

1. Open the [robots.txt generator](https://promptlyfound.com/tools/robots-txt-generator) and start from the preset that matches your choice of what to block, so each bot token is spelled the way its operator writes it.
2. Change single bots where your choice differs from the preset.
3. Copy the paths that your `User-agent: *` group already blocks into each new group. A bot that finds a group with its own name ignores the `*` group, so without the copy it could fetch those paths.
4. Keep every existing group for other crawlers, and remove older groups that name the same AI tokens, so each AI token has one group to follow.
5. Publish the file at `/robots.txt` on each host. Anthropic says to repeat the rules for every subdomain you want to opt out.[2]

Google-Extended and Applebot-Extended send no requests. Google crawls with its existing user agents and reads Google-Extended as a control.[3] Apple says Applebot-Extended does not crawl webpages.[5] robots.txt is the only place where these two tokens work, so a CDN or server rule cannot replace them.

Plan for about a day before a robots.txt change takes effect. OpenAI says its search systems need about 24 hours after a robots.txt update.[1] Perplexity and Meta say up to 24 hours.[4] [8] [Common Crawl's FAQ](https://commoncrawl.org/faq) says CCBot stops crawling after a Disallow rule and checks the file again from time to time.[6]

## Block at the CDN or firewall

Add an edge rule in two cases: for bots that do not follow robots.txt, and when you want requests refused instead of asked to stay away. ChatGPT-User, Perplexity-User and meta-externalfetcher are the first case. Bytespider may also be, because ByteDance does not document its robots.txt support.

### Cloudflare

On Cloudflare, check the Training setting first. Cloudflare sets a separate policy for Search, Agent and Training bots, and since September 15, 2026, the Block setting for Training also applies to Googlebot, Bingbot and Applebot. [Cloudflare's announcement](https://blog.cloudflare.com/accountable-mixed-use-ai-crawlers/) says this "impacts search as well as training," and that Disallow AI Training stops training and keeps search.[10] With Disallow AI Training, Cloudflare blocks the training-only crawlers of OpenAI, Anthropic, Meta and Amazon. [How Cloudflare's AI bot settings work](https://promptlyfound.com/crawlers/cloudflare-ai-bot-settings) explains each setting and the defaults for new domains.

### Other CDNs and firewalls

Match the user agent and the operator's IP list together. OpenAI publishes an IP list for each of its bots, including ChatGPT-User.[1] Perplexity publishes separate lists for PerplexityBot and Perplexity-User. Its firewall examples combine a user agent match with an IP match.[4] Perplexity wrote them as allow rules, and the same two conditions work in a block rule. [How to verify AI crawlers](https://promptlyfound.com/crawlers/verify-ai-crawlers) lists the IP files and the operators that publish none.

> A firewall block can stop a bot from reading robots.txt. Anthropic says an IP block "may not work correctly or persistently guarantee an opt-out," because the block stops its bots from reading robots.txt.[2] OpenAI says that if a site allows both GPTBot and OAI-SearchBot, it may use one crawl for both uses.[1] Keep the Disallow rule for each training bot in robots.txt, and exclude the path `/robots.txt` from every edge and server block.

A blocked robots.txt request can cancel your opt-out or close the whole site, depending on its status code. [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html) says a 4xx answer lets the crawler access any resource on the server. A 5xx answer means the crawler must assume the whole site is disallowed.[11]

## Add server rules by user agent

Without a CDN, refuse the requests in the web server. These rules return 403 to the listed user agents and let every client fetch `/robots.txt`. Replace the names with the tokens you chose to block.

For nginx:

```
# In the http block
map $http_user_agent $block_ai {
    default 0;
    ~*(GPTBot|ClaudeBot|CCBot|meta-externalagent|Bytespider) 1;
}

# In the server block
set $deny_ai $block_ai;
if ($uri = /robots.txt) { set $deny_ai 0; }
if ($deny_ai) { return 403; }
```

For Apache, in the site configuration or `.htaccess`:

```
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/robots\.txt$
RewriteCond %{HTTP_USER_AGENT} (GPTBot|ClaudeBot|CCBot|meta-externalagent|Bytespider) [NC]
RewriteRule ^ - [F]
```

A user agent rule trusts what the client says about itself. Any client can send a bot's name, and a bot can send a browser's user agent. Common Crawl says it is aware of crawlers that falsely identify themselves as CCBot.[7] ByteDance says a Bytespider request whose hostname is outside bytedance.com is an impostor.[9] A user agent rule blocks the fakes along with the genuine bot, and it misses any bot that hides its name. To act only on verified requests, check the IP address as described in [How to verify AI crawlers](https://promptlyfound.com/crawlers/verify-ai-crawlers). Agents that run in a person's own browser carry no bot token, as [How AI browser agents access websites](https://promptlyfound.com/crawlers/ai-agents) explains.

## Rule out methods that do not block

These methods stop no crawling, so a policy that relies on them leaves content open to the bots you meant to block.

- A noai or noimageai meta tag has no standard behind it. Meta says it supports robots.txt "rather than non-standard formats like NoAI tags."[8] [Google's robots meta tag specification](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag) lists its valid rules, and noai is not among them.[12] The crawler pages of OpenAI, Anthropic, Perplexity, Common Crawl and ByteDance do not mention it.
- Some operators document their own page-level tags, which limit use and do not stop crawling. Google says nosnippet prevents content from being used as a direct input for AI Overviews and AI Mode.[12] Apple says it does not use nosnippet content as context for AI-generated output, and that Applebot can still crawl the page.[5]
- [Microsoft](https://blogs.bing.com/search/2026/10/your-content-your-choice-clearer-preferences-for-training-and-grounding/) says it honors `<meta name="Bingbot" content="ai-training:disallow">` and an ai-grounding tag from February 1, 2027. It says these settings govern use of content and do not control crawl access.[13]
- A tag on a page that robots.txt disallows is never read. Google says indexing and serving rules on a URL that is disallowed from crawling will not be found.[12]
- Google-Extended and Applebot-Extended rules stop no requests. To stop the crawling, a site has to block Googlebot or Applebot, which also removes it from their search results.[3] [5]
- robots.txt does not keep content private. RFC 9309 says the protocol "is not a substitute for valid content security measures" and recommends HTTP authentication.[11]

## Test the result

1. Run the [robots.txt checker for AI crawlers](https://promptlyfound.com/tools/ai-crawler-checker) on each host. It shows which bots each rule allows or blocks, and the rule that decides each result.
2. Fetch the file as a bot: `curl -sI -A "GPTBot" https://example.com/robots.txt`. The answer should be 200 even when GPTBot is blocked elsewhere, which confirms the bot can still read your opt-out.
3. Test an edge or server rule with `curl -sI -A "GPTBot" https://example.com/`. A rule that matches the user agent alone returns 403. A rule that also checks the IP address lets your own request through.
4. Wait at least 24 hours before you judge the result, because cached copies of robots.txt can take that long to expire. That way you are not judging a change that has only half applied.
5. Load the access logs into the [AI crawler log analyzer](https://promptlyfound.com/tools/log-analyzer). Check that verified requests from blocked bots stop or receive 403, and that robots.txt requests still get 200. [Log file analysis for AI crawlers](https://promptlyfound.com/crawlers/log-file-analysis) explains the fields to read.

## Sources

1. Overview of OpenAI Crawlers. OpenAI. https://developers.openai.com/api/docs/bots
2. Does Anthropic crawl data from the web, and how can site owners block the crawler?. Anthropic Help Center. https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler
3. List of Google's common crawlers. Google for Developers, 2026-10-30. https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers
4. Perplexity Crawlers. Perplexity. https://docs.perplexity.ai/docs/resources/perplexity-crawlers
5. About Applebot. Apple Support, 2026-09-04. https://support.apple.com/en-us/119829
6. Frequently Asked Questions. Common Crawl. https://commoncrawl.org/faq
7. CCBot. Common Crawl. https://commoncrawl.org/ccbot
8. Meta Web Crawlers. Meta for Developers, 2026-05-21. https://developers.facebook.com/docs/sharing/webmasters/web-crawlers
9. 关于Bytespider (About Bytespider). Toutiao Search Webmaster Platform (ByteDance). https://zhanzhang.toutiao.com/docs/intro/26899
10. Have it both ways: stay discoverable in search while disallowing AI training. Cloudflare, 2026-09-15. https://blog.cloudflare.com/accountable-mixed-use-ai-crawlers/
11. RFC 9309: Robots Exclusion Protocol. IETF, 2022-09-01. https://www.rfc-editor.org/rfc/rfc9309.html
12. Robots meta tag, data-nosnippet, and X-Robots-Tag specifications. Google Search Central, 2026-03-24. https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag
13. Your content, your choice: clearer preferences for training and grounding. Microsoft Bing Blogs, 2026-10-30. https://blogs.bing.com/search/2026/10/your-content-your-choice-clearer-preferences-for-training-and-grounding/

---

This is a plain-text copy of https://promptlyfound.com/crawlers/block-ai-crawlers from Promptly Found. The web page is the canonical version and includes the charts.
