How to Manage AI Bot Access in Cloudflare

Separate search from training preferences in Cloudflare and diagnose AI crawler blocks at the edge.

Try

Setup steps

  1. Choose which crawler uses to allow

    In Security → Settings, filter by Bot traffic and open AI Crawler and Agent access policies. Review Search, Agents and Training. Use AI Crawl Control → Crawlers to inspect settings for an individual crawler.

  2. Check the effective robots.txt

    If you manage robots.txt at your origin, this example allows OpenAI search crawling and opts out of GPTBot training collection. Preserve your other path rules. With Cloudflare’s Bot Preference Sync enabled, check whether Cloudflare prepended its own directives.

    Check the effective robots.txt example
    User-agent: OAI-SearchBot
    Allow: /
    
    User-agent: GPTBot
    Disallow: /
    
  3. Investigate any block or challenge in Cloudflare

    Fetch your published robots.txt, then check Security Events on the public page’s hostname and path. Use the action and service fields to identify the rule causing a 403. Verify crawler identity from provider documentation before changing a policy.

    Investigate any block or challenge in Cloudflare example
    curl -fsSL -i https://example.com/robots.txt

Official platform documentation

Verify the published llms.txt

Replace example.com with the published hostname and fetch the file. The final response should be HTTP 200 with the expected Markdown body and a Content-Type of text/markdown; charset=utf-8 or text/plain; charset=utf-8.

HTTP verification command
curl -fsSL -i https://example.com/llms.txt

If status 200 comes back with an HTML homepage, sign-in screen or error page, you have an HTML fallback (a soft 404). Check the final URL and fix the route or rewrite, then fetch it again.

Frequently asked questions

Does a robots.txt Allow rule override a Cloudflare block?

Cloudflare applies edge policies to incoming requests. Check Security Events for the rule that returned a block or challenge.

Can I block training and keep search crawl access?

Review the separate Training and Search actions. Check the provider’s documented purpose and Cloudflare’s classification because a mixed-purpose crawler can be subject to the Training action.

Can I diagnose a bot by sending its user-agent string with curl?

A spoofed string helps test simple matching rules. Use Cloudflare events from verified crawler traffic to check the real decision.

Scan your published site

Check the live page and its robots.txt and llms.txt. The scan is free. If you want files tailored to the report, the $12 Auto-Generated Fix Pack is available from the results.

Run a free scan