Blog

AI Crawlers in robots.txt Without Blocking Search

You can block some AI training crawlers without blocking the same company's search crawler. The important distinction is the crawler's job. OpenAI, for example, separates GPTBot for potential training collection from OAI-SearchBot for ChatGPT search. Its documentation says those settings are independent.

For several sites, write down the policy before editing files. Decide which public pages search crawlers should reach, which training uses you want to restrict, and which hosts need their own rules. The examples below provide a starting file and a way to check each deployment.

Choose Rules by Crawler Purpose

Use this table before copying a blocklist. Each row describes the provider's documented controls, rather than treating every bot as a training crawler.

ProviderSearch or answer accessTraining-related controlRecommended starting decision
OpenAIOAI-SearchBot; separate user-triggered ChatGPT-UserGPTBotAllow search; decide training separately
AnthropicClaude-SearchBot and Claude-UserClaudeBotAllow search and requested retrieval; decide training separately
GoogleGooglebot for Google SearchGoogle-Extended, which also controls specified grounding usesKeep Search access; review the grounding tradeoff before blocking
PerplexityPerplexityBot; separate user-triggered Perplexity-UserPerplexity says neither is for foundation-model trainingAllow PerplexityBot if you want search access

OpenAI

OpenAI has separate controls for search and potential training collection. This fits a public product site that wants ChatGPT search access while restricting training collection. Its crawler documentation also says ChatGPT-User handles user-triggered requests, so robots.txt rules may not apply to those requests.

Best for: Separating ChatGPT search access from training preferences.

Example: Allow OAI-SearchBot on your pricing and documentation pages, while setting Disallow: / for GPTBot.

Anthropic

Anthropic distinguishes training collection, search, and user-requested retrieval. This fits a site where you want Claude to find public documentation without permitting ClaudeBot's training collection. The Anthropic crawler documentation names ClaudeBot, Claude-SearchBot, and Claude-User separately and says its bots honor robots.txt.

Best for: Setting different rules for Claude's training and answer-related access.

Example: Block ClaudeBot, while allowing Claude-SearchBot and Claude-User to reach your public help center.

Google

Google-Extended is a control token, without its own HTTP request user-agent string. Google's common crawler documentation says it covers future Gemini model training and specified grounding uses in Gemini Apps and Vertex AI. Blocking it does not affect inclusion or ranking in Google Search.

Best for: Restricting those Google uses while retaining Google Search access, if you accept the grounding restriction too.

Example: Leave Googlebot allowed and disallow Google-Extended. Don't describe this as a training-only change, because the same control covers those grounding uses. Google Search's AI features use Googlebot access controls, as explained in its AI features documentation.

Perplexity

Perplexity describes PerplexityBot as its search crawler and Perplexity-User as a user-requested fetcher. This fits public pages you want available in Perplexity results. Its crawler documentation says these agents aren't used to collect foundation-model training content. It also says Perplexity-User generally ignores robots.txt because a user requested the fetch.

Best for: Keeping Perplexity search access without confusing its search crawler with a training crawler.

Example: Allow PerplexityBot on your public blog. Treat restrictions on user-requested retrieval as a separate access-control decision.

Start With Search Allowed and Selected Training Restricted

For a public SaaS marketing site, a reasonable starting policy is to allow search crawlers, restrict selected training crawlers, and exclude nonpublic routes from cooperative crawling. Adjust this to your actual content policy.

This example covers the providers above. It isn't a complete list of AI crawlers, and the Google restriction includes the grounding tradeoff already described. The syntax follows the Robots Exclusion Protocol.

# Default policy, including search crawlers without a named group
User-agent: *
Disallow: /account/
Disallow: /internal/

# Explicit search crawler policy
User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
Disallow: /account/
Disallow: /internal/

# Selected training-related restrictions
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
Disallow: /

Replace /account/ and /internal/ with your site's actual exclusions. Preserve existing rules and your real Sitemap line. Don't replace a production file wholesale just because this example is shorter.

An explicit Allow: / isn't necessary here. Paths without a matching restriction are allowed by default. Publish the file as UTF-8 plain text at /robots.txt on the relevant host, rather than inside your blog directory. Google's file creation instructions explain placement and formatting.

If you want to allow training collection too, remove the corresponding named restriction after reviewing the remaining rules. If you want to restrict automated search crawling, add a dedicated disallow group for that search crawler. Neither choice guarantees control over every user-requested fetch or uncooperative scraper.

Keep Named Groups From Reopening Excluded Paths

A named crawler group doesn't inherit the wildcard group's exclusions. Google's robots.txt interpretation documentation explicitly says specific and global groups aren't combined. The Robots Exclusion Protocol also defines wildcard fallback when no matching group exists.

Consider this file:

User-agent: *
Disallow: /account/
Disallow: /internal/

User-agent: OAI-SearchBot
Allow: /

The named group gives OAI-SearchBot a different policy from the wildcard group. To retain those exclusions, repeat them in its group, as the starting file does. Moving the wildcard group above or below it doesn't solve the problem.

For five sites, keep a small policy record alongside each file. Record the intended treatment of /, a documentation page, a blog page, and an excluded route. Don't approve a shared template from a home-page result alone.

Keep crawler exclusions separate from privacy controls. Robots.txt is public and isn't access authorization. Put customer records, exports, and internal pages behind authentication and authorization. Listing a sensitive path in robots.txt doesn't protect its contents.

Check the File Each Host Actually Serves

A policy on one host doesn't automatically govern another. Google's documentation scopes robots.txt rules to the relevant protocol, host, and port. A documentation subdomain therefore needs its own check.

For three products, your working inventory might look like this. These are example decisions, not universal defaults.

HostIntended policyDeployment owner
Product A marketing siteSearch allowed; selected training restrictedMarketing site repository
Product A documentationSame policy, with documentation-specific exclusionsDocumentation host
Product B public siteSearch and training allowedSite repository
Product C public siteSearch allowed; selected training restrictedHosting configuration

Fetch the published response after deployment. This shell loop uses placeholder domains you must replace:

for host in example.com docs.example.com example.org; do
  printf '\n=== %s ===\n' "$host"
  curl --silent --show-error --location \
    --dump-header - "https://$host/robots.txt"
done

The command prints response headers and the body. Its options are documented in the curl manual. Check that the final response contains your intended plain-text file, rather than an application page or hosting error.

For a quick interpretation, the LopeBase AI crawler checker fetches robots.txt and evaluates home-page access for its listed crawlers. It separates answer-related agents from training-related agents and shows whether a crawler has a named group or falls back to wildcard rules. It doesn't change your file. Its home-page result doesn't establish access to every page or prove that a firewall will admit a real crawler.

Keep any separate llms.txt checks outside this deployment's pass criteria. The robots.txt test should establish which crawler rules apply to which URLs.

Verify Allowed Crawlers Can Reach Public Pages

A correct robots.txt file is only one part of access. OpenAI recommends permitting its published search crawler IP ranges, and Perplexity documents firewall rules separately from robots.txt. An allowed crawler can still encounter a server-side block or challenge.

Use this deployment check for each host:

  1. Retrieve the live robots.txt file and compare it with the intended version.
  2. Evaluate the home page and representative deeper paths against the applicable crawler groups.
  3. Review firewall events for the crawlers you intend to admit.
  4. Check request logs for actual visits to those public paths.
  5. Save the tested version and a rollback copy.

For identity checks, use the provider's published verification information rather than trusting a user-agent name alone. OpenAI and Perplexity publish crawler IP lists in their documentation. Perplexity's firewall instructions specifically match each bot's user-agent with its own published IP ranges.

Changing a curl user-agent header can help investigate header-based behavior, but it doesn't turn your request into a verified provider request. The curl option changes the header, not the source network.

Roll the policy out to one public site first. Check its representative URLs, then apply the reviewed pattern to the other sites. Keep each site's path exclusions and training decision explicit instead of copying one file unchanged across the portfolio.

FAQ

Something else? Contact us.

Does blocking GPTBot also block ChatGPT search?

No. OpenAI documents GPTBot and OAI-SearchBot as independent controls. Check the applicable rules for OAI-SearchBot before concluding that your training restriction also blocks search.

Is there one robots.txt rule that blocks all AI crawlers?

No universal AI-only crawler group exists in the Robots Exclusion Protocol. User-agent: * applies to unmatched crawlers generally, including ordinary search crawlers. Explicitly named groups can have different rules. A bot-specific list also can't force an uncooperative scraper to comply.

Should a shared AI training signal replace named rules?

Keep named rules for now. As of November 22, 2026, Anthropic describes a rollout of the shared training preference signal and says explicit ClaudeBot rules take priority. Google says it intends to support __usage_ai-training in early 2027. Don't assume uniform support across providers.

How soon do robots.txt changes take effect?

Allow time for providers to refresh their policy. OpenAI says search adjustments can take about 24 hours, and Perplexity says changes may take up to 24 hours. Verify the served file immediately, then check provider access again after its documented refresh window.

Run every product from one console.Free for one property. No card.
Start free