Blocking AI crawlers takes three layers: a robots.txt that tells the honest bots what you want, verification so you can tell real crawlers from impostors, and enforcement at your CDN or firewall for the bots that don’t ask. This guide covers each one, with the exact rules.
Before you start, decide what you’re blocking. “AI crawlers” covers four different jobs, and most operators now run a separate bot for each:
- Training crawlers collect pages in bulk to train models: GPTBot, ClaudeBot, CCBot, Meta-ExternalAgent, Amazonbot, Bytespider.
- AI search crawlers index pages so an answer engine can cite and link them: OAI-SearchBot, Claude-SearchBot, PerplexityBot.
- User-triggered fetchers load one page because a person asked an assistant about it: ChatGPT-User, Claude-User, Perplexity-User.
- Control tokens aren’t crawlers at all. Google-Extended and Applebot-Extended tell Google and Apple not to use what their regular crawlers fetch for AI, without touching search.
A common middle ground is to block training and allow search and user fetches, so your pages can still be cited, with a link, in AI answers. In our study of 100 major websites, 11 sites did exactly that with OpenAI’s bots. The full list of bots, with each operator’s own description, is in the bot directory.
Step 1: robots.txt
Add one group per bot you want to keep out. This blocks the main training crawlers and the two control tokens, and leaves search engines and AI search alone:
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: CCBot
User-agent: meta-externalagent
User-agent: Amazonbot
User-agent: Bytespider
User-agent: Google-Extended
User-agent: Applebot-Extended
Disallow: /
Several User-agent lines in a row form one group, so the single Disallow: / applies to all of them. Two rules from RFC 9309 catch people out:
- A named group replaces your
User-agent: *rules for that bot. If your*group hides/admin/, a bot with its own group won’t see that rule unless you repeat it. - The most specific path wins.
Allow: /blog/beatsDisallow: /for pages under/blog/, whatever order the lines are in.
The robots.txt generator writes the groups for whichever bots you tick, and the checker shows how any live file treats each bot.
What robots.txt can’t do
robots.txt is a request. It works on bots whose operators promise to follow it, and only from their next visit.
- User-triggered fetchers may ignore it. OpenAI says its robots.txt rules may not apply to ChatGPT-User, Perplexity says Perplexity-User generally ignores robots.txt, and Google says the same of its user-triggered fetchers. Anthropic says Claude-User does follow it. Each bot’s page in the directory quotes its operator.
- Some operators don’t document anything. ByteDance publishes no documentation for Bytespider that we could find, so a robots.txt rule is a hope, not a contract.
- Scrapers ignore it entirely, and they usually send a browser user agent, so they don’t look like crawlers at all.
- It isn’t retroactive. Pages already collected stay collected.
Step 2: verify, then enforce at the edge
To enforce a decision you have to block requests, and to block the right ones you need to know who sent them. A user agent proves nothing: anyone can claim to be GPTBot. What does prove it:
- Published IP ranges. OpenAI, Anthropic, Perplexity, Google, Amazon, Common Crawl and others publish the addresses their bots use. Each bot’s directory page links its list.
- Reverse DNS with a forward check, for operators that document a hostname, like Googlebot’s
googlebot.com. - Signed requests. Web Bot Auth lets a bot sign each request so you can check it cryptographically. It’s still an IETF draft, but some AI agents already use it.
Our bot IP verifier runs the first two checks on an address from your logs.
Once you can identify them, block at your CDN, WAF or load balancer: a rule that matches the bot’s user agent and its published IPs, so a real crawler is blocked and a fake one is caught by your bot detection instead. Most bot management products and several CDNs now ship ready-made AI crawler categories, some with options to charge instead of block. The AI crawler blocking rankings compare them, and charging AI crawlers covers the pay-per-crawl option.
Step 3: catch the ones that pretend to be browsers
Scrapers that collect content for AI training without declaring themselves look like ordinary visitors: a Chrome user agent, a residential IP. Stopping them is the job of bot detection, which checks whether the client really is the browser it claims to be (TLS fingerprints, headless browser signals, behavior) instead of trusting what it says. See how headless browser detection works and the bot management rankings.
Step 4: check your work
- Run your domain through the robots.txt checker after every change.
- Look for the bots’ user agents in your access logs a week later. A declared training crawler that keeps fetching blocked pages either isn’t reading your current file or isn’t the real bot: put its IP through the verifier.
- Review the list a few times a year. New bots keep launching under new names, and in our study the newest ones were almost never named in anyone’s robots.txt.