// HOW-TO · CREATOR RIGHTS

How to block AI crawlers: robots.txt vs server rules (2026)

Block AI crawlers in 2026: robots.txt for compliant bots, server or CDN rules for the rest, and the training-vs-search split that keeps AI-search citations.

Last verified · 2026-09-04 · by Moe Ameen

Blocking AI crawlers looks like a single toggle and is actually two decisions on top of each other. The first is whether to block at all — and if so, which bots, because a blanket block quietly removes you from AI search alongside the training scrapers you meant to stop. The second is where to enforce it: a robots.txt line is a polite request that well-behaved bots honor and aggressive ones ignore, while a server or CDN rule is an actual barrier that returns a block whether the crawler asks permission or not. This walks both decisions in order so you end with a policy that stops the scraping you care about without severing the crawlers that send you readers.

One scope limit to hold before you touch a file: any of this governs only a domain you control. It does nothing about your Instagram, TikTok, or YouTube content, which lives on platforms with their own separate AI-data settings and no robots.txt of yours. If you also want to close the training tap on the tools and platforms you publish through, that is a different and larger checklist — the companion tutorial [opt out of AI training on your content](/how-to/opt-out-of-ai-training-on-your-content) covers it.

The steps

  1. Decide what a block can actually protect. Start by naming the goal, because it changes the answer. Blocking crawlers on your site reduces the odds your first-party pages feed a future model and cuts scraper load on your server; it does not remove content already in shipped models, and it reaches only the domain you control. If most of your work lives on social platforms, crawler rules are the wrong lever for that content entirely. Decide here whether you are protecting an owned site, cutting bandwidth from aggressive bots, or making a rights statement — each points at a different mix of the steps below.
  2. Split the crawlers by purpose before blocking anything. AI bots are not one category, and treating them as one is the classic mistake. Training crawlers fetch pages to build model datasets: GPTBot (OpenAI), Google-Extended (Google's training signal — separate from Googlebot), ClaudeBot (Anthropic's training crawler — the older anthropic-ai and Claude-Web agent names are deprecated), CCBot (Common Crawl, which feeds many datasets), and Bytespider (ByteDance). Search and retrieval crawlers fetch a page live to quote and link you in AI answers: OAI-SearchBot, Claude-SearchBot, PerplexityBot, and user-triggered fetchers like ChatGPT-User and Claude-User. Agent crawlers act on a task in real time. Write your policy against these buckets — you almost always want to block training, keep search, and decide on agent case by case.
  3. Write robots.txt rules for the compliant bots. In the robots.txt at your domain root, add a block per training user-agent, for example a `User-agent: GPTBot` line followed by `Disallow: /`, repeated for Google-Extended, ClaudeBot, CCBot, and Bytespider. The major companies publish these agent names precisely so you can target them, and the well-behaved ones honor the file. Keep the retrieval agents out of your disallow list. Understand what you have built: robots.txt is a voluntary standard (RFC 9309), a sign on the door, not a lock — it stops cooperative crawlers and nothing else.
  4. Enforce at the server or CDN for the bots that ignore the sign. For crawlers that disregard robots.txt — Bytespider is the routine offender — the block has to sit in front of your content. At the server, a rule that returns 403 to the training user-agents stops the request before it reads a page; at a CDN or WAF like Cloudflare, a managed AI-bot rule or firewall expression does the same at the edge, before traffic reaches you. Cloudflare exposes this as AI Crawl Control with Search, Agent, and Training categories, and a pay-per-crawl option that answers blocked bots with a 402 Payment Required. This layer is where real blocking happens.
  5. Match user-agent to a verified identity, not just the string. A User-Agent header is trivially spoofed, so a rule keyed on the string alone both misses impersonators and risks blocking the real bot's lookalikes. The major AI companies publish machine-readable lists of their crawlers' authentic IP ranges for exactly this reason. For a server or CDN rule you want to enforce strictly, verify the request comes from a published IP block (or passes reverse-DNS) before trusting the agent name — otherwise you are filtering a header anyone can fake.
  6. Deliberately keep the search and retrieval crawlers. This is the step that separates a good policy from a self-inflicted wound. Do not use a blanket "block all AI bots" rule or a CDN preset that sweeps everything, because it catches OAI-SearchBot, PerplexityBot, and other answer crawlers that fetch your page to cite and link you in AI search — the surface where high-intent readers increasingly start. Blocking Google-Extended, note, does not affect Google Search ranking; it only controls training. Block training agents by name, leave retrieval agents allowed, and you opt out of the dataset without vanishing from the answers.
  7. Verify the block works, then re-audit on a schedule. Confirm enforcement rather than assuming it: request a protected URL while sending the bot's user-agent (`curl -A GPTBot https://yoursite.com/`) and check you get a block, not a 200 — a robots.txt Disallow will still return the page to a direct request, which is the tell that you need the server layer. Cloudflare's AI Crawl Control also logs which crawlers hit you and whether they respect the file. Then re-check quarterly: new bots appear, agent names change, and platform defaults shift — Cloudflare moved to blocking Training and Agent categories by default on ad-supported pages for new setups from September 15, 2026, across all tiers including Free.

Common gotchas

  • robots.txt is a request, not a barrier (RFC 9309). A Disallow line stops cooperative crawlers and returns the page normally to anyone who ignores it — real blocking has to live at the server or CDN.
  • A blanket AI-bot block is the most common own-goal: it removes you from AI search by catching retrieval crawlers (OAI-SearchBot, PerplexityBot) alongside the training crawlers you meant to stop.
  • User-Agent strings are spoofable, so a rule keyed only on the name both misses impersonators and can misfire — verify against the AI companies' published IP ranges for any strict block.
  • Hybrid crawlers force a binary choice. Cloudflare notes that blocking Training also blocks multi-purpose bots like Googlebot and Applebot even when Search is allowed, because one crawler serves both — check before you block a shared agent.
  • User-fetch bots may skip robots.txt: OpenAI states ChatGPT-User (and Perplexity's user fetch) can ignore the file when a human asked for the page, so robots.txt alone won't stop on-demand retrieval.
  • Crawler rules cover only your domain. They do nothing for content you post to Instagram, TikTok, YouTube, or LinkedIn — those have separate in-platform AI settings.
Legal note

robots.txt and bot rules are technical controls, not by themselves a legal prohibition — their weight depends on jurisdiction. In the EU, the copyright text-and-data-mining framework makes a machine-readable rights reservation legally meaningful, so a properly expressed opt-out (robots.txt plus protocols like TDMRep) is treated as binding on general-purpose AI providers. In the US there is no equivalent statute, so most crawler blocks are enforced by contract, terms of service, or the crawler's own stated policy rather than a clear legal right, and scraping disputes run through the courts case by case. Confirm current behavior in each crawler's published documentation before relying on any single control.

Where Kompozy fits

Here is the quiet limit of everything above: a crawler block is a fence around one yard. It governs the pages on a domain you own and nothing else, while most of a creator's audience — and most of their content — lives on platforms where you cannot set a single robots.txt line. So the block/allow decision protects your owned site, and that is exactly the surface worth having something substantial on. [Kompozy](/) is the engine that keeps that surface fed while running the distribution layer where crawler rules simply don't apply.

Kompozy is a content generation and multi-platform publishing engine, not a repurposing add-on. From one source it generates the long-form [blog article](/glossary/output-buckets), the carousel, the quote graphic, the text and image posts, and the [persona or avatar video](/glossary/persona-shorts) — 18 formats — then publishes them natively across the eight primary social platforms plus blog and email in a single pass. Two things follow that matter to a page about blocking bots. First, Kompozy publishes as your real accounts; it is never another crawler you have to identify and block, and it does not use your content to train models — so scaling output with it does not widen the training footprint your block just narrowed. Second, the retrieval crawlers you deliberately kept in step six only pay off if the pages they fetch are fresh and worth citing, and Kompozy is how a solo operator keeps an owned site and every platform stocked with structured, on-brand content instead of a stale homepage behind a locked door.

A single [Persona Brief](/glossary/persona-brief) holds voice and banned-word rules across every output, and [Autopilot](/glossary/autopilot) keeps the queue moving behind a per-post review gate. The division of labor is clean: your crawler policy decides who may read your owned domain; Kompozy decides how much there is to read and puts native versions everywhere the fence doesn't reach. Creator ($49/mo for 2,500 credits) fits a solo creator maintaining one owned site plus cross-platform presence; Pro ($299/mo for 18,000 credits) suits a brand or team publishing everywhere weekly; Enterprise is custom for agencies running many domains and brands.

Frequently asked questions

Should I block AI crawlers with robots.txt or server rules?

Use both, for different jobs. robots.txt is the fastest way to tell compliant bots like GPTBot and ClaudeBot to stay out, and the major companies honor it — but it is a voluntary request with no enforcement, so aggressive crawlers ignore it. A server or CDN rule (a 403 by user-agent, or a Cloudflare AI-bot rule) is the actual barrier that blocks requests before they read a page. Start with robots.txt for coverage, add the server layer for the bots that don't respect it.

Which AI bots should I block?

Block the training crawlers: GPTBot (OpenAI), Google-Extended, ClaudeBot (Anthropic), CCBot (Common Crawl), and Bytespider (ByteDance). Deliberately keep the retrieval crawlers — OAI-SearchBot, Claude-SearchBot, PerplexityBot, and user-triggered fetchers like ChatGPT-User and Claude-User — because they quote and link you in AI search. The split is the whole point: block the bots that absorb your content into models, keep the ones that send readers to it.

Will blocking AI crawlers hurt my Google ranking or SEO?

Not if you target the right agents. Google-Extended is Google's training crawler and blocking it has no effect on Google Search — Googlebot is separate. The real risk is a blanket "block all AI bots" rule that also catches the answer-retrieval crawlers behind AI search results, which removes you from that increasingly important surface. Block training agents by name and leave Googlebot and the retrieval crawlers allowed.

Does Cloudflare block AI crawlers automatically?

Increasingly, yes. Cloudflare offers AI Crawl Control with Search, Agent, and Training categories and a one-move block, available to all tiers including Free. From September 15, 2026, new setups block Training and Agent crawlers by default on ad-supported pages while Search stays allowed. If you use Cloudflare, check your current AI-bot settings directly — the default may already be doing more, or less, than you intend.

Can I really stop a determined scraper from taking my content?

Not completely. robots.txt is voluntary and a bad actor ignores it; even server and CDN rules can be probed by spoofing user-agents or rotating IPs, which is why verifying against published IP ranges matters. Blocking meaningfully reduces training exposure and load from cooperative and semi-cooperative crawlers, and pay-per-crawl or WAF rules raise the cost for the rest — but treat it as reducing exposure, not building an impenetrable wall.

Related tutorials

← All how-to guides · Get Started