robots.txt for AI Crawlers: Build an Allow/Block Policy Bot by Bot

A robots.txt file is a UTF-8 plain-text policy at an origin’s top-level /robots.txt URL. It tells compliant crawlers which paths they may fetch. For AI access, the useful unit of policy is not “AI bots” as one class: it is each documented agent, its purpose, and the outcome you want. That lets a site permit search discovery while declining model-training crawls, without pretending that robots.txt secures private content or binds undeclared scrapers.

The Robots Exclusion Protocol applies to one scheme, host, and port. Rules at https://example.com/robots.txt do not automatically govern https://docs.example.com, http://example.com, or another port. The file is public, and a conforming crawler reads its applicable User-agent, Allow, and Disallow rules before fetching site paths.

RFC 9309 defines robots.txt as a crawl-control protocol, requires the file at the top-level lowercase /robots.txt path, and explicitly says it is not a substitute for content security.

There is no robots.txt formula and no meaningful benchmark for the “right” percentage of AI crawlers to allow. The practical artifact is a policy ledger: one row per documented token, with a purpose, decision, scope, consequence, enforcement layer, owner, source, and review trigger.

Separate crawling, indexing, training, and retrieval first

An allow/block list becomes unsafe when it collapses several activities into “AI access.” These are different controls:

ActivityWhat the agent doesExamplesWhat a block can cost
Search and answer discoveryCrawls or indexes public pages so they may be surfaced and cited in answersOAI-SearchBot, Claude-SearchBot, PerplexityBot; traditional Googlebot and bingbot also feed AI-powered search experiencesEligibility, freshness, citation depth, or discoverability in the corresponding search product
Model developmentCollects content that may contribute to training or improving foundation modelsGPTBot, ClaudeBotPotential future model-development use; the operator’s separate search bot can remain allowed
Extended data-use controlExpresses whether content gathered by another crawler may be used for specified AI purposesGoogle-Extended, Applebot-ExtendedSpecified training or grounding uses, without necessarily changing ordinary search inclusion
Shared web corpusAdds crawled data to a repository available to many downstream usersCCBotContribution to future Common Crawl collections, not one named assistant’s search index
User-triggered retrievalFetches a page because a person asked an assistant to use itChatGPT-User, Claude-User, Perplexity-UserThe assistant’s ability to retrieve the page for that request; robots.txt treatment differs by operator

OpenAI makes the search-versus-training distinction unusually clear in its crawler documentation: a publisher can allow OAI-SearchBot for ChatGPT search while disallowing GPTBot for potential foundation-model training. Anthropic similarly documents three separate agents: Claude-SearchBot, ClaudeBot, and Claude-User.

Google requires a different mental model. Google-Extended is a robots.txt product token, not a separate HTTP crawler. Google’s crawler reference says it controls specified Gemini training and grounding uses and does not affect Google Search or Search ranking. For Google AI Overviews and AI Mode, Google says normal Googlebot crawl access, indexing, and snippet eligibility apply.

Apple has a parallel distinction. Applebot supports search across Spotlight, Siri, and Safari, while Applebot-Extended controls specified foundation-model training use of data Applebot collected. Apple states that Applebot-Extended does not itself crawl, and disallowing it does not remove pages from Apple search results.

Classify the use before you classify the bot. A company name is not a crawl purpose.

robots.txt also differs from indexing and access control. Google warns that a disallowed URL can still appear in Search without a snippet if other pages reveal it. A crawler must be allowed to fetch a page before it can read a noindex meta tag or header. Authentication, authorization, and server or edge rules are what keep private material private; robots.txt merely publishes a preference to clients that choose to comply.

That distinction answers two recurring questions. Yes, an AI crawler can ignore robots.txt if it does not implement the protocol. No, Disallow is not a complete license, copyright policy, deletion request, or retroactive control over data already obtained. Treat legal terms and enforced access as separate layers, with qualified counsel where the rights question matters.

Build the bot ledger before editing the file

Start with the outcome the site owner wants, not a copied blocklist. Give every row these fields:

Ledger fieldQuestion to answer
Operator and tokenWhich exact robots.txt product token does the operator document?
PurposeSearch, model development, extended-use control, shared corpus, user retrieval, or unknown?
Desired outcomeDo you want discovery, potential training use, user fetches, or none of them?
Decision and scopeAllow or block which exact paths on which origins?
Documented consequenceWhat does the operator say changes when this token is disallowed?
Enforcement layerrobots.txt preference, meta/header control, authentication, WAF, or rate control?
Evidence and ownerWhich operator page was checked, on what date, and who approved the decision?
Review triggerWhich documentation, traffic, product, rights, or infrastructure change reopens the row?

The “unknown” purpose is important. A user-agent string is easy to invent, and community blocklists often outlive the crawler names and descriptions they copied. If an operator does not document a token well enough to connect it to an outcome, label it unknown and handle observed traffic at the server or edge according to security and capacity policy. Do not invent a product consequence from the bot’s name.

A verified bot-by-bot starting matrix

The matrix below is a policy input, not a universal verdict. It includes agents whose roles were documented by their operators at this article’s evidence cutoff.

TokenDocumented roleDecision questionConsequence to record
GooglebotGoogle Search crawler, including the index used by AI Overviews and AI ModeDo you want the page eligible for Google Search and its AI features?Blocking crawl can remove the content needed for Search indexing and snippets; use Search preview controls when presentation, rather than crawling, is the issue
Google-ExtendedControl token for specified Gemini training and grounding usesDo you accept those named uses independently of Search?Disallowing it does not affect Google Search inclusion or ranking
bingbotBing index crawler used for traditional and AI-powered search discoveryDo you want the page discoverable and fresh in Bing and Bing Copilot?Blocking undermines Bing crawl and index availability; Microsoft does not document a separate training crawler on the cited page
OAI-SearchBotChatGPT search crawlerDo you want content eligible to be surfaced in ChatGPT search answers?Disallowed pages are not shown as answer content, although OpenAI says a navigational link may still appear
GPTBotOpenAI model-development crawlerDo you permit potential use in training OpenAI foundation models?Disallowing it signals that future crawled content should not be used for that training purpose; ChatGPT search has its own token
ChatGPT-UserSome user-initiated ChatGPT and Custom GPT visitsDo you want users to retrieve the page through these actions?OpenAI says robots.txt rules may not apply, so enforced denial belongs at the access layer
Claude-SearchBotAnthropic search-quality crawlerDo you want Claude search to index and accurately surface the content?Anthropic says disabling it can reduce visibility and accuracy in search results
ClaudeBotAnthropic model-development crawlerDo you permit future content to be considered for model-training datasets?Disallowing it signals exclusion of future materials from that use
Claude-UserUser-directed retrieval for ClaudeDo you want Claude to fetch the page in response to user queries?Anthropic says its bots honor robots.txt; blocking can reduce user-directed visibility
PerplexityBotPerplexity search crawler, not a foundation-model training crawlerDo you want the page available in Perplexity search?Blocking prevents full-text search indexing under Perplexity’s documented policy
Perplexity-UserUser-triggered Perplexity fetcherDo you want on-demand retrieval, and must denial be enforced?Perplexity says this fetcher generally ignores robots.txt; use the server or edge for a hard block
ApplebotApple search crawler and source for several Apple experiencesDo you want discovery in Spotlight, Siri, Safari, and related results?Blocking affects Apple crawl and search discovery; separate controls cover model training and answer snippets
Applebot-ExtendedControl token for specified Apple foundation-model training useDo you accept that use independently of Apple search?Disallowing it does not stop Applebot crawling or ordinary search inclusion
CCBotCommon Crawl’s crawler for an open web-data repositoryDo you want future crawls contributed to a broadly reusable corpus?Common Crawl documents User-agent: CCBot plus Disallow: / as its site-wide opt-out; this is not a single assistant-visibility switch

This table deliberately omits undocumented aliases and guesses. It is also a snapshot, not a permanent registry. Bot names, purposes, IP ranges, and product consequences can change; the source URL and review trigger are part of the policy, not editorial decoration.

Decide by content zone, not only by domain

A public B2B SaaS site rarely has one sensible answer for every URL. Split the inventory into operational zones:

  • Canonical public pages such as product explanations, documentation, and evidence-backed articles can be available to search agents when discovery and citations are desired.
  • Licensed, paywalled, or partner-supplied material needs an explicit rights and product-use decision. Public reach does not automatically settle training permission.
  • Accounts, exports, admin tools, previews, and customer-specific URLs require authentication or authorization. Add crawl exclusions for hygiene, but never rely on them for secrecy.
  • Internal search results, faceted combinations, duplicate parameters, and crawl traps can be disallowed to reduce waste even when their canonical parent content remains available.

For each zone, record the smallest policy that achieves the outcome. Blocking an entire search agent because one parameter space is wasteful is usually too broad. Allowing a training agent across the whole origin because the marketing section is public may be broader than the rights decision. Path-level scope is where the ledger becomes an operating policy rather than a list of opinions.

InferredBecause operators expose separate tokens for different uses and robots.txt rules can target paths, a site can express a narrower policy by combining purpose-level agent decisions with content-zone scope.

Compile the ledger into valid robots.txt groups

The safest edit starts from the site’s existing rules. Preserve its search, rendering, sitemap, and crawl-trap decisions; then add only the groups needed to express a real difference.

One protocol detail causes many accidental leaks: a crawler with a specifically matching group does not also inherit the User-agent: * group. The wildcard is the fallback when no specific group matches. If you create a specific group for an allowed AI search bot, repeat the baseline restrictions that must still apply to it.

Within one applicable group, the longest matching path rule wins. A longer Allow can therefore open a deliberate subtree beneath a broader Disallow, but path values are case-sensitive. Test exact URLs instead of reading the file by eye.

Here is an illustrative policy for a public marketing and documentation site, not a recommendation for every publisher. It keeps public content available to three documented AI search crawlers, repeats the site’s private and low-value path exclusions for those crawlers, and declines selected model-development, extended-use, and shared-corpus access.

# Baseline for crawlers without a more specific matching group.
User-agent: *
Disallow: /account/
Disallow: /admin/
Disallow: /internal-search/
Disallow: /preview/

# AI search discovery: public paths remain allowed by default.
# Repeat baseline exclusions because this specific group does not inherit *.
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Disallow: /account/
Disallow: /admin/
Disallow: /internal-search/
Disallow: /preview/

# Model-development crawlers.
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

# Data-use control tokens; these are not standalone HTTP crawlers.
User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

# Shared open-web corpus crawler.
User-agent: CCBot
Disallow: /

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

There is no need to add Allow: / merely to look explicit: when no applicable path rule matches, the protocol allows the URI. Explicit groups earn their maintenance cost only when they express a distinct policy or make an approved decision auditable.

Do not assume Crawl-delay is portable. Anthropic says its bots support the non-standard record, while Google does not support it for Google crawlers. If request volume must be enforced, use capacity-aware controls at the server or edge and verify genuine operator traffic before allowlisting or rate limiting it.

Test the policy as a routing table

Treat the file like production configuration. The acceptance test is not “the syntax looks right.” It is a set of representative agent-and-URL pairs with expected outcomes.

For the illustrative policy above, the minimum test table is:

AgentURLExpected crawl policy
OAI-SearchBot/docs/getting-started/Allowed
OAI-SearchBot/admin/users/Disallowed
Claude-SearchBot/internal-search/?q=pricingDisallowed
PerplexityBot/blog/research-method/Allowed
GPTBot/blog/research-method/Disallowed
Google-Extended/docs/getting-started/Disallowed for the uses governed by that token
An unmatched crawler/preview/release/Disallowed by the wildcard group

Run the verification in four layers.

1. Verify every origin serves the intended file

Fetch /robots.txt from the apex, www, documentation host, and any other public origin in scope. Confirm a stable 200 response, plain-text body, expected encoding, and the exact file produced after CMS, CDN, and hosting transformations.

curl -i https://www.example.com/robots.txt
curl -i https://docs.example.com/robots.txt

Do not use an error response as policy. Under RFC 9309, a 4xx response can be treated as an unavailable file that permits crawling, while a network error or 5xx requires a conforming crawler to assume a complete disallow initially. Cached rules and operator-specific behavior make either failure mode a poor control.

2. Parse representative URLs for every specific group

Use a parser that implements RFC 9309 plus any operator-specific behavior you deliberately rely on. Test an allowed public URL, every disallowed prefix, one case-variant path, one query-pattern path if present, and both sides of any Allow exception. Store the expected matrix beside the source file so a later edit cannot silently widen access.

Google Search Console can help test Google-owned crawling behavior, but it does not prove how another operator parses its groups. The owner documentation and your protocol-level tests serve different purposes; keep both.

3. Test the actual HTTP response path

A robots parser cannot see a WAF challenge, redirect loop, origin authorization rule, or CDN feature that serves a different response by user agent. Send harmless requests through the production edge for each desired response class:

curl -I -A 'OAI-SearchBot' https://www.example.com/docs/getting-started/
curl -I -A 'GPTBot' https://www.example.com/blog/research-method/

These commands test your own user-agent handling; they do not authenticate the caller. A scraper can spoof GPTBot, CCBot, or any browser string. Where an operator publishes IP ranges or reverse-DNS verification, combine that evidence with the user agent before trusting, allowlisting, or attributing a request.

4. Observe genuine traffic and product consequences

After release, check server logs for the documented agents, paths, response codes, request rates, and source verification. Compare observed behavior with the ledger rather than with analytics alone: crawlers may not run JavaScript, so client-side analytics can miss them.

Allow for caching and recrawl delay. RFC 9309 permits caching, and OpenAI says its search systems may take about 24 hours to adjust after a robots.txt change. Search discovery, indexing, and answer citations can take longer and are never guaranteed. Define a rollback condition before release—for example, wanted search agents receiving denials, server load exceeding the approved capacity boundary, or a bot purpose changing in operator documentation.

Review the policy when the meaning changes

A bot policy decays even when the file does not. Review it when an operator adds or retires a token, combines product uses, changes its robots.txt commitment, revises IP ranges, or introduces a new search or user-retrieval path. Reopen the decision when content rights, paywall behavior, infrastructure cost, or the site’s discovery strategy changes.

Avoid a calendar-only ritual that re-approves stale assumptions. The most useful review receipt is a diff with four attachments: the updated ledger, links to current operator documentation, the agent-and-URL test matrix, and a small log sample showing what the production edge actually returned. That is enough for content, SEO, platform, security, and legal owners to see the same decision.

The decision
For a public B2B SaaS site that wants AI search visibility, keep documented search and index agents able to reach canonical public content, decide training and shared-corpus tokens separately, and enforce private-content boundaries with authentication or edge controls. Publish no bot rule until its purpose, consequence, scope, owner, and verification test are written down.

The durable rule is simple: allow or block an outcome, not a logo. robots.txt is useful when it is the compiled output of that decision. As a copied list of bot names, it is only a stale policy waiting to create the wrong consequence.

Sources

  1. RFC Editor, “RFC 9309: Robots Exclusion ProtocolSupports: robots.txt is a UTF-8 plain-text file at the top-level /robots.txt path for a specific scheme and authority; Crawlers select matching user-agent groups, fall back to the wildcard group only when no specific group matches, and use the most specific matching path rule; The protocol is not a security control, and paths named in robots.txt are publicly discoverable; Conforming crawlers may cache robots.txt and treat unavailable and unreachable responses differently. Checked 2026-06-26.Limitation: The RFC defines protocol behavior for conforming crawlers; it cannot compel an undeclared or noncompliant client, and individual operators may document additional records or product behavior.
  2. OpenAI, “Overview of OpenAI CrawlersSupports: OAI-SearchBot is used for ChatGPT search, while GPTBot controls potential model-training use; OAI-SearchBot and GPTBot settings are independent; ChatGPT-User supports some user-initiated visits, and robots.txt rules may not apply to those requests; OpenAI publishes IP ranges for its documented agents. Checked 2026-06-26.Limitation: This is operator documentation and may change as OpenAI products, user-agent strings, IP ranges, and treatment of user-triggered requests evolve.
  3. Anthropic Privacy Center, “Does Anthropic Crawl Data from the Web, and How Can Site Owners Block the Crawler?Supports: Anthropic documents ClaudeBot for potential model-training data, Claude-SearchBot for search, and Claude-User for user-directed retrieval; Anthropic states that its documented bots honor robots.txt; Anthropic supports the non-standard crawl-delay record for its bots. Checked 2026-06-26.Limitation: These commitments and bot purposes are specific to Anthropic; crawl-delay is not part of the core Robots Exclusion Protocol and is not portable across operators.
  4. Perplexity, “Perplexity CrawlersSupports: PerplexityBot is a search crawler and is not used to collect content for foundation-model training; Perplexity-User supports user-triggered retrieval and generally ignores robots.txt; Perplexity publishes IP ranges for both documented agents. Checked 2026-06-26.Limitation: This is operator documentation; search eligibility, user-triggered behavior, IP ranges, and crawler naming may change.
  5. Google Search Central, “AI Features and Your WebsiteSupports: Googlebot crawl access and normal Search eligibility govern appearance in AI Overviews and AI Mode; Search preview controls such as nosnippet, data-nosnippet, max-snippet, and noindex affect presentation or eligibility; Google-Extended is not the control for inclusion in Google Search AI features. Checked 2026-06-26.Limitation: This page documents Google Search behavior, not every Gemini, Vertex AI, or other Google product use. Eligibility does not guarantee crawling, indexing, ranking, or inclusion.
  6. Google Crawling Infrastructure, “Google's Common CrawlersSupports: Google-Extended is a robots.txt product token for specified Gemini training and grounding uses; Google-Extended has no separate HTTP user-agent string; Google-Extended does not affect inclusion or ranking in Google Search. Checked 2026-06-26.Limitation: Google-Extended covers the Google uses named in the documentation; it should not be generalized into a control for every Google AI or Search surface.
  7. Apple Support, “About ApplebotSupports: Applebot powers search experiences including Spotlight, Siri, and Safari; Applebot-Extended controls whether Applebot-crawled content may be used to train Apple's general-purpose foundation models; Applebot-Extended does not crawl, and disallowing it does not remove content from Apple search results. Checked 2026-06-26.Limitation: Applebot serves several Apple experiences, and Apple documents separate snippet and data-use controls; a single allow or disallow decision does not describe every Apple use.
  8. Common Crawl, “CCBotSupports: CCBot identifies itself with the CCBot robots.txt token; Common Crawl publishes an open repository of crawl data and documents a site-wide robots.txt block for CCBot; User-agent strings can be spoofed by crawlers falsely claiming to be CCBot. Checked 2026-06-26.Limitation: Common Crawl is a general open-web corpus, not one AI answer product; blocking future CCBot access does not by itself describe or reverse every downstream use of previously collected data.
  9. Google Search Central, “Introduction to robots.txtSupports: robots.txt manages crawl access and is not a reliable method for keeping a web page out of Google Search; A disallowed URL may still be indexed from external signals without a content snippet; Noindex or authentication serves different goals from robots.txt. Checked 2026-06-26.Limitation: The indexing and presentation details are specific to Google Search; other operators may implement different indexing controls.
  10. Bing Webmaster Blog, “Keeping Content Discoverable with Sitemaps in AI-Powered SearchSupports: Bing recommends keeping content crawlable, fresh, and indexed for discovery in Bing Copilot and other AI-powered search experiences; Bing uses robots.txt sitemap references and Bing Webmaster Tools for URL discovery. Checked 2026-06-26.Limitation: This source supports the relationship between Bing crawlability and AI-powered search discovery; it does not define a separate Bing model-training crawler or a universal Copilot inclusion guarantee.

Continue the evidence path

Run your growth team from one screen.

Invite only