Robots.txt for AI Crawlers: Rules for ChatGPT, Claude, Perplexity and Google

Published · 8 min read

Platform details checked against official documentation on November 10, 2026.

To control AI crawlers with robots.txt, add a group for each crawler's name (its "user agent") followed by Allow or Disallow rules. The names that matter most are OAI-SearchBot, GPTBot and ChatGPT-User for OpenAI; Claude-SearchBot, ClaudeBot and Claude-User for Anthropic; PerplexityBot and Perplexity-User for Perplexity; Googlebot and Google-Extended for Google; and Bingbot for Microsoft. The search crawlers decide whether you can appear in AI answers; the training crawlers decide whether your content is used to build AI models. You can choose each separately.

This guide is a reference. If you just want ChatGPT and similar tools to be able to read your site, the shorter guide to allowing AI crawlers is the place to start.

What robots.txt is

robots.txt is a plain text file at the root of your website, such as https://www.example.com/robots.txt. Well-behaved crawlers read it before fetching pages and follow its rules. It is a request, not a lock: it doesn't stop a crawler that chooses to ignore it, and it doesn't keep a page out of search results on its own. Google is explicit that robots.txt "is not a mechanism for keeping a web page out of Google." To keep a page out of Google, use a noindex tag, and don't block that page in robots.txt, or Google can't see the tag.

The AI crawler names

These names come from each company's own crawler documentation, checked on the date shown at the top of this page.

User agentCompanyWhat it doesFollows robots.txt?
OAI-SearchBotOpenAIFinds pages to show and link in ChatGPT search answersYes
GPTBotOpenAICollects content that may be used to train OpenAI's modelsYes
ChatGPT-UserOpenAIFetches a page because a ChatGPT user asked for itOpenAI says robots.txt "may not apply"
Claude-SearchBotAnthropicImproves the quality of Claude's search resultsYes
ClaudeBotAnthropicCollects content that may be used for trainingYes
Claude-UserAnthropicFetches pages for Claude usersYes
PerplexityBotPerplexityFinds and links pages in Perplexity's search resultsYes
Perplexity-UserPerplexityFetches a page a Perplexity user asked aboutPerplexity says it "generally ignores" robots.txt
GooglebotGoogleGoogle Search, including AI Overviews and AI ModeYes
Google-ExtendedGoogleNot a separate crawler: a token that controls use for Gemini training and grounding. It does not affect Google Search.Yes
BingbotMicrosoftBing search, which Microsoft's AI features also draw onYes
Applebot-ExtendedAppleNot a separate crawler: a token that controls use for training Apple's models. Pages that block it can still appear in Apple's search features.Yes
CCBotCommon CrawlBuilds an open archive of the web that many organizations useYes

OpenAI also documents OAI-AdsBot, which only visits pages submitted as ChatGPT ads. Older names you may see in copied files, such as anthropic-ai or Claude-Web, are not in Anthropic's current list.

How robots.txt rules are read

These rules come from Google's published robots.txt specification. Other major crawlers follow the same standard, but check a company's documentation if a detail matters to you.

  1. One file per host. The file only covers the exact host and protocol it is on. https://www.example.com/robots.txt doesn't cover https://shop.example.com.
  2. A crawler follows one group. It uses "the group with the most specific user agent" that matches its name, and ignores the others. A crawler with its own group does not also follow the User-agent: * group.
  3. Repeated groups combine. If the same crawler is named in two groups, its rules are merged.
  4. The longest matching rule wins. When an Allow and a Disallow both match a page, the one with the longer path applies. If they are the same length, Google uses the least restrictive one.
  5. Paths are case-sensitive. Disallow: /Private/ doesn't block /private/.
  6. Size and errors. Google reads up to 500 KiB of the file. If the file returns "not found," Google treats the site as having no restrictions. If the server returns an error, Google pauses crawling and retries, then falls back on the last good copy.
  7. Changes aren't instant. Google generally caches robots.txt for up to 24 hours; OpenAI and Perplexity both describe about a day for changes to take effect.

Copy-and-paste recipes

Replace example.com with your own domain, and keep any existing rules your site needs, such as blocks on admin or checkout pages.

Allow everything

robots.txt
User-agent: *
Allow: /

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

Allow AI search, decline AI training

This is the most common choice for a local business that wants to be found but doesn't want its content used to train models.

robots.txt
User-agent: *
Allow: /

# Training crawlers and tokens: declined
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /

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

The search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot, Bingbot) aren't named, so they follow the * group and are allowed.

Keep a private folder off-limits and decline training

robots.txt
User-agent: *
Disallow: /client-portal/

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

Here the named training crawlers are blocked everywhere, and everyone else is kept out of /client-portal/. If you later add a group that allows a named crawler, repeat Disallow: /client-portal/ in that group, because a named crawler ignores the * rules.

robots.txt
User-agent: OAI-SearchBot
User-agent: GPTBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: ClaudeBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /

This keeps your site out of ChatGPT, Claude and Perplexity search answers. It doesn't remove you from Google's AI Overviews, which follow Googlebot, and the user-triggered fetchers may still visit when someone asks about a specific page.

How to test your file

  1. Open it in a browser at /robots.txt on every host you use, with and without www if both work.
  2. Use Google Search Console's robots.txt report to see the copy Google fetched and any lines it couldn't parse.
  3. Read it from top to bottom for each crawler you care about: find the most specific group that names it (or * if none does), and check which rules apply.
  4. Check your firewall separately. robots.txt can't show a block made by Cloudflare, your host or a security plugin. Our guide to allowing AI crawlers covers where to look.

Common mistakes

  • Typos in the crawler name. GPT-Bot or OAISearchBot match nothing, so the rule is silently ignored.
  • Assuming * rules still apply to a named crawler. They don't, as explained above.
  • Blocking a page in robots.txt to hide it from search. Use noindex instead, and leave the page crawlable.
  • A leftover Disallow: / from a staging site. Sites copied from a test version often keep a block-everything rule.
  • Expecting Crawl-delay to work everywhere. Google ignores it. Anthropic and Common Crawl support it; Apple says Applebot doesn't follow it.
  • Relying on llms.txt instead. Google says Google Search doesn't use llms.txt files, and that one "will neither harm nor help" your visibility there. OpenAI, Anthropic and Perplexity's crawler documentation doesn't mention it. It is optional, not a replacement for robots.txt.

Limitations

Allowing a crawler makes your pages available to it; it doesn't decide whether a tool cites you. And robots.txt depends on crawlers choosing to follow it, which is why each company publishes the IP addresses its crawlers use, so you can tell a genuine visit from an imitation.

Sources

Want to know what else might be affecting your website's visibility?

Get a free CloudPlus visibility preview and see what may need attention. The free check reads your robots.txt and shows which of six crawlers it blocks: GPTBot, OAI-SearchBot, PerplexityBot, ClaudeBot, Google-Extended and Bingbot. No account needed.

Check My Website Free