Robots.txt for AI Crawlers

Understand what major AI crawler names do, what blocking them can mean, and how to write cautious robots.txt rules for your site.

If you want ChatGPT to find your public help pages while opting out of OpenAI’s training crawl, you can usually leave your search rules alone. The change belongs in the group for GPTBot. Adding a second group that grants the search bot broad access can undo restrictions you meant to keep. Start by opening the robots file your site actually serves.

Work Out Which Rule Applies

Suppose your site has this rule for public search engines:

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

A crawler following the Robots Exclusion Protocol uses the wildcard group when it has no matching named group. If you give a bot a group of its own, it takes its rules from the matching group or groups. It no longer inherits the wildcard restrictions. Two matching groups for the same bot combine, so check the whole file before adding a directive. RFC 9309, section 2.2.1.

Here a studio’s public classes can already be crawled while its internal search results are excluded. Adding a named group for a search bot with a blanket allowance would let that bot fetch both. If a named exception is necessary, carry over every path restriction that should still apply. If the existing group already expresses your policy, leave it alone.

A robots file is public. Put confidential documents behind authentication and check permissions when someone requests them. A crawler directive asks participating services to respect your preferences. Anyone with a browser can still open a public URL they know. RFC 9309, security considerations.

Choose the Service and Purpose

OpenAI

OAI-SearchBot supports discovery in ChatGPT search. GPTBot collects material that may be used to train foundation models. A page fetch by ChatGPT-User can follow a person’s request, in which case robots rules may not apply. There is also OAI-AdsBot: it checks submitted ad landing pages for safety and can help determine ad relevance. OpenAI excludes data that bot collects from foundation-model training. OpenAI’s crawler reference.

For an editor investigating a missing link in an answer, first check the rule for OAI-SearchBot. A successful visit from the ad checker or a user’s chat answers a different question. To inspect which claim an answer actually credits to your page, follow the ChatGPT citation audit.

Anthropic

Anthropic gives site owners three choices. ClaudeBot collects material that may contribute to training. Claude-SearchBot indexes content for Claude’s search results. Claude-User fetches pages in response to a user’s request. Anthropic documents robots controls for all three. When deciding whether someone should be able to ask Claude to read a public support page, check the user token as well as the search token. Anthropic’s site-owner guide.

Perplexity

PerplexityBot discovers sites to link in search results. Perplexity says this bot does not crawl content for foundation-model training. Perplexity-User visits a page when someone asks a question and generally ignores robots rules. If you need to enforce a restriction, use your access controls. For firewall rules for this fetcher, Perplexity publishes its IP ranges separately from the search bot’s ranges. Perplexity’s crawler guide · User-fetcher IP ranges.

Google

Googlebot fetches pages for Search. Google-Extended is a product token that Google applies to content fetched by existing crawlers. You won’t see a separate Google-Extended crawler in your logs. The token covers training future foundation models for certain Google products and using your content to ground answers outside Search, including Gemini apps and the Vertex AI API for Gemini. Disallowing it leaves Google Search eligibility and rankings unaffected. Google’s product-token documentation · Google’s crawler-to-product guide.

Preserve Search Access While Blocking Training Crawls

Here is a complete example for a site that excludes its internal search results from general crawling and chooses to disallow OpenAI’s and Anthropic’s training crawlers. Compare it with your existing groups before making edits.

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

User-agent: GPTBot
User-agent: ClaudeBot
Disallow: /

In this example, OAI-SearchBot and Claude-SearchBot can crawl public product pages under the wildcard group. Both still have to avoid the internal search path. The two training tokens share a group because the site has made the same decision about each. If your current file has separate rules for these bots, evaluate those first.

Use a small acceptance table when reviewing a change. The expected results below are for the example file and compliant crawlers.

Request Expected Result Reason
Claude-SearchBot requests /classes/ Allowed The wildcard group has no rule against the class page.
Claude-SearchBot requests /internal-search/results Disallowed The wildcard path restriction applies.
GPTBot requests /classes/ Disallowed Its named group covers the whole site.
OAI-SearchBot requests /internal-search/results Disallowed The search bot keeps the wildcard restriction.

Choose a Google Search Control

For a property-wide choice about AI Overviews, AI Mode, and generative features in Discover, open Settings → Search generative AI in Search Console. The exclusion setting covers links and grounding in those features while preserving eligibility for other Search results. Check the effective value on the property that covers the actual URL, especially when it inherits a setting from a parent. Google’s Search generative AI control.

For a particular page or passage, Google documents nosnippet, max-snippet, and the HTML attribute data-nosnippet as preview controls. Choose according to whether you want to suppress the snippet, limit its length, or withhold selected text. Blocking Googlebot from a whole site affects ordinary Search as well. See Google’s guide to generative AI controls and our guide to AI Overview sources.

Check the Published File

Fetch the root robots file on the exact host that serves the page. A change on the marketing host won’t edit the file on a documentation subdomain. Read the deployed response, then compare the expected results for a public URL and an excluded path. Include both examples in the change request so a colleague can spot an accidental broad allowance.

The free AI crawler checker reads public crawl directives and checks for a root llms.txt file. Follow up with your hosting logs if a permitted page still receives a challenge or an error. A robots result describes the site’s stated policy. A request log shows what happened to a particular visit. To establish whether someone actually saw a citation, open the answer and its source.

Before closing the change, check a second host if your site uses one. A shop might serve its product description from the main domain and its size guide from a support subdomain. A visitor asking for fit advice needs the size guide, so checking only the home page can send the investigation down the wrong path. Record the full public URL you tested and which site’s robots file you read.

When the team disagrees about the result, write the two expectations as separate sentences. “Search engines may fetch the fitting guide” is a crawl decision you can test against your rules. “A particular answer will link to the fitting guide” is an observation you need to make in that product. That distinction helps the person who owns hosting decide whether a configuration change would solve the problem.

Frequently Asked Questions

Can I Block Training and Keep Claude Search?

Yes. Check the effective groups for ClaudeBot and Claude-SearchBot separately. In the example above, only the training crawler receives a site-wide block.

Will a Google-Extended Rule Remove My Site From AI Overviews?

Google uses the Search generative AI control for this decision. Review the setting on your Search Console property before changing Googlebot access.

Find Out What AI Says About Your Business

Add your business and your first questions, and start tracking what AI answers say.

Ask AI About Us