robots.txt for AI crawlers: how to allow or block them
A few lines in robots.txt decide whether AI companies may read your site. The names matter, because each company runs several crawlers that do different jobs.
Key points
- Each AI company runs separate crawlers for training, search and live requests.
- You can block training and still appear in AI search.
- robots.txt is a request. Reputable crawlers follow it, and it is not a security control.
- Check your firewall too. It can block crawlers that robots.txt allows.
What robots.txt does
robots.txt is a plain text file at the root of your site, for example yourbrand.com/robots.txt. It tells crawlers which parts of the site they may visit. Each group starts with a User-agent line naming a crawler, followed by Allow and Disallow rules.
It is a request, not a lock. The well-known crawlers honour it. Anything private needs a login, not a robots rule.
The crawlers, and what each one does
| Company | User-agent | Purpose |
|---|---|---|
| OpenAI | GPTBot | Collects pages to train models |
| OpenAI | OAI-SearchBot | Indexes pages for ChatGPT search |
| OpenAI | ChatGPT-User | Fetches a page when a person asks about it |
| Anthropic | ClaudeBot | Collects pages to train models |
| Anthropic | Claude-SearchBot | Indexes pages for search in Claude |
| Anthropic | Claude-User | Fetches a page when a person asks about it |
| Perplexity | PerplexityBot | Indexes pages for Perplexity answers |
| Google-Extended | Controls use in Gemini models. It is a robots.txt token, not a separate crawler | |
| Apple | Applebot-Extended | Controls use of Applebot’s data for AI training |
| Common Crawl | CCBot | Builds an open dataset that many AI developers use |
Names change and new crawlers appear. Each company publishes its current list, so check the source before relying on a rule.
Allow everything
If you want to be read, cited and used, you need no special rules. An open file is enough.
User-agent: *
Allow: /
Sitemap: https://yourbrand.com/sitemap.xmlBlock training, stay in AI search
This is the common middle position: your pages may be found and cited in answers, but not collected for model training.
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
User-agent: *
Allow: /OAI-SearchBot, Claude-SearchBot and PerplexityBot are not named, so they fall under the open rule and can still index you for search.
Block everything AI
You can name every crawler and disallow them all. Be clear about the cost: assistants that cannot read your pages cannot cite them, and your brand will be described from what others say about you.
User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /Google-Extended does not affect Google Search. Google says AI Overviews follow the ordinary Search controls, so blocking Google-Extended will not remove you from them.
Common mistakes
- A firewall that overrides the file. Bot protection at your host or CDN can block AI crawlers even when robots.txt allows them. Check both.
- An old blanket rule. A “Disallow: /” left over from a staging site blocks everyone.
- Blocking the wrong crawler. Blocking OAI-SearchBot when you meant GPTBot removes you from ChatGPT search.
- Expecting privacy. robots.txt is public and voluntary. It hides nothing.
How to check yours
- Open yourbrand.com/robots.txt in a browser and read it.
- Look for each crawler name in the table above.
- Check the bot settings at your CDN or host for AI crawler rules.
- Look in your server logs for visits from these user-agents.
Our free audit reads your robots.txt and tells you which AI crawlers may read the page. Run it.
Want this done for you?
This is the work inside our generative engine optimization service.