Blog
Which AI crawlers to block in robots.txt, and which to keep
How to block AI training bots like GPTBot, ClaudeBot, Google-Extended and CCBot in robots.txt without dropping out of AI search answers. Copy-ready rules, the common mistake, and how to check.
Last updated
To keep AI tools from training on your site but still be cited in AI search answers, block the training crawlers (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, Meta-ExternalAgent, CCBot) and allow the search crawlers (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot). One blanket rule that blocks every AI bot is the most common mistake: it also removes you from the answers that send visitors.
Two kinds of AI crawler
- AI search and assistant crawlers fetch a page when someone asks a question, then quote it and link to it as a source. Blocking them means those tools can't cite you.
- AI training crawlers collect text to train models. Blocking them doesn't stop AI search from citing you, because search uses the other crawlers.
Each AI company publishes separate names for the two jobs, which is why you can choose.
| Crawler | Used for | Block it? |
|---|---|---|
| OAI-SearchBot | ChatGPT search results | Keep, if you want ChatGPT to cite you |
| ChatGPT-User | Pages a ChatGPT user asks it to open | Keep |
| GPTBot | Training OpenAI models | Your choice |
| Claude-SearchBot | Claude search results | Keep |
| Claude-User | Pages a Claude user asks it to open | Keep |
| ClaudeBot | Training Anthropic models | Your choice |
| PerplexityBot | Perplexity answers | Keep |
| Google-Extended | Gemini training. Not Google Search or AI Overviews | Your choice |
| Applebot-Extended | Apple model training. Applebot itself serves Siri and Spotlight | Your choice |
| Meta-ExternalAgent | Meta AI training | Your choice |
| CCBot | Common Crawl, a public dataset many models train on | Your choice |
Never block Googlebot or Bingbot to keep AI out. Googlebot feeds Google Search and AI Overviews; Bingbot feeds Bing, Copilot and DuckDuckGo's web results.
Copy-ready robots.txt: allow AI search, block AI training
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
# AI search and assistant crawlers: allowed
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
Disallow: /wp-admin/
Allow: /
# AI training crawlers: blocked
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Meta-ExternalAgent
User-agent: CCBot
Disallow: /
Sitemap: https://example.com/sitemap.xmlChange the folders and sitemap to match your site, or build the file with the free robots.txt generator for AI crawlers, which lets you pick per bot.
Three mistakes that hide sites from AI answers
- "Block all AI" switches. Some hosting panels, CDNs and security plugins offer one switch that blocks every AI bot, search crawlers included. If you use one, check what it covers.
- Forgetting that a named group replaces the * group. A crawler follows only the most specific group that names it. If you give OAI-SearchBot its own group with just "Allow: /", it ignores your other Disallow lines. Repeat the folders it should skip.
- A firewall that blocks before robots.txt. Bot protection can return errors to AI crawlers even when robots.txt allows them. You won't see that in the file; check your host or CDN bot settings if AI tools never cite you.
Should you block AI training at all?
It depends on what the site is for. A publisher or course creator whose text is the product often blocks training. A local business, shop or SaaS that wants to be recommended usually gains little from blocking and may prefer to allow everything. Either way, keep the search crawlers open if you want to appear in AI answers. Our guide to LLM SEO covers what else helps you get cited, and generative engine optimization mistakes lists the other errors that keep sites out of AI answers.
Check your live robots.txt
After you upload the file, run the free AI crawler checker. It reads your live robots.txt and shows, for 14 AI crawlers, which ones may read your homepage, and checks for noindex and JavaScript-only pages. Add an llms.txt file too, so AI tools that read it get a clean summary of your site.