· Guides
Block AI training, stay in AI answers: a robots.txt guide for GPTBot, ClaudeBot and friends
OpenAI, Anthropic and Google each run separate bots for training, search and live answers. Which ones to allow, which to block, a robots.txt you can copy, and how to check that the bots actually listen.
By FlarePanel team
“Should we block AI bots?” used to be a yes-or-no question. It is not anymore. A training crawl and a person asking ChatGPT about your product are very different things, and the large operators now give each its own user agent. That lets you say no to one and yes to the other.
The bots, by what they are for
From each operator’s own documentation (OpenAI, Anthropic, Google):
- Training:
GPTBot(OpenAI),ClaudeBot(Anthropic),Google-Extended(Gemini training and grounding, a robots.txt token rather than a separate crawler),CCBot(Common Crawl, used by many model makers),Applebot-Extended(Apple). - AI search indexing:
OAI-SearchBot(ChatGPT search),Claude-SearchBot,PerplexityBot. Blocking these makes it harder for the assistant to find and cite you. - Fetches a person asked for:
ChatGPT-User,Claude-User,Perplexity-User. These run when someone asks the assistant about a page right now. They are the closest thing to a visit.
Two things often catch people out. First, Google-Extended does not control AI Overviews: those are part of Search and follow your Googlebot rules and snippet settings. Blocking Googlebot to stay out of AI Overviews would remove you from Google entirely. Second, OpenAI says robots.txt may not apply to ChatGPT-User, because a person asked for the page.
A robots.txt you can start from
This blocks training and allows search and answers. Adjust it to your own position; there is no right answer for every site.
# Training: no
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: CCBot
User-agent: Applebot-Extended
Disallow: /
# AI search and live answers: yes
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /
# Everyone else, including Googlebot and Bingbot
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xmlRobots.txt applies per host, so docs.example.com needs its own file. OpenAI notes that its systems can take about a day to pick up a change.
On Cloudflare? You can enforce it
Robots.txt only states a preference. If your site is proxied through Cloudflare, AI Crawl Control (available on every plan) lists the AI crawlers hitting your zone and lets you block each one with a WAF rule. It can also manage your robots.txt for you and show which crawlers ignore it. Cloudflare itself reminds you that robots.txt compliance is voluntary; a block rule is not.
Then check that it worked
Blocking is a guess until you can see what happens. What you want to know, week by week:
- Which AI bots still request pages, and which ones stopped.
- Whether the bots you allowed get 200s, or 403s and 404s because a firewall rule or a broken link got in the way.
- Whether the answer bots are fetching the pages you care about, and whether those pages then get visits from chatgpt.com or perplexity.ai.
Your analytics script cannot answer any of this, because crawlers do not run JavaScript. FlarePanel records them where the page is served: connect your Cloudflare zone with a read-only token, or add a few lines to your Worker or server. Each hit is sorted into AI answers, AI search, AI training, search engines or other, with the pages it read and any errors. The setup is in how to see which AI crawlers read your site, and the visits that follow are covered in how to track visitors from ChatGPT and Perplexity.
Create a project to try it; the first 30 days are free.
Questions
- How do I block AI training crawlers but stay in ChatGPT and Claude answers?
- Block the training bots (GPTBot, ClaudeBot, Google-Extended, CCBot) in robots.txt and allow the search and user bots (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User). Each company uses a separate user agent for each purpose, so you can treat them differently.
- Does blocking Google-Extended remove my site from AI Overviews?
- No. Google-Extended controls whether content is used for Gemini training and grounding outside Search. AI Overviews and AI Mode are part of Google Search, which is controlled by Googlebot rules and snippet settings such as nosnippet.
- Do AI crawlers respect robots.txt?
- The large operators say their crawlers do, but robots.txt is voluntary. OpenAI says robots.txt rules may not apply to ChatGPT-User, because a person asked for the page. To be sure, check your server or Cloudflare logs for the bots you blocked, or enforce the block with Cloudflare AI Crawl Control.