Skip to content

robots.txt for AI crawlers: which bots to allow, which to block

Technical · 8 min read · Updated 2026-11-24

To set up robots.txt for AI crawlers, give each bot its own User-agent group and decide by what the bot does, not as one block.

Allow the search bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot) if you want to be cited in ChatGPT, Claude and Perplexity answers. Blocking the training bots (GPTBot, ClaudeBot, Google-Extended) is a separate choice, and a fair one. It doesn't remove you from those answers. Then check the CDN in front of your site. A firewall rule that returns 403 to a bot means it never reads robots.txt at all.

Why is there more than one AI bot per company?

Each vendor now documents separate user agents for separate jobs. That's why a blanket "block the AI bots" rule goes wrong. It lumps together a bot that trains a model, a bot that builds a search index, and a bot that fetches a page because someone asked about it five seconds ago.

We checked each vendor's own documentation on 2026-11-13, and the table below is what they say. It's a snapshot. Crawlers change, so if the vendor pages in the sources disagree with us, believe them.

OperatorUser agentJobBlocking it means
OpenAIOAI-SearchBotSurfaces sites in ChatGPT searchNot shown in ChatGPT search answers (can still appear as plain links)
OpenAIGPTBotCrawls content that may train modelsOpt-out of training
OpenAIChatGPT-UserFetches a page when a user asksOpenAI says robots.txt rules may not apply
AnthropicClaudeBotCollects content that may contribute to trainingOpt-out of training
AnthropicClaude-SearchBotIndexes content to improve search resultsMay reduce visibility in Claude search answers
AnthropicClaude-UserFetches when a user asks Claude a questionMay reduce visibility for user-directed search
PerplexityPerplexityBotSurfaces sites in Perplexity; not used for model trainingNot shown in Perplexity results
PerplexityPerplexity-UserFetches when a user asksPerplexity says it generally ignores robots.txt
GoogleGooglebotSearch, and therefore AI Overviews and AI ModeLeaves Google Search entirely
GoogleGoogle-ExtendedProduct token only, no separate fetch; controls Gemini training and grounding in Gemini AppsDoes not affect Search inclusion or ranking
AppleApplebot-ExtendedOpt-out token for training Apple foundation modelsOpt-out of training; Applebot can still crawl
Diagram of three AI crawler jobs. Training bots GPTBot, ClaudeBot, Google-Extended and Applebot-Extended collect content that may train models. Search bots OAI-SearchBot, Claude-SearchBot, PerplexityBot and Googlebot build the index assistants cite. User-fetch bots ChatGPT-User, Claude-User and Perplexity-User fetch a page when a person asks. A bar above all three marks the CDN or firewall, which can refuse a bot before robots.txt is read.Three jobs, three sets of user agents, one file. The rows are the same bots as the table above. The bar across the top is the part people miss. A CDN or firewall rule runs before robots.txt is read, so it can refuse a bot that robots.txt allows. Only the middle lane decides whether you can be cited in an answer. CDN / FIREWALL: RUNS FIRST, CAN REFUSE A BOT BEFORE ROBOTS.TXT IS READ TRAINING GPTBot ClaudeBot Google-Extended Applebot-Extended SEARCH INDEX OAI-SearchBot Claude-SearchBot PerplexityBot Googlebot USER FETCH ChatGPT-User Claude-User Perplexity-User MAY TRAIN MODELS ELIGIBLE TO BE CITED A PERSON JUST ASKED ROBOTS.TXT MAY NOT GOVERN THE RIGHT-HAND LANE
Three jobs, three sets of user agents, one file. The rows are the same bots as the table above. The bar across the top is the part people miss. A CDN or firewall rule runs before robots.txt is read, so it can refuse a bot that robots.txt allows. Only the middle lane decides whether you can be cited in an answer.

Should I block GPTBot?

That depends on a decision only you can make: are you okay with your content being used to train models? Blocking GPTBot or ClaudeBot is a policy choice, not a mistake, and plenty of publishers do it on purpose. It doesn't remove you from ChatGPT or Claude answers, because those use the separate search bots.

So there are three sensible setups, and none of them is wrong. The mistake is ending up on one by accident.

  • Be cited, training is up to you: Allow the search and user-fetch bots. Whether to allow the training bots is a separate call. If you never touch robots.txt, they're allowed by default.
  • Be cited, but opt out of training: Block GPTBot, ClaudeBot, Google-Extended and Applebot-Extended. Allow OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot and Bingbot.
  • Stay out of AI entirely: Block all of the above. That removes you from AI citations. Make sure that's what you want before you ship it.

When a failing audit isn't a problem

Our audit's aeo.ai-bots-allowed rule fails when robots.txt disallows the whole site for any of GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot or Google-Extended. That list mixes training bots with search bots. So a site that blocks only the training bots on purpose will fail it. If that's you, the audit is too blunt. You're not wrong. Keep your choice and ignore the finding.

5 bots

The aeo.ai-bots-allowed audit rule fails if robots.txt disallows the whole site for any one of five user agents: GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot or Google-Extended. A site with no robots.txt blocks nothing, so the rule passes. (AEO Toolkit skill source)

What do people get wrong about robots.txt and AI?

  • Blocking Google-Extended doesn't remove you from AI Overviews: Google says Googlebot is the control for AI Overviews and AI Mode. Google-Extended only covers Gemini training and grounding in Gemini Apps. To limit what Google shows, use snippet controls such as nosnippet or max-snippet, or noindex.
  • A Disallow won't stop user-fetch bots: ChatGPT-User and Perplexity-User act for a person who just asked a question. OpenAI and Perplexity both say robots.txt may not apply to them. A hit from one is a person asking, not a rule being broken.
  • Changes aren't instant: OpenAI and Perplexity both say robots.txt changes can take up to about 24 hours to take effect. Anthropic doesn't give a number. Give it a day before you decide the fix didn't work.
  • An empty Disallow means the opposite of Disallow: /: Disallow with no value allows everything. Disallow: / blocks everything. One character, opposite meanings.
  • A staging rule that shipped: User-agent: * with Disallow: / is a normal staging setting. It's also the most common reason a live site is invisible. Check the live file after every deploy.

What does a real robots.txt for AI crawlers look like?

This is the top of Cloudflare's own robots.txt. It's a public file from a company that sells the bot controls this article keeps mentioning. Each AI user agent has its own User-agent line followed by Allow: /. That's the shape to copy: one group for each bot you have a decision about. To allow ChatGPT search, add a group with User-agent: OAI-SearchBot and Allow: /. Their list uses older Anthropic names (Anthropic-AI, Claude-Web), so check the vendor pages below for the current ones.

The first lines of Cloudflare's robots.txt in a browser: a wildcard group allowing everything, a sitemap line, then separate User-agent groups for GPTBot, ChatGPT-User, Google-Extended, Anthropic-AI and Claude-Web, each followed by Allow: /.
The top of https://www.cloudflare.com/robots.txt, captured 2026-11-17. It shows one User-agent group per AI bot, each with Allow: /. It's one site's file at one moment, not a recommendation. The file changes, and your own choice may be different.

Why can my CDN block AI bots even if robots.txt allows them?

robots.txt is a request. A firewall rule is enforcement. If a bot gets a 403 or a challenge page at the edge, it never reaches your robots.txt, so an Allow line in the file changes nothing. This is the most common reason a site that "allows everything" still can't be read.

The usual causes are Cloudflare's AI crawler policies, which can add managed Disallow lines and block AI training crawlers at the edge, a custom WAF rule or Bot Fight Mode that challenges unfamiliar user agents, and security plugins on WordPress. Both layers have to agree. If robots.txt allows a bot and a CDN policy is set to Block, the CDN wins.

If you want a bot through a firewall, allow it by user agent plus its published IP range, not by user agent alone. Anyone can fake a user agent. OpenAI, Perplexity and Anthropic each publish where their crawlers come from.

A quick test, and why it can mislead you

Request your homepage with a bot's user agent and compare the status code to a normal browser request. A 403, 429 or challenge page for the bot hints that something at the edge is blocking it. But a CDN that checks bots by IP range will let the real bot through and block your fake request, so a 200 proves little. Your server logs and your CDN's bot analytics are the real evidence.

How do I check and fix my AI crawler access?

In short, it's five steps. The exact robots.txt syntax for your framework is in the implementation guide linked below.

  1. Read your live robots.txt

    Open yourdomain.com/robots.txt. It should return 200 as plain text, not an HTML page. If a catch-all route returns your app shell for this path, that counts as no robots.txt.

  2. Decide your posture

    Pick one of the three above. If you're not sure, take the first one. Allowing the search bots keeps you eligible for citation.

  3. Write explicit groups for the bots you named

    A group that names a bot replaces the wildcard group for that bot, so repeat any Disallow paths you still want. Put your sitemap at the bottom.

  4. Check the layer in front of your server

    Look at your CDN's AI bot policy, any WAF rules and any security plugin. Make sure they match what robots.txt says.

  5. Verify after a day

    Read the live file again, then check your CDN analytics or server logs for 403 and 429 responses to the search bots over the last few days. If there are no blocks, that's the real pass.

A coding agent can do this fix for you. You can install the skill behind this article into Claude Code and other agents. The agent reads your robots.txt, checks the edge and proposes the change. You decide the setup. It writes the file.

Full implementation guide for AI crawler access

The skill's source is open. The page below explains how to install skills into your agent.

Install the AEO agent skills

The skill source is on GitHub, if you want to read what it does before you let an agent run it.

aeo-ai-crawler-access on GitHub

What will fixing this not do?

Letting a bot in is necessary, but it's not enough. It makes your pages fetchable. It doesn't make an assistant choose them, and nobody can promise that. If your pages are also empty until JavaScript runs, or aren't in the search index, a welcoming robots.txt won't help. Those are separate problems with separate fixes.

One more caveat on measuring. Our AI visibility tools check Perplexity only. They can't tell you whether ChatGPT, Claude or Gemini cite you, so don't use them as proof that a robots.txt change worked on those engines. Ask the engines your buyer questions directly and write down who gets named.

Common questions

Should I block GPTBot in robots.txt?

Only if you don't want your content used to train OpenAI models. GPTBot is the training crawler. Blocking it doesn't remove you from ChatGPT search, which uses a separate bot called OAI-SearchBot. It's a policy choice, not a mistake, and you can make it and still be eligible for citation.

What is the difference between GPTBot and OAI-SearchBot?

GPTBot crawls content that may be used to train OpenAI's foundation models. OAI-SearchBot surfaces sites in ChatGPT search. If you block OAI-SearchBot, your site isn't shown in ChatGPT search answers, although it can still appear as a plain link. You control them separately in robots.txt.

Does blocking Google-Extended remove me from Google AI Overviews?

No. Google-Extended only controls whether your content is used for Gemini training and for grounding in Gemini Apps. It doesn't affect Search inclusion or ranking. Google says Googlebot is the control for AI Overviews and AI Mode, and snippet controls or noindex limit what is shown.

How do I allow OAI-SearchBot in robots.txt?

Add a group with User-agent: OAI-SearchBot and Allow: / to your robots.txt, and make sure no wildcard Disallow: / applies to it. OpenAI says OAI-SearchBot is the bot that surfaces sites in ChatGPT search, separate from GPTBot. Then check your CDN, because a firewall rule can block it before it reads the file. OpenAI says changes can take about 24 hours.

What should my robots.txt say about AI crawlers?

Name each bot you have a decision about, with one User-agent group each. To be cited, allow OAI-SearchBot, Claude-SearchBot, PerplexityBot and Googlebot. Whether to allow the training bots (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended) is a separate policy choice. A group that names a bot replaces the wildcard group for that bot, so repeat any Disallow paths you still want.

Why are AI bots blocked when my robots.txt allows them?

Most often a CDN or firewall rule is returning 403 or a challenge page before the bot ever reads robots.txt. Cloudflare's AI crawler policies, a custom WAF rule, Bot Fight Mode and WordPress security plugins are the usual causes. Allow the bots by user agent plus published IP range, and make sure both layers agree.

Sources

Related guides

Want it done for you

Want this done and re-checked every month? Our monthly maintenance re-runs your buying questions in ChatGPT, Perplexity and Google, ships the fixes that keep you out of the answers, and reports what moved. Or run the free check on your site first at advancelabs.dev/tools/audit.

See how it works

Book a call: 1 of 2

Five quick questions, then pick a time.

Lucas reads these before the call, so the half hour goes to your situation, not to basics.

When do you want to start?