Skip to main content

This page is not yet available in this language

Block AI training crawlers on Cloudflare and keep AI search

Stop AI training crawlers on a Cloudflare site while AI search crawlers can still reach your pages, with managed robots.txt and AI Crawl Control.

AI assisted in drafting. This local editorial draft is pending review.

Last verified 30 November 2026

This guide shows how to stop AI training crawlers on a Cloudflare-hosted site while keeping AI search crawlers able to reach your pages, using Cloudflare's managed robots.txt and AI Crawl Control. It takes about an hour, plus a week of watching logs. It applies only to zones you administer.

Training and search are different uses. A training crawler collects pages to train models; a search crawler fetches pages so an AI product can find and cite them when someone asks a question. Blocking the first keeps content out of training. Blocking the second removes you from that company's AI answers. Most sites that want to limit training still want to be found, so the rule is to separate the two, not to block "AI" as one category.

Before you start

You needWhy
Administrator access to the Cloudflare zonePolicies and crawler rules are set per zone
The current robots.txt from your originCloudflare adds its managed block in front of it
A list of the AI products you want to be found inYou will keep their search agents allowed
A page you can test withTo confirm what crawlers actually receive
Somewhere to record changesSo you can roll back and explain later movements

Steps at a glance

StepWhat you doEvidence
1Decide which uses to allow, per productOfficial documentation
2Read your current robots.txt and crawler trafficObserved
3Turn on managed robots.txt with training set to blockOfficial documentation
4Enforce with per-crawler rules in AI Crawl ControlOfficial documentation
5Check the served file and responsesObserved
6Watch logs and violations for a weekObserved

1. Decide which uses to allow · Official documentation

Write down, for each AI product you care about, its search agent and its training agent, using the operator's own documentation. OpenAI, for example, documents OAI-SearchBot for search and GPTBot for training as separate agents. Google is different: AI Overviews and AI Mode are part of Google Search and use the regular Googlebot, while the Google-Extended token covers training and grounding in some of Google's other AI systems. Blocking Google-Extended does not remove you from Google Search.

Mark user-triggered fetchers separately. They act for a person at the moment of a request, and several operators say robots.txt may not apply to them. Our pillar on AI crawlers lists the main agents by purpose.

2. Read the current state · Observed

Fetch robots.txt from the exact host you are changing, including any subdomain, and save a copy. Note each user-agent group and the paths it affects.

Then open AI Crawl Control for the zone. It is available on all Cloudflare plans and shows which AI crawlers visit, their category, request counts and robots.txt violations. Keep a screenshot or export as your baseline. This tells you which crawlers actually visit, which matters more than a long list of agents that never arrive.

3. Turn on managed robots.txt for training · Official documentation

Cloudflare's managed robots.txt adds AI-crawler directives generated from your Search, Agent and Training policies. Set the Training policy to block or disallow and leave Search allowed.

What Cloudflare documents about the result:

  • The managed block disallows known training crawlers; its example lists Amazonbot, Applebot-Extended, Bytespider, CCBot, ClaudeBot, Google-Extended, GPTBot and meta-externalagent.
  • The general rule for all user agents stays Allow: /, so search indexing is permitted.
  • A Content Signals line states your preferences in machine-readable form, for example search=yes, ai-train=no.
  • If your origin already serves a robots.txt, Cloudflare places the managed content before your existing rules and serves them as one file. If there is none, Cloudflare creates one.

Check that none of your own existing rules contradicts the new block, for example a broad Disallow for an agent you meant to allow.

4. Enforce with per-crawler rules · Official documentation

robots.txt is a request. RFC 9309 describes the protocol as rules crawlers are asked to honor, not a form of access control, and Cloudflare's own documentation notes that compliance is voluntary. To enforce, use AI Crawl Control.

  1. Open AI Crawl Control, then the crawlers table.
  2. For each training crawler you decided to block, choose Block in the Action column.
  3. Leave search crawlers on Allow.
  4. On paid plans you can set the block response: 403 Forbidden, or 402 Payment Required if you intend to offer paid access, with a custom message.

Block named crawlers one at a time rather than a whole category, so a search agent that shares a category label is not caught by mistake.

5. Check what is served · Observed

  • Fetch /robots.txt from the live host and confirm the managed block appears above your rules, with training agents disallowed and search agents not.
  • Request a representative page as a normal browser and confirm a 200 response.
  • Re-run your site's crawler checks; or run the public AI readiness check.

Record the date and time of the change. Any later movement in crawls or citations will be compared with it.

6. Watch for a week · Observed

In AI Crawl Control, check over the following days that:

  • training crawlers' requests fall or receive your block response;
  • search crawlers keep fetching your pages;
  • the robots.txt violations view shows which crawlers request disallowed paths. Cloudflare notes that violations are calculated against your current rules, so requests made before a rule change can appear as new violations.

For a crawler that keeps violating, Cloudflare lists three options: block it in the crawlers table, add a path-specific WAF rule, or redirect it.

What this does not change

  • Search visibility is a separate question. Allowing search crawlers makes your pages reachable; whether answers cite them is measured from sampled answers. See the AI visibility funnel.
  • Past training is not undone. Blocking affects future crawls only.
  • Other hosts and CDNs. Rules apply to the Cloudflare zone you changed; content served elsewhere, or copied by third parties, is not covered.

Common mistakes

MistakeEffectInstead
Blocking every crawler labeled AIRemoves you from AI search answersBlock training agents by name, keep search agents
Blocking Googlebot to stop Google's AIRemoves you from Google Search entirelyUse Google-Extended for training; snippet controls for display
Relying on robots.txt aloneNon-compliant crawlers keep comingEnforce in AI Crawl Control
Changing rules without a recordLater changes cannot be explainedLog date, rule and reason

Read crawler roles · Check site readiness

Sources