AI search

Should you block AI crawlers? A robots.txt guide to each bot

Which AI bots to block or allow in robots.txt, the rules to use, what each block costs you, and how to enforce it in Cloudflare.

// in this article

Most small business sites should not block AI crawlers that power search and citations, because blocking them removes you from the answers you want to appear in. Blocking training crawlers is a separate choice, and it depends on whether you mind your content being used to train models.

The two goals pull in opposite directions, which is why a blanket block or a blanket allow is usually wrong. Treat each bot according to what it does.

The bots, grouped by purpose

Company names and bot names change, so check each vendor’s documentation before you edit anything. At the time of writing, the main groups are:

Training Collects pages that may train future models. GPTBot, ClaudeBot
Search and citation Indexes pages so an AI product can link to them. OAI-SearchBot
User-triggered Opens a page because a person asked about it. ChatGPT-User
fig 1 · three jobs, three different decisions

Training crawlers. These collect content to train models. OpenAI’s GPTBot, Anthropic’s ClaudeBot and Common Crawl’s CCBot are examples. Blocking them affects future training use of your pages, not past use.

Search and citation crawlers. These index pages so an AI product can cite them in answers. OpenAI’s OAI-SearchBot, Anthropic’s Claude-SearchBot and Perplexity’s PerplexityBot are examples. Blocking them can keep your site out of those products’ answers.

User-triggered fetchers. These load a page because a person asked an AI tool about it. ChatGPT-User, Claude-User and Perplexity-User are examples. OpenAI says robots.txt rules may not apply to ChatGPT-User, and Perplexity says its fetcher generally ignores them, because a person requested the visit. Anthropic says its bots honor robots.txt, so blocking Claude-User stops Claude fetching your pages for those questions.

Google’s control token. Google-Extended is a robots.txt token that lets you manage whether content Google crawls may be used to train future Gemini models. Google’s documentation also lists grounding, which means supplying Search index content to Gemini at prompt time. It says Google-Extended does not affect inclusion in Google Search and is not a ranking signal. That page does not mention AI Overviews or AI Mode, so do not assume the token controls them.

Each vendor documents its own bots:

Purpose Example user-agents If you block
Training GPTBot, ClaudeBot, CCBot, Google-Extended Your pages are not used for future training
Search and citation OAI-SearchBot, Claude-SearchBot, PerplexityBot You may not be cited in that product
User-triggered ChatGPT-User, Claude-User, Perplexity-User Depends on the vendor: robots.txt may not stop these fetches
Normal search Googlebot, Bingbot You disappear from search results

What robots.txt can and cannot do

Robots.txt is a request, not a lock. Well-behaved crawlers follow it; others ignore it. It stops nothing at the server level, and it does not remove content that has already been collected. For stronger control you need blocking at your CDN or firewall, which the Cloudflare section below covers.

It also applies per path. You can block a crawler from one folder, such as a members area, and leave the rest open. That is useful if only part of your site is premium content.

How to block AI crawlers in robots.txt

✕ One rule for every bot Blocks training and citations together, so you may vanish from AI answers you wanted to appear in.
✓ One rule per job Blocks training crawlers and leaves search and citation crawlers open.
fig 2 · blanket block vs targeted rules

A file that allows search and citation bots and blocks training bots looks like this. Check each bot name against the vendor’s documentation before you use it, because names change:

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: OAI-SearchBot
Allow: /

User-agent: Claude-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: *
Allow: /

Each group starts with the bot’s name and lists what it may or may not fetch. The final group is the default for any bot not named above. OpenAI confirms each setting is independent, so you can allow OAI-SearchBot and disallow GPTBot.

How to block AI crawlers in Cloudflare

Cloudflare gives you two levels of control. The first is managed robots.txt, which adds rules for you and can add a content signal line such as:

Content-signal: search=yes, ai-train=no, use=reference

The labels cover three uses. search means building a search index and showing results, ai-input means feeding pages into AI answers in real time, and ai-train means training models. The line above leaves ai-input unset, so it neither grants nor restricts that use. If you already have a robots.txt, Cloudflare puts its managed block before your file and keeps your rules.

Those are still requests. Cloudflare says plainly that “robots.txt compliance is voluntary”.

The second level acts on the request itself. Go to Security, then Settings, filter by Bot traffic and open AI Crawler and Agent access policies. A Block action applies to matching requests across your domain, while Disallow only writes a robots.txt rule. Those names were current in November 2026, so check them if your dashboard looks different.

A decision guide

Your goal Search and citation bots Training bots
Be cited in AI answers, protect content from training Allow Block
Be cited and accept training use Allow Allow
Keep content out of every AI product Block Block

Most businesses that sell services belong in the first row. They gain from being named in answers, and they lose nothing by opting out of training.

Publishers whose content is the product may reasonably choose the third row, accepting lower visibility.

What blocking costs you

If you block search and citation bots, you will not appear in that product’s cited sources. If you block training bots, the effect is slower and harder to see: your content is not in future model training sets, which may mean the model knows less about your brand without browsing.

Do not block Googlebot or Bingbot to control AI use. Those bots feed normal search, and blocking them removes you from results. If your goal is the opposite, showing up in AI answers more often, see how to optimize content for AI search and how to check whether AI tools cite your site.

How to make the change safely

  1. Back up your current robots.txt.
  2. Edit one group of bots at a time.
  3. Test the file by loading yoursite.com/robots.txt, then check key URLs against it. Google retired its Search Console tester, so our guide to testing robots.txt now covers what replaced it.
  4. Check server logs after a week to see which bots still arrive.
  5. Write the date and the change in a note so you can compare traffic later.
step_01 Back up Save the current file.
step_02 Edit one group Change one set of bots.
step_03 Test Load /robots.txt and read it.
step_04 Review Check logs a week later.
fig 3 · a safe robots.txt change

If you run WordPress, a robots.txt may be generated by a plugin or your host. Find out where yours comes from before editing, or your changes will be overwritten.

How to check whether bots obey

Your server logs or Cloudflare analytics show which user-agents request your pages. After you block GPTBot, you should see its requests stop or fail. If a bot keeps fetching pages it is told not to, you have learned it ignores robots.txt, and your options are a firewall rule or accepting it.

FAQ

Does blocking GPTBot remove me from ChatGPT answers?

Not by itself. GPTBot is OpenAI’s training crawler, and OAI-SearchBot is the one that surfaces sites in ChatGPT search. OpenAI says the two settings are independent, though it notes sites that opt out of OAI-SearchBot can still appear as navigational links.

Are AI crawlers like GPTBot blocked by default?

No. Robots.txt allows anything you do not disallow, so a site with no rules leaves GPTBot free to crawl. If you use Cloudflare, check your AI crawler policies, because they can add blocks for you.

Do AI crawlers respect robots.txt?

It depends on the bot. OpenAI and Anthropic document robots.txt support for their crawlers, but Perplexity says Perplexity-User generally ignores it, and compliance is voluntary for everyone. Use your logs to check, and a firewall rule if you need enforcement.

Will blocking AI bots hurt my Google rankings?

Google says Google-Extended does not affect inclusion in Google Search and is not a ranking signal. Blocking Googlebot is different: it removes you from search results.

Start with one decision

Decide whether you want to be cited, then whether you mind training use. Those two answers give you the rules for each group of bots, and you can reopen access at any time.

Portrait of Liam Fraser
// written byLiam FraserSEO specialist with 3 years of experience. Liam writes about what works in local, technical and AI search.About SerpSurfers →