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-agent | Company | Used for |
|---|---|---|
GPTBot | OpenAI | Collecting data for model training |
OAI-SearchBot | OpenAI | Search results inside ChatGPT |
ChatGPT-User | OpenAI | Fetching a page when a user asks ChatGPT to |
ClaudeBot | Anthropic | Collecting data for model training |
Claude-SearchBot | Anthropic | Search results inside Claude |
Claude-User | Anthropic | Fetching a page when a user asks Claude to |
PerplexityBot | Perplexity | Perplexity's search index |
Perplexity-User | Perplexity | Fetching a page when a user asks |
Google-Extended | A control token for Gemini training and grounding. It does not affect Google Search or AI Overviews, which use Googlebot. | |
Applebot-Extended | Apple | A control token for Apple model training |
CCBot | Common Crawl | An open web archive that many models are trained on |
meta-externalagent | Meta | Meta AI training and answers |
Bingbot | Microsoft | Bing 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,
Allowwins. 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.