GEO

robots.txt and AI bots: which to allow and which to block.

Which AI bots train models and which drive visibility in ChatGPT, Claude and Perplexity. Ready-to-copy robots.txt rules and the most common mistakes.

Illustration: a robots.txt file with rules for AI bots and three groups of bots: model training, AI search and user-triggered

More and more businesses add a block “for AI” to robots.txt because they do not want their content to train models. Often they block something they never meant to: visibility in ChatGPT, Claude or Perplexity search. This happens because “AI bots” covers three different kinds of bots, and each is blocked separately. Below I explain what each bot does and give ready-to-copy rules.

Three kinds of AI bots

  1. Model training bots. They collect content that future model versions are built from. A block keeps your future content out of training. It does not remove your site from AI search.
  2. AI search bots. They build the index ChatGPT, Claude or Perplexity draw on for search answers. A block means your site stops appearing there.
  3. User-triggered bots. They open a page when someone asks a chat to check a specific address or when the tool looks up an answer live. OpenAI and Perplexity say plainly that such bots may ignore robots.txt, because a person requested the fetch.
BotCompanyWhat it doesWhat a block does
GPTBotOpenAIModel trainingContent stays out of training. ChatGPT search still works.
OAI-SearchBotOpenAIChatGPT searchYour site disappears from ChatGPT search answers, at most remaining as a navigational link.
ChatGPT-UserOpenAIFetching a page at a user's requestrobots.txt rules may not apply.
ClaudeBotAnthropicModel trainingFuture content stays out of training.
Claude-SearchBotAnthropicSearch in ClaudeLess visibility in Claude search results.
Claude-UserAnthropicFetching a page at a user's requestClaude will not fetch your page when someone asks about it.
PerplexityBotPerplexityPerplexity searchYour site stops appearing in Perplexity results. Perplexity says it does not use this bot to train models.
Perplexity-UserPerplexityFetching a page at a user's requestGenerally ignores robots.txt.
Google-ExtendedGoogleConsent to use content for training GeminiDoes not affect Google Search results or AI Overviews.
Applebot-ExtendedAppleConsent to use content for training Apple modelsDoes not affect Apple search.
meta-externalagentMetaCollecting content for Meta AI modelsContent stays out of Meta model training.
CCBotCommon CrawlA public web archive many AI companies useYour site will not be included in future Common Crawl datasets.
Based on OpenAI, Anthropic, Perplexity and Google documentation as of November 2026. Providers add new bots, so it is worth checking their lists from time to time.

What about Google?

Google causes the most confusion. AI Overviews and AI Mode use the same index as regular results, which means Googlebot. Block Googlebot and you disappear from Google altogether, not only from AI answers.

Google-Extended is not a separate crawler but a robots.txt token that tells Google whether it may use your content to train Gemini. According to Google, it does not affect whether or how high your site appears in Search. To exclude your whole site from AI Overviews and AI Mode, Google has offered a separate Search Console setting since 2026. You can limit individual passages with the same settings as regular snippets: nosnippet, data-nosnippet and max-snippet. I compare all these options in AI in Search Console: the new report and switch.

Ready-to-copy rules

Option 1: I want to be visible everywhere

For most service businesses this is the best choice. You block nothing, and AI can know your business and recommend it in answers.

User-agent: *
Allow: /

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

Option 2: AI search yes, model training no

Your site stays visible in ChatGPT, Claude and Perplexity search, but you ask for your content to be kept out of model training.

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: meta-externalagent
Disallow: /

User-agent: *
Allow: /

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

Option 3: I block all AI bots

A deliberate decision, for example for paid content. Your site disappears from AI search but stays in Google, because Googlebot is not blocked. User-triggered bots are listed here, but they may ignore the rule.

User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: meta-externalagent
Disallow: /

User-agent: *
Allow: /

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

If your robots.txt already has rules for all bots, such as blocking the admin panel, add them to the groups above too. More on that in the first mistake below.

The most common mistakes

  • A separate group for a bot cancels the general rules. A bot with its own group in robots.txt follows only that group and ignores User-agent: *. If you add User-agent: GPTBot with a single rule, GPTBot stops respecting, say, a block on /admin/ from the general group.
  • Blocking “everything AI” from a ready-made list. Lists copied from the internet often mix training bots with search bots. The result: a business disappears from ChatGPT when it only wanted to opt out of training.
  • A firewall blocks what robots.txt allows. Cloudflare and some hosting providers have their own AI bot blocking settings and have already changed the defaults for new domains. A bot can be refused access even though robots.txt lets it in. Check the bot settings in your Cloudflare or hosting dashboard.
  • Forgotten subdomains. robots.txt only applies to the host it sits on. A shop on shop.yoursite.com needs its own file.
  • A file that is not there. If /robots.txt returns an error page with a 200 code or a 5xx server error, bots may interpret it differently. The file should exist and return plain text.

How to check your site

The easiest way is our AI bot checker. Enter an address and the tool shows what robots.txt tells more than a dozen bots and whether the server quietly turns them away even though the file lets them in.

Remember too that most AI bots do not run JavaScript. If your page content only appears after scripts load, a bot may see an almost empty page. You can check this with the raw vs rendered HTML tool.

I write more about getting into AI answers in GEO in practice: getting recommended by ChatGPT, and about measuring AI traffic in ChatGPT and AI traffic in GA4.

Sources

  1. Overview of OpenAI Crawlers - OpenAI
  2. Does Anthropic crawl data from the web, and how can site owners block the crawler? - Anthropic
  3. Perplexity Crawlers - Perplexity
  4. AI features and your website - Google Search Central
  5. Control content use for AI training with Cloudflare's managed robots.txt - Cloudflare

Was this article helpful?

About the author. Maciek - SEO & GEO consultant with 10+ years of experience, formerly Head of SEO at companies including Gemini Polska and Staples Solutions. More about me

Questions about AI bots and robots.txt.

Will blocking GPTBot remove me from ChatGPT?

Not from ChatGPT search. GPTBot collects content to train OpenAI models. OAI-SearchBot is responsible for showing pages in search answers, and blocking that one removes your site from the results. Blocking GPTBot may only mean future models know less about your business from training alone.

Is it worth blocking bots that train models?

It is a business decision, not a technical one. Publishers who live off their content often block them. For a service business that wants AI to know and recommend it, a block usually brings little. The key is not to block AI search bots along the way.

How long until a robots.txt change takes effect?

Bots fetch robots.txt from time to time, so a change does not work instantly. Perplexity says it can take up to 24 hours. Each subdomain has its own robots.txt, so the change has to be made on each one.

Does llms.txt replace robots.txt?

No. robots.txt tells bots what not to fetch. llms.txt is a proposed file describing your site for language models, which major AI providers have not officially confirmed. One does not replace the other.