Guides / How to Allow AI Search While Blocking Model Training

How to Allow AI Search While Blocking Model Training

A provider-specific robots.txt pattern for allowing AI search discovery while restricting named model-training crawlers and data-use controls.

You can allow named AI search crawlers while blocking named model-training crawlers because major providers document separate robots.txt tokens for different purposes. A balanced policy commonly allows OAI-SearchBot, Claude-SearchBot, and PerplexityBot, while disallowing GPTBot and ClaudeBot. Google-Extended is a separate data-use control and does not determine Google Search inclusion.

Start with the policy goal

Do not copy a robots.txt block before deciding what you want.

A balanced policy means:

This is a business and governance choice, not a universal best practice.

A cautious multi-provider example

# OpenAI search discovery
User-agent: OAI-SearchBot
Allow: /

# OpenAI potential model-training collection
User-agent: GPTBot
Disallow: /

# Anthropic search discovery
User-agent: Claude-SearchBot
Allow: /

# Anthropic potential model-training collection
User-agent: ClaudeBot
Disallow: /

# Perplexity search discovery
User-agent: PerplexityBot
Allow: /

# Google Search remains controlled through Googlebot.
User-agent: Googlebot
Allow: /

# Restrict the documented Google-Extended data uses.
User-agent: Google-Extended
Disallow: /

Review the provider documentation before deploying this example. Tokens, product descriptions, and verification methods can change.

Decide user-triggered retrieval separately

OpenAI, Anthropic, and Perplexity document user-triggered agents separately from background discovery crawlers.

A site that wants to allow public-page retrieval in supported user workflows might add:

User-agent: ChatGPT-User
Allow: /

User-agent: Claude-User
Allow: /

Perplexity documents Perplexity-User as a user-requested fetcher and states that it generally ignores robots.txt because the user requested the retrieval. Treat that behaviour as provider-specific rather than assuming one common rule across every product.

User-triggered retrieval still does not provide access to content protected by authentication.

Provider distinctions

OpenAI

See GPTBot vs OAI-SearchBot.

Anthropic

Anthropic says its bots honour robots.txt and currently does not publish stable IP ranges for them.

Perplexity

Perplexity publishes current IP-range endpoints. Use the live provider data if configuring a WAF.

Google

Google says Google-Extended does not affect Search inclusion or ranking. Do not use it as a proxy for AI Overviews eligibility.

Preserve existing search-engine access intentionally

A broad wildcard block can undermine the policy you intended:

User-agent: *
Disallow: /

If the site needs normal search visibility, review how wildcard and token-specific groups apply. Do not assume that adding a few AI-specific Allow lines fixes every crawler or path interaction.

The Robots Exclusion Protocol uses product-token group matching and the most specific matching path rule. Keep the file simple enough to review manually.

Apply the policy to every relevant hostname

A robots.txt file applies to the specific scheme, hostname, and port where it is served. Review:

Do not assume the root-domain file governs every subdomain.

Keep private content private

Never rely on robots.txt for:

RFC 9309 states that robots.txt rules are not access authorisation. Use authentication, authorisation, network controls, and appropriate response headers.

Common implementation errors

Copying a stale token list

Provider products change. Store a last-verified date and link to the primary documentation rather than presenting a copied list as permanently complete.

Confusing a data-use token with a crawler

Google-Extended has no separate HTTP user-agent string. It should not be monitored as though it independently crawls pages.

Treating a training block as a visibility error

Blocking GPTBot or ClaudeBot can be the intended balanced policy. A readiness score should not punish that choice automatically.

Ignoring WAF or CDN behaviour

A crawler may be allowed in robots.txt but receive a JavaScript challenge, rate-limit response, or access-denied page.

Publishing contradictory rules

Multiple matching groups may be combined by compliant parsers. Duplicate groups and inherited wildcard rules can produce a result different from a quick visual reading.

Verification checklist

  1. Open each deployed /robots.txt URL and confirm a successful plain-text response.
  2. Check the exact token spelling against current provider documentation.
  3. Resolve the rule for / and important restricted paths.
  4. Confirm that ordinary search crawlers still have the intended access.
  5. Test for CDN or WAF challenges using safe, authorised requests.
  6. Check server logs only as supporting evidence; user-agent strings can be spoofed.
  7. Record the policy owner, rationale, and review date.
  8. Re-run the policy audit after every material change.

What this configuration does not guarantee

It does not guarantee:

Next step

Preview the balanced crawler-policy audit to see how OpenForBots evaluates the same directive differently under balanced, maximum-access, and review-only goals.