AI crawlers in robots.txt

AI companies run several crawlers each, and they do different jobs. Some collect training data; others fetch pages so the assistant can cite you in an answer. You can treat them differently in robots.txt.

The main user-agents

User-agentCompanyUsed for
GPTBotOpenAICollecting data for model training
OAI-SearchBotOpenAISearch results inside ChatGPT
ChatGPT-UserOpenAIFetching a page when a user asks ChatGPT to
ClaudeBotAnthropicCollecting data for model training
Claude-SearchBotAnthropicSearch results inside Claude
Claude-UserAnthropicFetching a page when a user asks Claude to
PerplexityBotPerplexityPerplexity's search index
Perplexity-UserPerplexityFetching a page when a user asks
Google-ExtendedGoogleA control token for Gemini training and grounding. It does not affect Google Search or AI Overviews, which use Googlebot.
Applebot-ExtendedAppleA control token for Apple model training
CCBotCommon CrawlAn open web archive that many models are trained on
meta-externalagentMetaMeta AI training and answers
BingbotMicrosoftBing search, which also feeds Copilot answers

Companies add and rename crawlers. Check each company's crawler documentation before relying on a rule.

Allow AI search, block training

A common middle ground: let assistants find and cite your pages, but opt out of training.

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

Search and user-triggered crawlers (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, PerplexityBot) fall through to User-agent: * and are allowed.

How robots.txt matching works

  • A crawler uses the group that names it. Only if no group names it does it use User-agent: *. Rules from * do not add to a named group.
  • Within a group, the longest matching path wins. On a tie, Allow wins.
  • Disallow: with nothing after it allows everything.
  • If robots.txt returns a 5xx error, many crawlers stop crawling until it is fixed. A 404 means everything is allowed.

robots.txt is not the only switch

CDNs and firewalls can block AI crawlers before they ever read robots.txt. Cloudflare, for example, has a setting to block AI bots, and some hosting plans turn similar rules on by default. If a crawler is allowed in robots.txt but your pages still never show up in an assistant's answers, check those settings too.

Check how your robots.txt treats each crawler

SchemaOK Pro, $9/mo

Pro is not built yet. We are checking whether enough people want it before we build it. Leave your email and we will write once, when it is ready.

One email when Pro launches. No newsletter. Privacy