Home / Guides / robots.txt for AI crawlers: which bots to allow and which to block
robots.txt for AI crawlers: which bots to allow and which to block
AI companies run several different kinds of crawler. Treating them all the same is the most common robots.txt mistake.
Published 2026-12-02. By hackerdb.
Three kinds of AI crawler
| Kind | What it does | Example user-agent tokens* |
|---|---|---|
| Search | Builds an index used to find sources for answers | OAI-SearchBot, Claude-SearchBot, PerplexityBot |
| User-requested fetch | Loads a page because a person asked an assistant about it | ChatGPT-User, Claude-User, Perplexity-User |
| Training / dataset | Collects pages to train models or build datasets | GPTBot, ClaudeBot, CCBot; control tokens Google-Extended and Applebot-Extended |
*Vendors rename and add tokens. Check each vendor's current crawler documentation before you deploy.
Decide two questions separately
Do you want to appear in AI answers? Then allow the search and user-requested crawlers. Do you want your content used for training? That is your call, and several vendors let you opt out without leaving their search products.
Example: be citable, opt out of training
User-agent: * Allow: / User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: Google-Extended Disallow: / Sitemap: https://example.com/sitemap.xml
The default group allows everything else, including the search and fetch crawlers.
What robots.txt cannot do
- It is a request. Well-behaved crawlers honour it; others may not. For enforcement use your CDN or firewall.
- It does not remove content already collected.
- Blocking everything "to be safe" removes you from the answers you might want to be in.
Test it
Use the free checker: it shows, for each major AI and search crawler, whether your robots.txt allows the path you tested.