Skip to content

Blog

robots.txt for AI crawlers: three files you can copy

To control AI crawlers in robots.txt, name each one in its own group: allow the search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) if you want to appear in AI answers, and disallow the training ones (GPTBot, ClaudeBot, Google-Extended) if you do not want your content used to train models.

By Hemanth Arety ·

Which AI crawler names go in robots.txt?

Nine names cover OpenAI, Anthropic, Perplexity and Google, and they fall into three jobs.

OpenAI
Search (decides if you appear in answers): OAI-SearchBot
Training: GPTBot
Fetches for a person who asked: ChatGPT-User
Anthropic
Search (decides if you appear in answers): Claude-SearchBot
Training: ClaudeBot
Fetches for a person who asked: Claude-User
Perplexity
Search (decides if you appear in answers): PerplexityBot
Training: None named
Fetches for a person who asked: Perplexity-User
Google
Search (decides if you appear in answers): Googlebot (normal Search, which AI Overviews use)
Training: Google-Extended
Fetches for a person who asked: None named

The names come from each company's own page: OpenAI, Anthropic, Perplexity and Google, all read on 18 November 2026. Other companies run AI crawlers too. These four are the ones behind the answers most customers see.

File 1: allow everything

Use this if you want to be found and do not mind your content being used for training.

User-agent: *
Allow: /

Sitemap: https://yoursite.com/sitemap.xml

A crawler that is not named anywhere in the file follows the "*" group, so this one group lets all of them in. It is what this site uses.

File 2: appear in AI answers, but opt out of training

This is the one most companies want.

# AI search and user requests: allowed
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /

# AI training: not allowed
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
Disallow: /

# Everyone else, including Googlebot
User-agent: *
Allow: /

Sitemap: https://yoursite.com/sitemap.xml

Several "User-agent" lines can share one group, which keeps the file short.

File 3: block all AI use

Use this only if you have decided you do not want to appear in AI answers at all.

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
Disallow: /

User-agent: *
Allow: /

Know what this costs. OpenAI says sites opted out of OAI-SearchBot are not shown in ChatGPT search answers. Anthropic says blocking Claude-SearchBot may reduce your visibility in Claude's search results. And it does not remove you from Google's AI Overviews, which is the next point.

Does blocking Google-Extended remove me from AI Overviews?

No. AI Overviews are part of Google Search and use the normal Googlebot index.

Google says Google-Extended controls whether your content may be used to train the models behind Gemini and to ground answers in the Gemini apps and Vertex AI, and that it does not affect a site's inclusion in Google Search and is not a ranking signal. To limit what Google's AI features in Search show from a page, Google points to the normal preview controls: nosnippet, data-nosnippet, max-snippet or noindex. Blocking Googlebot would remove you from Google Search entirely.

Which mistakes block AI crawlers by accident?

Four, and the first is the most common.

  1. A named group replaces the general one. A crawler follows the most specific group that names it and ignores the rest. If you write a group for GPTBot with one rule, GPTBot no longer reads your "*" group at all. Put every rule that crawler needs inside its own group.
  2. **An old "Disallow: /" under "*".** Left over from a staging site, it shuts out every crawler that is not named elsewhere.
  3. A firewall that overrides the file. robots.txt is a request, not a lock. Bot protection on a CDN can block AI crawlers before they ever read it. Cloudflare, for example, has separate settings for Search, Agent and Training traffic. Check those settings as well as the file.
  4. One file for many subdomains. Each subdomain serves its own robots.txt. Rules on yoursite.com do not apply to shop.yoursite.com.

Do the fetchers that act for a person obey robots.txt?

It depends on the company.

  • Claude-User: yes. Anthropic says it lets site owners control these requests through robots.txt.
  • ChatGPT-User: OpenAI says robots.txt rules may not apply, because a person started the request.
  • Perplexity-User: Perplexity says this fetcher generally ignores robots.txt rules, for the same reason.

If you must keep a page away from these, block by IP address at your server using each company's published list. For most companies the goal is the opposite: make sure these fetchers are not blocked, so a customer who pastes your link into an assistant gets a real answer.

How do I test my own file?

Paste it into the AI crawler robots.txt checker.

It reads the file the way a crawler does and shows, for each of the crawlers above, whether it is allowed and which line decided. It runs in your browser and is free.

How long do changes take?

About a day.

OpenAI says it can take around 24 hours for its search systems to adjust after a robots.txt update, and Perplexity says up to 24 hours. After that, check your server logs for the crawler names and a 200 response.

The free Kortex audit checks whether the AI search crawlers can reach your site, and shows what ChatGPT, Gemini and Claude answer when customers ask about what you sell. For more on each company's bots, see OpenAI's three crawlers, Anthropic's three crawlers, Perplexity's two and Google-Extended. If you have not decided which file you want, start with should you block AI crawlers?

Questions

Frequently asked questions

  • How do I allow AI search but block AI training in robots.txt?

    Allow OAI-SearchBot, Claude-SearchBot and PerplexityBot, and disallow GPTBot, ClaudeBot and Google-Extended. Each company separates its search crawler from its training one.

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

    No. There is no shared name for AI crawlers today, so each one is named separately. A shared training-preference signal is being drafted at the IETF, and Anthropic has begun to honour it.

  • Does robots.txt actually stop AI crawlers?

    It stops the ones that choose to follow it. OpenAI, Anthropic, Perplexity and Google say their crawlers do. It is a request, so a firewall rule is the only hard block.

  • Will blocking GPTBot remove my site from ChatGPT?

    No. GPTBot is for training. Whether you appear in ChatGPT's search answers depends on OAI-SearchBot.

  • Where does robots.txt go?

    At the root of each host, such as yoursite.com/robots.txt. Every subdomain needs its own file.

See whether AI recommends you.

20 questions your customers ask, put to ChatGPT, Gemini and Claude, plus Google, and four fixes written for you. Free, one per website.