To block AI crawlers in robots.txt, add a User-agent group for each vendor's training crawler (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, meta-externalagent and others) with Disallow: /, and leave the AI search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) allowed if you still want to be cited in AI answers. Each major vendor now separates training, search indexing and user-triggered fetching into different user-agent tokens, so you can opt out of one without disappearing from the others.

The catch is that the tokens, and what each one controls, differ by vendor and change often. This guide lists every current token from each vendor's own documentation as of December 2026, gives a decision matrix and copy-paste templates, and covers the parts robots.txt cannot do: verifying that a bot is real, checking your logs, and enforcing a block on crawlers that ignore the file.

The three kinds of AI crawler

Before writing any rules, separate AI traffic by what the vendor does with your content:

  1. Training crawlers collect content to train foundation models. Blocking them is a statement about future training data; it does not remove anything already collected.
  2. AI search crawlers build an index that AI assistants search when answering questions, and they are what gets you cited with a link. Blocking them removes you from those answers.
  3. User-triggered fetchers fetch a specific page because a user asked the assistant to read it, or because an agent is browsing for a user. Several vendors say these may not follow robots.txt, on the basis that a human initiated the request.

Most publishers I work with want the first blocked and the second allowed. That split is now possible with every large vendor, though not always cleanly.

Every AI crawler token, verified against vendor docs (December 2026)

Each row below comes from the vendor's own documentation; the "robots.txt" column records what the vendor says, not what I assume.

Token Vendor Purpose Honors robots.txt?
GPTBot OpenAI Training foundation models Yes
OAI-SearchBot OpenAI ChatGPT search results Yes
ChatGPT-User OpenAI User-initiated actions in ChatGPT and GPTs "robots.txt rules may not apply"
OAI-AdsBot OpenAI Checks pages submitted as ChatGPT ads Not stated
ClaudeBot Anthropic Training Yes, plus Crawl-delay
Claude-SearchBot Anthropic Claude search index Yes
Claude-User Anthropic Fetches for user queries Yes
Claude-Agent Anthropic Hosted agentic browser acting for a user Not stated; managed separately
Google-Extended Google Gemini training and grounding (a control token, not a crawler) Yes
Googlebot Google Search, including AI Overviews and AI Mode Yes
GoogleOther Google One-off research and non-Search crawls Yes
Google-Agent Google Agents browsing on a user's request User-triggered fetchers "generally ignore robots.txt"
PerplexityBot Perplexity Perplexity search; not used for training Implied (Perplexity says to allow it in robots.txt)
Perplexity-User Perplexity User-requested fetches "generally ignores robots.txt"
Applebot Apple Siri, Spotlight, Safari search; may also train models Yes
Applebot-Extended Apple Training opt-out token; does not crawl Yes
CCBot Common Crawl Open web archive used widely for AI training Yes
meta-externalagent Meta AI training and direct indexing Implied (robots.txt example given)
meta-webindexer Meta Meta AI search citations Implied (Meta says to allow it in robots.txt)
meta-externalfetcher Meta User-initiated fetches, agentic tasks "may bypass robots.txt"
Amazonbot Amazon Products and services; may train Amazon AI models Yes
Amzn-SearchBot Amazon Search in Alexa and other products; not training Yes
Amzn-User Amazon Live fetches for Alexa questions "may not follow all robots.txt directives"
MistralAI-Training Mistral Training datasets Yes
MistralAI-Index Mistral Mistral search index; not training Not stated
MistralAI-User Mistral User actions in Vibe Yes
DuckAssistBot DuckDuckGo Live fetches for AI-assisted answers; not training Yes

Sources: OpenAI crawlers, Anthropic crawler policy and Claude-Agent identification, Google common crawlers and user-triggered fetchers, Perplexity crawlers, Applebot, CCBot, Meta web crawlers, Amazonbot, Mistral crawlers and DuckAssistBot.

A few vendor details that change how you write the file:

  • OpenAI says its settings are independent: you can allow OAI-SearchBot and disallow GPTBot. If both are allowed, it may reuse one crawl for both purposes. Changes for search take about 24 hours. Sites that block OAI-SearchBot can still appear as navigational links.
  • Google-Extended is not a separate crawler; Google crawls with its normal user agents and applies the token as a usage rule. Google states it "does not impact a site's inclusion in Google Search nor is it used as a ranking signal". It also does not control AI Overviews or AI Mode; see the Google section below.
  • Applebot-Extended never shows up in logs, because it does not crawl. It only tells Apple not to use what Applebot collected for training its foundation models. Apple says sites that block it remain in Apple's search results.
  • Applebot falls back to Googlebot rules. Apple's docs say that if your robots.txt doesn't mention Applebot but mentions Googlebot, Applebot follows the Googlebot instructions. A Googlebot-specific disallow therefore silently applies to Applebot too.
  • Common Crawl is not an AI company, but its archive is one of the most widely used sources of training text. Blocking CCBot only affects future crawls.
  • ByteDance's Bytespider appears in many blocklists, including Cloudflare's, but I could not find official ByteDance documentation for it. Block it if you like; just don't expect a documented opt-out.

Decision matrix: what to block for each goal

Goal Block Keep allowed
Stay in AI search, opt out of training GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, meta-externalagent, Amazonbot, MistralAI-Training OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot, Bingbot, Applebot
Opt out of AI search and training, stay in Google and Bing All of the above plus OAI-SearchBot, Claude-SearchBot, PerplexityBot, meta-webindexer, MistralAI-Index, Amzn-SearchBot, DuckAssistBot Googlebot, Bingbot (and use Google's and Bing's AI controls)
Opt out of Google's AI Overviews only Nothing in robots.txt Use the Search generative AI control in Search Console or snippet controls
Maximum AI visibility Nothing Everything; consider an llms.txt file, though its value is unproven

The first row is the right default for most content sites. AI search citations send measurable referral traffic, which you can see in your analytics and, for Google, in the Search Console generative AI performance report. Training crawls send nothing back.

Copy-paste robots.txt templates to block AI crawlers

# Everyone (search engines included): normal rules
User-agent: *
Disallow: /admin/
Disallow: /cart/

# AI model training: opt out
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: meta-externalagent
User-agent: Amazonbot
User-agent: MistralAI-Training
User-agent: Bytespider
Disallow: /

# Shared AI-training preference (IETF aipref draft token)
User-agent: __usage_ai-training
Disallow: /

Sitemap: https://www.example.com/sitemap.xml

Several User-agent lines followed by one set of rules form a single group, as defined in RFC 9309. The AI search crawlers are not listed, so they fall through to the * group and get the same access as search engines.

I tested this file with Python's urllib.robotparser before publishing. Add this check to CI so a later edit cannot accidentally block Googlebot:

from urllib.robotparser import RobotFileParser

rp = RobotFileParser()
rp.parse(open('robots.txt').read().splitlines())

expect = {
    'GPTBot': False, 'ClaudeBot': False, 'CCBot': False, 'Google-Extended': False,
    'meta-externalagent': False, 'Amazonbot': False,
    'OAI-SearchBot': True, 'Claude-SearchBot': True, 'PerplexityBot': True,
    'Googlebot': True, 'Bingbot': True, 'Applebot': True,
}
for agent, allowed in expect.items():
    got = rp.can_fetch(agent, 'https://www.example.com/blog/post')
    print(f"{'ok ' if got == allowed else 'BAD'} {agent:20s} allowed={got}")

Python's parser is simpler than Google's (it takes the first matching group rather than the most specific one), so treat it as a smoke test, not proof of how every crawler reads the file.

Template 2: opt out of AI search as well

Add the search and index crawlers to the blocked group:

User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: meta-externalagent
User-agent: meta-webindexer
User-agent: Amazonbot
User-agent: Amzn-SearchBot
User-agent: MistralAI-Training
User-agent: MistralAI-Index
User-agent: MistralAI-User
User-agent: DuckAssistBot
User-agent: Bytespider
Disallow: /

Expect AI referral traffic from those assistants to fall towards zero. That is a business decision, not a technical one.

The group-precedence trap

This is the mistake I find most often in hand-edited files. A crawler obeys only the most specific group that matches it and ignores the * group entirely; Google's robots.txt specification describes the same behaviour. So in this file GPTBot may crawl /admin/:

User-agent: *
Disallow: /admin/

User-agent: GPTBot
Disallow: /drafts/

The author meant "everything in *, plus /drafts/ for GPTBot". What GPTBot actually gets is only the /drafts/ rule, because once a bot has its own group, the * rules no longer apply to it. Whenever you give a bot its own group, repeat every private-path rule inside it. (A group with Disallow: / is safe, since it already covers everything.)

Two smaller rules from Google's spec worth knowing: user-agent matching is case-insensitive, and Google reads only the first 500 KiB of the file. Most vendors cache robots.txt for up to 24 hours (OpenAI, Perplexity and Meta all state roughly that; DuckDuckGo says 72 hours), so a change is not instant. If you generate the file by hand, the robots.txt generator on this site helps avoid syntax slips.

The new shared AI-training signal

Since October 2026 there is a vendor-neutral way to state a training preference: a robots.txt group addressed to the policy token __usage_ai-training, defined in the Internet-Draft draft-kelley-aipref-training-preference-signal (version 01, 16 November 2026). It reuses normal robots.txt syntax: a Disallowed path expresses a preference against AI training, an Allowed path a preference in favour. A User-agent: * group does not count as expressing this preference.

Support as of early December 2026:

Vendor Status Precedence
Anthropic Honored since 30 October 2026 A rule naming ClaudeBot wins over the shared token
Microsoft (Bing) Takes effect from 1 February 2027 as pages are crawled Page-level meta/header overrides robots.txt
Google Planned for 2027 Treated as a Google-Extended disallow only when Google-Extended is not explicitly specified
OpenAI Announced; implementation "in the coming months" Existing GPTBot rules continue to apply

It is still an individual draft, not a finished standard, so keep the vendor-specific groups as well. Adding the token now costs nothing and covers vendors as they adopt it.

Google: Google-Extended does not control AI Overviews

This catches a lot of people. Google's generative AI controls page (updated 24 November 2026) separates the controls:

  • Google-Extended in robots.txt limits use of your content for training Gemini models and for grounding in products such as the Gemini app. It does not affect Search.
  • AI Overviews and AI Mode are part of Search. They are governed by the Search generative AI control in Search Console settings ("Exclude my site's links and content from Search generative AI features"), by snippet controls (nosnippet, data-nosnippet, max-snippet) and by noindex.
  • Blocking Googlebot removes you from Search entirely, AI features included.

So blocking Google-Extended leaves you fully in AI Overviews. If your goal is the reverse (stay out of AI Overviews but keep classic results), robots.txt is the wrong tool. Before opting out, weigh the traffic: the AI Overviews ranking guide covers what being cited is worth.

Microsoft Bing: training and grounding preferences

Bing uses one crawler, Bingbot, for both search and AI. Microsoft announced on 30 October 2026 that it is replacing the old NoArchive/NoCache approach with two independent preferences:

  • AI training: the shared __usage_ai-training robots.txt group, plus a page-level override.
  • AI grounding (use in Copilot and Bing's AI answers): page-level only. disallowextended limits grounding to Microsoft's own products and excludes grounding services Microsoft sells to third parties.
<meta name="Bingbot" content="ai-training:disallow">
<meta name="Bingbot" content="ai-grounding:disallowextended">

The equivalent headers are X-Robots-Tag: Bingbot: ai-training:disallow and X-Robots-Tag: Bingbot: ai-grounding:disallow. These take effect from 1 February 2027. If you currently rely on NoArchive or NoCache, Microsoft says they stop being read as training or grounding preferences after 1 March 2027, and sites that want to keep a grounding restriction should also record a temporary preference in Bing Webmaster Tools (open from 15 December 2026).

Verify that a bot is who it claims to be

Anyone can send User-Agent: GPTBot. Before you allowlist a bot in a firewall, or blame a vendor for ignoring your rules, check the source IP against the vendor's published ranges:

Vendor Verification
OpenAI openai.com/gptbot.json, searchbot.json, chatgpt-user.json, adsbot.json
Anthropic claude.com/crawling/bots.json; Claude-Agent at claude.com/.well-known/sail
Google JSON files under developers.google.com/static/crawling/ipranges/, or reverse DNS to googlebot.com, google.com or googleusercontent.com
Apple search.developer.apple.com/applebot.json, or reverse DNS to applebot.apple.com
Common Crawl index.commoncrawl.org/ccbot.json, or reverse DNS (IPv4) to crawl.commoncrawl.org
Perplexity perplexity.ai/perplexitybot.json, perplexity-user.json
Amazon IP lists linked from the Amazonbot page
Meta No IP list on its crawler page

Reverse DNS must be confirmed with a forward lookup, as Google's verification guide describes; a PTR record alone can be faked by whoever controls the IP's reverse zone:

$ host 66.249.66.1
1.66.249.66.in-addr.arpa domain name pointer crawl-66-249-66-1.googlebot.com.
$ host crawl-66-249-66-1.googlebot.com
crawl-66-249-66-1.googlebot.com has address 66.249.66.1

OpenAI, Anthropic and Perplexity publish IP lists rather than reverse DNS, so use the JSON files. All of them, plus Google's, Apple's and Common Crawl's, use the same {"prefixes": [{"ipv4Prefix": ...}]} format, which makes one script enough.

Check your server logs

First, see which AI agents actually visit. This counts tokens in the user-agent field of an nginx or Apache combined log:

awk -F'"' '{print $6}' /var/log/nginx/access.log \
  | grep -oE 'GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-SearchBot|Claude-User|Claude-Agent|PerplexityBot|Perplexity-User|CCBot|meta-external(agent|fetcher)|meta-webindexer|Amazonbot|Amzn-(SearchBot|User)|Applebot|Bytespider|MistralAI-[A-Za-z]+|DuckAssistBot|Google-Agent' \
  | sort | uniq -c | sort -rn

Then verify the IPs. This script downloads each vendor's official list once and flags requests whose IP is not in it. I ran it on a sample log with real and spoofed entries:

#!/usr/bin/env python3
"""Flag AI-crawler requests whose IP is not in the vendor's published ranges.
Usage: python3 verify_ai_bots.py access.log   (nginx/Apache combined format)"""
import ipaddress, json, re, sys, urllib.request
from collections import Counter

RANGES = {  # UA token -> official IP list (checked December 2026)
    'GPTBot':           'https://openai.com/gptbot.json',
    'OAI-SearchBot':    'https://openai.com/searchbot.json',
    'ChatGPT-User':     'https://openai.com/chatgpt-user.json',
    'ClaudeBot':        'https://claude.com/crawling/bots.json',
    'Claude-SearchBot': 'https://claude.com/crawling/bots.json',
    'Claude-User':      'https://claude.com/crawling/bots.json',
    'PerplexityBot':    'https://www.perplexity.ai/perplexitybot.json',
    'Perplexity-User':  'https://www.perplexity.ai/perplexity-user.json',
    'CCBot':            'https://index.commoncrawl.org/ccbot.json',
    'Applebot':         'https://search.developer.apple.com/applebot.json',
    'DuckAssistBot':    'https://duckduckgo.com/duckassistbot.json',
    'MistralAI-User':   'https://mistral.ai/mistralai-user-ips.json',
    'MistralAI-Index':  'https://mistral.ai/mistralai-index-ips.json',
    'Googlebot':        'https://developers.google.com/static/crawling/ipranges/common-crawlers.json',
}
LINE = re.compile(r'^(\S+) .*"([^"]*)"\s*$')
_cache = {}

def networks(url):
    if url not in _cache:
        req = urllib.request.Request(url, headers={'User-Agent': 'bot-verifier/1.0'})
        data = json.load(urllib.request.urlopen(req, timeout=20))
        _cache[url] = [ipaddress.ip_network(p.get('ipv4Prefix') or p.get('ipv6Prefix'))
                       for p in data['prefixes']]
    return _cache[url]

def main(path):
    verdicts = Counter()
    for line in open(path, encoding='utf-8', errors='replace'):
        m = LINE.match(line)
        if not m:
            continue
        ip, ua = m.groups()
        token = next((t for t in RANGES if t.lower() in ua.lower()), None)
        if not token:
            continue
        addr = ipaddress.ip_address(ip)
        ok = any(addr in net for net in networks(RANGES[token]))
        verdicts[(token, 'verified' if ok else 'SPOOFED?', ip if not ok else '')] += 1
    for (token, verdict, ip), n in sorted(verdicts.items()):
        print(f'{n:7d}  {token:18s} {verdict:9s} {ip}')

if __name__ == '__main__':
    main(sys.argv[1])
      1  CCBot              verified
      1  ClaudeBot          verified
      1  GPTBot             SPOOFED?  203.0.113.7
      1  GPTBot             verified
      1  Googlebot          verified
      1  PerplexityBot      SPOOFED?  198.51.100.9

A "spoofed" GPTBot fetching pages you disallowed is a scraper using a borrowed name, not OpenAI ignoring your file. Block it at the firewall or WAF, not in robots.txt.

The limits of robots.txt

Robots.txt is a request, not access control. Know where it stops:

  • It is voluntary. Documented vendors follow it. Unknown scrapers do not, and some use browser user agents. In August 2025 Cloudflare reported undeclared crawlers it attributed to Perplexity evading no-crawl directives, and delisted Perplexity as a verified bot.
  • User-triggered fetchers often skip it. ChatGPT-User, Perplexity-User, Google-Agent, meta-externalfetcher and Amzn-User are documented as possibly ignoring robots.txt.
  • It is not retroactive. Content already collected stays collected.
  • It controls crawling, not use. Content can reach models through third parties (an aggregator that syndicated your article, or an older Common Crawl snapshot).
  • Blocking by IP can backfire. Anthropic notes that IP blocks stop its crawler from reading robots.txt at all, so your rules are never seen. Block by user agent and always serve /robots.txt to everyone.

If you need enforcement, do it at the edge. A user-agent block in nginx, with robots.txt still reachable (I could not run nginx locally, so test it in staging):

map $http_user_agent $ai_training_bot {
    default 0;
    ~*(GPTBot|ClaudeBot|CCBot|meta-externalagent|Amazonbot|MistralAI-Training|Bytespider) 1;
}

server {
    location = /robots.txt { }        # always served

    location / {
        if ($ai_training_bot) { return 403; }
        # ... normal config
    }
}

Also check your CDN. Cloudflare's managed robots.txt, when enabled, prepends its own block to your file, disallowing Amazonbot, Applebot-Extended, Bytespider, CCBot, ClaudeBot, Google-Extended, GPTBot and meta-externalagent, plus a Content-Signal line. If your served robots.txt differs from the one in your repository, that is usually why.

Frequently Asked Questions

No. GPTBot is OpenAI's training crawler. ChatGPT search uses OAI-SearchBot, which OpenAI controls separately. Block GPTBot and allow OAI-SearchBot to opt out of training while remaining eligible for ChatGPT search citations.

Does blocking Google-Extended affect my Google rankings or AI Overviews?

No on both counts. Google says Google-Extended does not affect Search inclusion or ranking. AI Overviews and AI Mode are part of Search and are controlled by the Search generative AI control in Search Console, snippet controls and noindex, not by Google-Extended.

What is the difference between ClaudeBot, Claude-SearchBot and Claude-User?

ClaudeBot collects content that may be used for training. Claude-SearchBot indexes pages for search inside Claude. Claude-User fetches pages when a Claude user asks a question that needs them. Anthropic says all three honor robots.txt, so you can block them independently.

How long does a robots.txt change take to apply?

Usually up to a day. OpenAI, Perplexity and Meta say about 24 hours, Google generally caches robots.txt for up to 24 hours, and DuckDuckGo says 72 hours for DuckAssistBot. Bing's new training preferences only take effect from 1 February 2027, as pages are recrawled.

Yes. Disallow Google-Extended and the other vendors' training crawlers, and leave Googlebot and Bingbot allowed. Never disallow Googlebot to stop AI use, because that removes you from Search entirely.

Is the __usage_ai-training token worth adding now?

Yes, as an addition, not a replacement. Anthropic already honors it, Microsoft starts in February 2027, and Google and OpenAI have said they will support it. It is still an Internet-Draft, so keep your vendor-specific rules alongside it.

Bottom Line

Treat AI crawlers as three groups: training, search and user-triggered. For most sites the right robots.txt blocks the training crawlers (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, meta-externalagent, Amazonbot, MistralAI-Training), leaves the AI search crawlers alone, and adds the shared __usage_ai-training group. Remember that Google-Extended does not touch AI Overviews, that a dedicated group ignores your * rules, and that robots.txt only binds bots that choose to obey it. Verify IPs against the vendors' published ranges before drawing conclusions from your logs, and enforce at the edge where it matters.