HOW-TO GUIDE · 04 / 06
How to allow and block AI bots in robots.txt
Steps for writing the right robots.txt rule once you know the difference between GPTBot, OAI-SearchBot, PerplexityBot, ClaudeBot and Google-Extended.
- Steps
- 5
- Time
- 50min
- Reading time
- 3min
- 1Split the bots into three classes10 min
- 2Make your decision10 min
- 3Write the robots.txt file15 min
- 4Check the server and CDN side15 min
- 5Watch the errors
0 / 10 done
Figure · What you end up with
Three postures, ten bots
Pick a posture and every bot flips to allowed or blocked.
- OAI-SearchBot OpenAI Search indexer AllowBlock
- PerplexityBot Perplexity Search indexer AllowBlock
- Claude-SearchBot Anthropic Search indexer AllowBlock
- Googlebot Google Search indexer AllowBlock
- ChatGPT-User OpenAI User-triggered * AllowBlock
- GPTBot OpenAI Training AllowBlock
- ClaudeBot Anthropic Training AllowBlock
- Google-Extended Google Training AllowBlock
- CCBot Common Crawl Training AllowBlock
- Bytespider ByteDance Training AllowBlock
* ChatGPT-User: no longer obeys robots.txt
You allow both search indexers and training bots. Choose this if visibility is a big priority.
Full access for search indexers, closed to training bots: you keep appearing in answers and your content stays out of model training. Right for most brands.
Everything blocked. Not recommended outside publishers with high copyright sensitivity; it means leaving AI search entirely.
3 min
The most expensive mistake here is treating them all as one thing and blocking the lot. Some bots decide your visibility, others only affect training data. Know the difference before you decide.
1. Split the bots into three classes (10 minutes)
Similarweb’s log analysis splits the bots like this:
| Bot | Owner | Class | What happens if I block it |
|---|---|---|---|
OAI-SearchBot |
OpenAI | Search indexer | You do not appear in ChatGPT’s search results |
PerplexityBot |
Perplexity | Search indexer | You are not a source in Perplexity answers |
Claude-SearchBot |
Anthropic | Search indexer | You do not appear in Claude’s search-backed answers |
Googlebot |
Search indexer | You drop out of Google and AI Overviews | |
ChatGPT-User |
OpenAI | User-triggered | The page is fetched when a user has your link opened |
GPTBot |
OpenAI | Training | Affects model training only, not citations |
ClaudeBot |
Anthropic | Training | Affects model training only |
Google-Extended |
Training | Affects Gemini training, not Google search | |
CCBot |
Common Crawl | Training | You stay out of open data sets |
Bytespider |
ByteDance | Training | Training only |
Two notes. According to OpenAI’s documentation dated 9 December 2025, ChatGPT-User no longer obeys robots.txt rules, so trying to block it may have no effect. And Google-Extended is not a crawler at all, it is a preference switch deciding whether the data Googlebot collects is used in training.
The practical value of the distinction is this: a tool warning that “GPTBot is blocked, your AI visibility is at risk” is wrong. A GPTBot block affects training data, not your citations today. The class that determines visibility is the search indexers.
2. Make your decision (10 minutes)
Three common postures:
- Open. You allow both search indexers and training bots. Choose this if visibility is a big priority for you.
- Balanced (right for most brands). Full access for search indexers, closed to training bots. You keep appearing in answers and your content stays out of model training.
- Closed. Everything blocked. Not recommended outside publishers with high copyright sensitivity; it means leaving AI search entirely.
3. Write the robots.txt file (15 minutes)
The example below implements the “balanced” posture. Put it in the robots.txt file at your root directory.
# Search indexers: open, so you appear in answers
User-agent: Googlebot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Claude-SearchBot
Allow: /
# User-triggered: runs when a user has the link opened
User-agent: ChatGPT-User
Allow: /
# Training crawlers: keep the content out of model training
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Bytespider
Disallow: /
# Shared rules for all bots
User-agent: *
Disallow: /cart/
Disallow: /account/
Disallow: /search
Allow: /
Sitemap: https://yourdomain.com/sitemap.xml
Three rules: every User-agent block is written separately with a blank line between blocks; bot names are not case sensitive but keep the spelling in the example; the most specific matching block wins, so the block you write for GPTBot overrides the User-agent: * block.
4. Check the server and CDN side (15 minutes)
Allowing something in robots.txt is not enough, the server has to actually answer. CDNs like Cloudflare can have a “block AI bots” setting on by default, and it overrides your robots.txt.
Test it:
curl -A "OAI-SearchBot" -I https://yourdomain.com/important-page
curl -A "PerplexityBot" -I https://yourdomain.com/important-page
You are expecting 200. If you get a 403 or a verification page, allowlist these bots from your CDN panel.
5. Watch the errors (monthly)
AI crawlers send 3.6 times more requests than traditional search bots, and the 404, 429 or 5xx responses those requests get mean missed citations directly. Filter the user agents above in your server logs and review the addresses returning error codes once a month.
There is an invisible block too: if your content arrives only via JavaScript, the page is empty for the bot. Open the page with JavaScript disabled and confirm the main text is there.
When you change a rule, note the date. When you block a bot and see a visibility drop a few weeks later, that record is the only way to tell whether the cause was content or access. The same goes the other way: note the date when you allowlist a new bot, so you can measure the effect.
Checklist
- Are the search indexers open?
- Is your decision on training bots a deliberate one?
- Does the CDN setting contradict robots.txt?
- Do the
curltests return 200? - Is the sitemap line in the file?
See where your brand stands in AI answers
Zeo Radar puts the questions your buyers ask to five engines, records every answer and the sources behind it, then ranks what to fix first. Start with a free report on your own domain.
No credit card required. Cancel any time.