Guides

Does robots.txt stop AI crawlers? What it can and can't do

robots.txt is still the first thing to get right. It is also the most misunderstood file on most websites, and on its own it stops only the crawlers that choose to listen.

Published · Last reviewed by the KanaryGate editorial team

What robots.txt is

robots.txt is a plain text file at the root of your site that tells automated visitors which paths they may fetch. The convention dates from the 1990s and was published as an internet standard, RFC 9309, in 2022[1]. The standard is explicit that the rules are not a form of access authorisation: they describe your wishes, and it is up to each crawler to honour them. That's why robots.txt is the starting point, not the whole job, in our guide to allowing the good AI crawlers, stopping the bad and proving the rest.

A file is made of groups. Each group starts with one or more User-agent lines and continues with Allow and Disallow rules. A crawler picks the group whose user-agent matches it most specifically and ignores the others. Within a group, the longest matching rule wins.

Who follows it

For AI crawlers, it depends on the job the crawler is doing:

  • Training and search crawlers from the major operators say they follow robots.txt: OpenAI's GPTBot and OAI-SearchBot[2], Anthropic's ClaudeBot and Claude-SearchBot[4], and PerplexityBot[3].
  • User-triggered fetchers are different. OpenAI says robots.txt rules "may not apply" to ChatGPT-User because a person started the request[2]. Perplexity says Perplexity-User generally ignores robots.txt for the same reason[3]. Anthropic's documentation describes Claude-User as respecting robots.txt[4].
  • Disguised scrapers don't follow it. If a program is pretending to be something else, it isn't reading your rules in good faith.

Measurement across publisher sites supports the gap between policy and practice. TollBit's recent State of the Bots reports have found a meaningful share of AI scrapes reaching pages that robots.txt disallowed, with user-triggered fetchers prominent among them[6]. Figures vary by period and region, so check the current report rather than relying on a single number.

Common mistakes we see

  1. Forgetting group specificity. You block a private area under User-agent: *, then add a separate group for GPTBot. GPTBot now reads only its own group and the private area is open to it.
  2. Blocking search when you meant training. Disallowing every AI name removes you from AI search answers as well as training. See our crawler directory for which name does which job.
  3. Relying on a CDN toggle you haven't checked. One-click "block AI bots" settings are convenient but can include the search crawlers you want. Read what each setting covers.
  4. Treating robots.txt as security. It is public, so it also tells everyone where your sensitive paths are. Protect private areas with authentication.

The shared AI-training opt-out

Until 2026 you had to name each company's training crawler separately. An IETF Internet-Draft published on 30 October 2026, backed by Google, OpenAI, Microsoft and Anthropic, proposes a single policy token for AI training preferences[5]:

User-agent: __usage_ai-training
Disallow: /

Points to know: it adds no new grammar to robots.txt; it isn't a crawler name, so nothing will appear in your logs with it; wildcard (*) groups don't apply to it; and it expresses a preference about training, not about search or crawling. The backing companies are implementing it on different timelines, and none of it affects content already used in existing models. Until support is confirmed, keep your per-crawler training rules alongside it. Our news analysis covers the differences between companies.

What actually enforces your rules

Enforcement happens before a request reaches your pages, at your firewall or CDN:

  • Verify identity. Allow a famous crawler name only from that operator's published addresses or verified-bot list. See how to check a crawler is real.
  • Challenge suspicious traffic. People browse from home and mobile networks; scrapers often come from cloud servers.
  • Let your CDN follow your preferences. Cloudflare's Bot Preference Sync writes your AI settings into robots.txt and blocks crawlers it considers opaque when you disallow training[7], and Cloudflare has begun scoring how consistently verified bots honour site preferences[8]. Our news analysis covers what both changes mean for UK sites.
  • Log the rule-breakers. A hidden link to a path your robots.txt forbids catches anything that ignores it. Over time that log tells you who to block and gives you evidence.

The free KanaryGate audit checks your robots.txt for eight AI crawlers and tests whether four disguised visitors get past your defences.

Frequently asked questions

Does robots.txt stop AI crawlers?

It stops the ones that choose to follow it. Major operators say their training and search crawlers do. Some user-triggered fetchers may not, and scrapers that hide their identity ignore it completely. Treat robots.txt as your published rules, and enforce them elsewhere.

Is robots.txt legally binding?

Not in itself. It is a technical convention. But a clear robots.txt is useful evidence of what you did and didn't permit, which can matter in licensing discussions or a dispute. Our UK copyright guide covers the legal position.

Why is my 'User-agent: *' rule ignored by GPTBot?

Because a crawler follows only the group that names it most specifically. If you have a User-agent: GPTBot group anywhere in the file, GPTBot reads that group and ignores *. Repeat any shared rules inside each named group.

What is __usage_ai-training?

It's the policy token proposed in an October 2026 IETF Internet-Draft for a shared AI-training opt-out. You put it on the User-agent line of a group and disallow the paths you don't want used for training. It isn't a crawler, and wildcard groups don't apply to it. Support is being rolled out by the backing companies at different speeds.

Should I block AI crawlers by IP address instead?

Only with care. Blocking an operator's published addresses can stop its crawler reading your robots.txt at all, which Anthropic specifically advises against. Address checks are most useful the other way round: confirming that a visitor claiming a famous name really comes from that operator.

How do I know who ignores my robots.txt?

Add a path your robots.txt forbids to everyone, link to it invisibly, and log every visit. Anything that arrives has ignored your rules. That's how our Scraper watch page counts rule-breakers on this site.

Sources

  1. RFC 9309: Robots Exclusion Protocol, IETF. Accessed 4 December 2026.
  2. Overview of OpenAI Crawlers, OpenAI. Accessed 4 December 2026.
  3. Perplexity crawlers, Perplexity. Accessed 4 December 2026.
  4. Does Anthropic crawl data from the web, and how can site owners block the crawler?, Anthropic. Accessed 4 December 2026.
  5. Training Preference Signal (draft-kelley-aipref-training-preference-signal-00), IETF. Accessed 4 December 2026.
  6. State of the Bots, TollBit. Accessed 4 December 2026.
  7. Say it once: introducing Bot Preference Sync, Cloudflare. Accessed 4 December 2026.
  8. Continuous accountability for Verified bots, Cloudflare. Accessed 4 December 2026.