robots.txt for AI Bots: Block or Allow?
AI companies send two different kinds of bots to your site. Some collect pages to train models; others fetch pages so ChatGPT, Claude or Perplexity can answer a question and link to you. Blocking the first is a reasonable choice. Blocking the second, often by accident, quietly removes you from AI search.
Website & SEO · 2026-11-26 · 7 min read
Training bots vs AI search bots
| Bot (user-agent) | Company | What it is for |
|---|---|---|
| GPTBot | OpenAI | Collecting content to train models |
| OAI-SearchBot | OpenAI | Finding pages to show and link in ChatGPT search |
| ClaudeBot | Anthropic | Collecting content to train models |
| PerplexityBot | Perplexity | Indexing pages for Perplexity answers |
| Google-Extended | Using content for Gemini; does not affect Google Search | |
| CCBot | Common Crawl | An open web archive that many AI models are trained on |
| Googlebot / Bingbot | Google / Microsoft | Classic search (Bing also feeds several AI assistants) |
Companies add and rename bots from time to time, so check each company’s crawler page before you rely on a name. The rule of thumb stays the same: training bots use your content to build models; search bots bring people back to your site.
Block AI training, keep AI search
This is the most common choice for publishers and businesses that want visibility but not model training:
# Keep content out of model training
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: CCBot
Disallow: /
# Search and AI search stay allowed
User-agent: *
Allow: /
Sitemap: https://yoursite.com/sitemap.xmlAllow everything (most small businesses and SaaS)
If you want to be found and quoted everywhere, the simplest file is enough. Bots that are not named follow the “*” group.
User-agent: *
Allow: /
Sitemap: https://yoursite.com/sitemap.xmlHow robots.txt decides
- A bot follows the group with its own name if there is one, and ignores the “*” group in that case.
- Inside the group, the longest matching rule wins; if an Allow and a Disallow are equally long, Allow wins.
- “*” matches anything and “$” marks the end of the address, so “Disallow: /*.pdf$” blocks PDF files only.
- robots.txt is a request, not a lock: well-behaved bots follow it, but it does not hide private pages.
Tip: A frequent mistake: giving a bot its own group to block one folder, and forgetting it then ignores every rule in the “*” group. Repeat the rules it still needs.
The block you did not choose
Your robots.txt can allow every bot while your hosting turns them away. CDNs and firewalls (for example Cloudflare’s “Block AI bots” setting, or aggressive bot protection) can refuse AI crawlers at the server, before robots.txt is ever read. If you never appear in ChatGPT or Perplexity answers, check this first.
Check it in one minute
The free AI-Readiness Checker reads your robots.txt the way the bots do, draws a map of which search and AI bots may read each section of your site, tests whether a bot’s name alone gets refused, and suggests the exact lines to add.
Check which bots can read your site →
Frequently asked questions
Does blocking GPTBot remove my site from ChatGPT?
Not from ChatGPT search: that uses OAI-SearchBot. Blocking GPTBot keeps your content out of OpenAI model training.
Does blocking Google-Extended hurt my Google rankings?
No. Google says Google-Extended only controls use in Gemini models and does not affect Google Search.
Do AI bots respect robots.txt?
The major companies say their named crawlers follow it. robots.txt is still voluntary, so use logins or firewall rules for anything private.
Where is robots.txt?
Always at the root: https://yoursite.com/robots.txt. A robots.txt in a subfolder is ignored.