Are you blocking ChatGPT by accident? A robots.txt guide for AI crawlers
AI companies send different bots for training and for search. You can say no to one and yes to the other. Here's which bots matter, how to check what you're blocking, and how to fix it on WordPress, Shopify, Drupal and headless sites.
Short answer: allow the AI search bots, decide on the training bots, and check your CDN or firewall as well as your robots.txt. A lot of sites that “blocked AI” a year or two ago also blocked themselves out of ChatGPT and Claude search results without meaning to. We rate this Do it now: it takes ten minutes to check.
Which AI bots should I allow, and which can I block?
The big AI companies now run separate bots for separate jobs. One collects pages to train models. Another builds a search index so the assistant can cite you. A third fetches a page live when a user asks about it. Each has its own name in robots.txt, so you can treat them differently.
| Bot (robots.txt name) | Company | What it does | Our recommendation |
|---|---|---|---|
OAI-SearchBot |
OpenAI | Indexes pages for ChatGPT search answers | Allow |
GPTBot |
OpenAI | Collects pages for model training | Your call |
ChatGPT-User |
OpenAI | Fetches a page when a ChatGPT user asks for it | Allow (robots.txt may not apply anyway) |
Claude-SearchBot |
Anthropic | Indexes pages for Claude’s search results | Allow |
ClaudeBot |
Anthropic | Collects pages for model training | Your call |
Claude-User |
Anthropic | Fetches a page when a Claude user asks for it | Allow |
PerplexityBot |
Perplexity | Indexes pages for Perplexity answers. Perplexity says it isn’t used for training | Allow |
Perplexity-User |
Perplexity | Fetches a page when a Perplexity user asks for it | Allow (it generally ignores robots.txt) |
Googlebot |
Crawls for Search, including AI Overviews and AI Mode | Allow, always | |
Google-Extended |
Not a crawler. A token that controls use in Gemini training and grounding | Your call | |
CCBot |
Common Crawl | Builds an open web archive that many AI models train on | Your call |
Sources: OpenAI’s crawler docs, Anthropic’s crawler docs, Perplexity’s bot docs and Google’s common crawlers list.
Three details that trip people up:
- Google has no separate AI search bot. AI Overviews and AI Mode use the normal Googlebot crawl. Google says Google-Extended “does not impact a site’s inclusion in Google Search,” and that you don’t need any special files or markup to appear in its AI features (Google’s AI features guide). If you block Googlebot, you’re out of Google entirely.
- The “user” bots play by different rules. OpenAI says robots.txt rules “may not apply” to ChatGPT-User because a person asked for the page. Perplexity says Perplexity-User “generally ignores robots.txt rules.” Anthropic says its bots, Claude-User included, respect robots.txt. Blocking these in robots.txt is mostly symbolic.
- Each bot needs its own rule. A rule for one bot never covers another, so a
ClaudeBotrule doesn’t touchClaude-SearchBot. Older names likeanthropic-aiandClaude-Webaren’t in Anthropic’s current docs, so rules for them probably do nothing.
How do I check what I’m blocking right now?
Two checks, five minutes each.
1. Read your robots.txt.
curl -s https://yoursite.com/robots.txt
Look for User-agent lines naming any of the bots above, followed by Disallow: /. Also look at the User-agent: * group. A bot that has its own group ignores the * group entirely, and a bot without its own group follows *. So User-agent: * with Disallow: / blocks every AI search bot you haven’t named.
2. Check that the bots can actually reach your pages.
robots.txt is a polite request. A CDN, firewall or security plugin can refuse the request before the bot reads anything. This loop asks for your homepage as each bot would and prints the HTTP status:
for ua in OAI-SearchBot GPTBot ChatGPT-User Claude-SearchBot ClaudeBot PerplexityBot; do
printf "%-18s " "$ua"
curl -s -o /dev/null -w "%{http_code}\n" -A "Mozilla/5.0 (compatible; $ua)" https://yoursite.com/
done
200 means the page loaded. 403, 429 or 503 usually means something is blocking that bot. One caveat: some firewalls check whether a request really comes from the bot’s published IP addresses, so a fake user agent from your laptop can be treated differently from the real bot. If the results look odd, check your firewall or CDN logs for real visits from these bots.
Or skip the terminal: our free AI audit checks robots.txt rules and bot access for you.
What should my robots.txt say?
Here’s a starting point that allows AI search and opts out of training. If you’re happy for your content to be used in training, delete the second group.
# AI search: allow, so assistants can find and cite you
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Allow: /
# AI training: opt out (delete this group to opt in)
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: CCBot
Disallow: /
# Everyone else, including Googlebot
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://yoursite.com/sitemap.xml
Because named bots skip the * group, any Disallow lines you rely on (admin pages, cart and checkout, internal search) need repeating in the AI search group if you want those bots kept out too. The /wp-admin/ lines above are a WordPress example; use your own.
OpenAI says robots.txt changes for OAI-SearchBot take about 24 hours to apply. Other bots don’t publish a timeline.
Fixing it on your platform
WordPress
WordPress serves a virtual robots.txt unless a real robots.txt file sits in the site root. If a physical file exists, it wins, and your SEO plugin’s settings for robots.txt are ignored.
- Edit it in your SEO plugin. Yoast has a robots.txt editor under Yoast SEO, Tools, File editor. Rank Math has one under General Settings, Edit robots.txt.
- Check your security plugin and host. Security plugins, host-level firewalls and “block bad bots” lists can block AI crawlers by name. Look for bot-blocking or rate-limiting settings and test with the loop above.
- Check “Discourage search engines.” Under Settings, Reading. If it’s ticked on a live site, fix that first.
Shopify
Shopify generates robots.txt for you. To change it, add a robots.txt.liquid template to your theme (Online Store, Themes, Edit code, Add a new template, robots). Shopify recommends adding rules with Liquid rather than replacing the file with plain text, so Shopify can keep its default rules up to date. Shopify Support won’t help with edits, and deleting the template restores the default.
Shopify also manages bot traffic at its own network layer, separate from robots.txt. If you put Cloudflare in front of a Shopify store, check Cloudflare’s settings too.
Drupal
Drupal ships a real robots.txt file in the web root. The gotcha: on Composer-managed sites, core’s scaffold step can overwrite it on every core update, silently undoing your AI rules. Either use the scaffold’s append option in composer.json to add your rules on every build, or use the RobotsTxt module to manage the file from the admin UI (delete the physical file first, or the module’s version is never served).
Headless and static sites
robots.txt is usually a static file in your public/ folder, or a route your framework generates. Make sure the deployed file matches what’s in the repo: preview deploys and staging environments often add Disallow: / and occasionally ship it to production.
Cloudflare and other CDNs
This is where most accidental blocks happen. Cloudflare has changed its AI bot settings several times. In mid-2025 it started blocking AI crawlers by default on new domains. Its current docs describe separate policies for Search, Agents and Training bots, each set to Allow, Block or Block on pages with ads, with Allow as the default for new domains. Cloudflare can also add AI rules to your robots.txt for you (managed robots.txt), so the file you edited may not be the file bots see.
Don’t assume your settings match the current defaults. Open Security, Settings, Bot traffic, and check each policy. Other CDNs and WAFs (Fastly, Akamai, Sucuri, your host’s firewall) have their own bot rules. Run the curl loop to see the result.
Does blocking AI training bots hurt my visibility?
Not according to the companies running them. OpenAI, Anthropic and Google all say their training controls are separate from search. Blocking GPTBot doesn’t remove you from ChatGPT search, and blocking Google-Extended doesn’t affect Google Search or AI Overviews.
The tradeoff is longer term. Models learn what they know about your brand partly from training data. If you opt out, future models may know less about you without looking you up. Nobody has good data on how much that matters yet, so treat it as a judgment call, not a ranking factor. Publishers protecting paid content have a clear reason to opt out. A local service business that wants to be recommended probably doesn’t.
Our verdict: Do it now
Check your robots.txt and your CDN today. Allow OAI-SearchBot, Claude-SearchBot, PerplexityBot and Googlebot. Decide on training bots on purpose, write the decision into robots.txt, and recheck your CDN settings whenever your provider announces a change.
Not sure what your site is blocking? Run the free AI audit, or ask us and we’ll look.