Skip to content

Block AI training crawlers, let AI assistants in

Many sites refuse the crawlers that collect training data for AI models. Some of these sites also refuse the AI assistants by accident, with the group * or with a long list of agents. An assistant agent fetches one page when a person asks for it. It does not collect the site for a model.

This page gives a robots.txt that refuses the training crawlers and lets the assistants in. In the study of the top 1,000 domains, 47 sites do this for OpenAI: they refuse GPTBot and let ChatGPT-User in.

Put this file at /robots.txt on your site. Change /account/ to the paths that no bot must fetch, and change the address of the sitemap.

robots.txt
# Crawlers and tokens for the training of AI models: no pages
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Bytespider
User-agent: meta-externalagent
Disallow: /
# Assistants that fetch a page because a person asked for it
User-agent: ChatGPT-User
User-agent: Claude-User
User-agent: Perplexity-User
Disallow: /account/
Allow: /
# Crawlers for AI search: they show the site in answers, with a link
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Disallow: /account/
Allow: /
# All other crawlers, for example Googlebot
User-agent: *
Disallow: /account/
Content-Signal: search=yes, ai-input=yes, ai-train=no
Sitemap: https://www.example.com/sitemap.xml

Open this file in the robots.txt tester to see the verdict for each agent and each path.

Pick a rule for each group of agents. The figure writes the robots.txt, and the grid gives the verdict for each agent on three paths. The robots.txt parser of polite-crawler makes each verdict in your browser. Select a verdict to see the line that decided it.

Make a robots.txt for your siteThe verdicts come from the robots.txt parser of polite-crawler, in your browser.

9 of 16 agents can fetch the home page /. Pick a rule for each group.

Agent//members//account/
AI trainingThey collect pages to train AI models.
GPTBot
ClaudeBot
Google-Extendeda token
CCBot
Applebot-Extendeda token
Bytespider
meta-externalagent
AI searchThey collect pages for the answers of AI search, with a link to the page.
OAI-SearchBot
Claude-SearchBot
PerplexityBot
AI assistantsThey fetch one page when a person asks for it.
ChatGPT-User
Claude-User
Perplexity-User
Search enginesThey collect pages for Google Search and for Bing.
Googlebot
Bingbot
All other crawlersThe group * applies to each crawler that no group names.
ExampleBot
polite-crawlerIts MCP server obeys the rules for PoliteCrawler and for Claude-User.
PoliteCrawler

Select a verdict to see the line of the file that decided it.

Google-Extended does not stop Googlebot. Google-Extended is a token, not a crawler. Your file keeps it out, so Google does not train Gemini on your pages. Googlebot still fetches each page, and the site stays in Google Search. Applebot-Extended works the same way for Applebot.

robots.txt 37 lines

  1. # Crawlers and tokens for the training of AI models
  2. User-agent: GPTBot
  3. User-agent: ClaudeBot
  4. User-agent: Google-Extended
  5. User-agent: CCBot
  6. User-agent: Applebot-Extended
  7. User-agent: Bytespider
  8. User-agent: meta-externalagent
  9. Disallow: /
  10. # Crawlers for AI search: they show the site in answers, with a link
  11. User-agent: OAI-SearchBot
  12. User-agent: Claude-SearchBot
  13. User-agent: PerplexityBot
  14. Disallow: /account/
  15. Allow: /
  16. # Assistants that fetch a page because a person asked for it
  17. User-agent: ChatGPT-User
  18. User-agent: Claude-User
  19. User-agent: Perplexity-User
  20. Disallow: /account/
  21. Allow: /
  22. # Search engines
  23. User-agent: Googlebot
  24. User-agent: Bingbot
  25. Disallow: /account/
  26. Allow: /
  27. # All other crawlers
  28. User-agent: *
  29. Disallow: /account/
  30. Allow: /
  31. Content-Signal: search=yes, ai-input=yes, ai-train=no
  32. Sitemap: https://www.example.com/sitemap.xml

Two rules of robots.txt are easy to miss:

  • A token is not always a crawler. Google-Extended and Applebot-Extended fetch no page. Googlebot and Applebot fetch the pages, and the two tokens tell Google and Apple if their models can train on these pages. Thus a refusal of Google-Extended does not stop Googlebot, and the site stays in Google Search.
  • A group that names an agent replaces the group *. The agent obeys only the rules of its own group. Clear “Repeat the private paths in each group” to see the agents that can then fetch /account/.
Agent What it does In this file
GPTBot OpenAI: collects pages to train models Refused
ClaudeBot Anthropic: collects pages to train models Refused
CCBot Common Crawl: collects pages for an open dataset that many models use Refused
Google-Extended Google: a token that controls the use of the pages of Googlebot for training Refused
Applebot-Extended Apple: a token that controls the use of the pages of Applebot for training Refused
Bytespider ByteDance: collects pages to train models Refused
meta-externalagent Meta: collects pages to train models Refused
ChatGPT-User OpenAI: fetches a page when a person asks ChatGPT Permitted
Claude-User Anthropic: fetches a page when a person asks Claude Permitted
Perplexity-User Perplexity: fetches a page when a person asks Perplexity Permitted
OAI-SearchBot OpenAI: collects pages for ChatGPT search Permitted
Claude-SearchBot Anthropic: collects pages for search in Claude Permitted
PerplexityBot Perplexity: collects pages for Perplexity search Permitted
  1. One group refuses the training crawlers. The group names each crawler, and Disallow: / refuses each path. The two tokens Google-Extended and Applebot-Extended do not refuse Googlebot or Applebot. The site stays in Google Search and in Apple search, and the pages do not go into training.
  2. One group permits the assistants. A group that names an agent replaces the group * for that agent. Thus copy each rule of the group * that must apply to the assistants too, for example Disallow: /account/.
  3. One group permits the search crawlers. These crawlers show your pages in AI search answers, with a link to the page. To keep the site out of AI search, change Allow: / to Disallow: / in this group.
  4. The group * applies to all other crawlers. Googlebot and Bingbot get these rules.
  5. The content signal tells the use of the content. ai-train=no refuses training, and ai-input=yes permits an assistant to use a page in an answer. Cloudflare publishes this format. A crawler that does not know the line ignores it.
  • Test the file. Paste it into the robots.txt tester with the paths of your site. The tester uses the parser of polite-crawler, which follows RFC 9309.
  • Read the documentation of each company. The companies tell how each agent reads robots.txt. Some state that an agent that acts for a person does not always obey it.
  • Know the limits. A robots.txt is a request. It does not stop a crawler that ignores it. To stop such a crawler, block it on the server or at the edge.
  • Add new agents. Companies start new crawlers. Read your server logs, and add a new training crawler to the first group.

The MCP server of polite-crawler fetches a page for an assistant. It obeys the group for its own token, PoliteCrawler, and the group for Claude-User. With this file, both groups permit each page except /account/, so the server reads each of these pages. About PoliteCrawler.