How Do You Configure robots.txt for AI Crawlers?

Updated: 5 days ago

Key takeaways
|
Your robots.txt is doing something to AI crawlers right now, whether or not anyone decided what. That's the real starting point for configuring robots.txt for AI crawlers, and it's the part most guides skip. The file you have was probably inherited from a template, a plugin or a developer who left two years ago. Nobody reviewed it, and everybody assumed it was fine.
After more than 16 years in B2B marketing, the most common silent visibility leak I find is exactly that file. It doesn't throw errors and it doesn't show up in analytics. It just quietly keeps a search crawler out, and 6 months later the conversation is about content quality. This guide gives you three setups worth choosing between, what the file can't do and how to confirm it's working.
How does robots.txt for AI crawlers work?
The same way it works for search crawlers. You name a user agent and allow or disallow paths. The difference is that AI vendors run several bots with different jobs, so one rule per vendor is almost always the wrong shape. Learn the jobs in AI crawlers explained. |
Every major AI vendor documents its robots.txt tokens. OpenAI lists GPTBot and OAI-SearchBot as the tokens site owners use to manage how their content works with its products. Anthropic lists ClaudeBot, Claude-SearchBot and Claude-User and says its bots honor robots.txt. Google uses Googlebot for Search and a separate Google-Extended token for Gemini.
Anthropic also supports a non-standard Crawl-delay line, which gives you a middle option between allowing and blocking. Not every crawler honors it, so treat it as a request. Vendors also take time to pick up changes, and OpenAI says its search systems need about 24 hours. So don't judge a change the morning after you ship it.
One structural habit saves a lot of grief. Put each bot, or each group of bots that should behave identically, in its own clearly commented group. That keeps a change to one decision from spilling into another. It also makes the file readable by the next person, who might be you in a year.
What are the three robots.txt configurations worth choosing between?
Open, retrieval-only and locked. Open allows everything except private paths, retrieval-only declines training while keeping search crawlers in and locked blocks AI crawlers entirely. Most B2B technology companies should run open. Learn what blocking does to visibility in AI search visibility.

Open is what I recommend for most B2B sites. Your training contribution costs you little, search access is what earns citations and there's no upside to being selectively invisible. This version groups the major agents and keeps genuinely private paths off-limits for all of them. Add or remove agents as your own logs suggest.
# Open. Allow AI crawlers, protect private paths
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: CCBot
Allow: /
Disallow: /admin/
Disallow: /account/Retrieval-only is the publisher position. It declines the training collectors while leaving every search crawler and user fetcher open, which is coherent whenever your archive has commercial value you'd rather license than donate. OpenAI explicitly supports this split. Your GPTBot and ClaudeBot groups say no, and the search groups say yes.
# Retrieval-only. Decline training, stay citable
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: CCBot
Disallow: /
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /Locked blocks every AI crawler. Understand what you're buying, which is absence from ChatGPT, Claude and Perplexity answers while a competitor occupies the space your brand would have filled. You'll still be indexed by Google and Bing, since those are separate crawlers, but being indexed and being citable are different questions. Very few B2B software companies trying to grow should be here.
What can robots.txt not do for AI crawlers?
It can't enforce anything, it may not bind user-initiated fetches and it can't stop a bot that ignores it. It's a request that cooperative crawlers honor. Anything that must stay private needs authentication or a firewall rule. Learn the enforcement side in how to block bad bots.
User-initiated fetches are the first gap, and the vendors don't agree on them. OpenAI says that because ChatGPT-User actions are initiated by a user, robots.txt rules may not apply, a change PPC Land dated to December 9, 2025. Anthropic says disabling Claude-User prevents its system from retrieving your content in response to a user query. Same job, different rules, so check each vendor rather than assuming.
Bad actors are the second gap. In August 2025, Cloudflare accused Perplexity of using an undeclared crawler posing as Chrome on macOS to reach sites that had blocked its declared bots, and de-listed it as a verified bot, as Tech.co reported. Perplexity disputed the report. Whoever's right, the episode shows why robots.txt is a statement of intent, not a wall.
Blocking by IP has its own trap. Anthropic warns that blocking its IP addresses may not work correctly as an opt-out, because it can stop the crawler reading your robots.txt at all. So use robots.txt to state preferences to cooperative bots, and save firewall rules for traffic that ignores them. Mixing the two is how teams end up with rules nobody can explain.
How do you handle Google's AI features in robots.txt?
You mostly don't. Googlebot feeds both Search and Google's AI features, so a robots.txt block on Googlebot removes you from everything. Google-Extended doesn't affect Search. The clean opt-out is the Search generative AI control in Search Console. Learn what AI Mode does with your pages in Google AI Mode for B2B. |
An earlier version of this post said there's no retrieval-only posture available on the Google side, and that pretending otherwise was the most common error in this setup. Half of that still holds. Robots.txt can't separate Google's AI features from Search, because Googlebot does both jobs. But as of August 31, 2026, Search Console's Search generative AI control can, opting a site out of AI Overviews, AI Mode and Discover's AI features without becoming a ranking signal elsewhere.
Google-Extended is the token people keep confusing with that control. Google's AI features guidance says it doesn't govern Search, and it covers Gemini training and grounding in Gemini Apps and Vertex AI. So the Google-Extended line in the retrieval-only setup above declines Gemini training without touching your AI Overviews visibility. That's useful, as long as nobody on your team expects it to do more.
For page-level control, Google points to nosnippet, data-nosnippet, max-snippet and noindex. Those limit what can be quoted or shown rather than removing a whole site from AI features. They're the right tool for a pricing table you don't want summarized or a page that shouldn't appear at all. For most B2B content, the right setting is to leave all of it open.
What robots.txt mistakes cost AI citations?
Blocking by vendor, inheriting a block you never chose, writing conflicting rules, misreading Google-Extended, blocking to fix server load and never checking the result. Each one is silent. None of them throws an error. Learn how to check the outcome in server log analysis for AI crawlers.
These 6 account for nearly every lost citation I trace back to robots.txt. They're all easy to make with good intentions. They're also easy to fix once you know to look. Here's what each looks like in practice.
Blocking by vendor. A rule that catches every agent from one company takes the search bot down with the training bot.
Inheriting a block. CDN defaults, security plugins and templates often ship AI crawler blocks nobody chose.
Writing conflicting rules. Two groups that name the same bot, or a stray Disallow in the wrong group, leave the outcome to each crawler's parser, so keep one clear group per decision.
Misreading Google-Extended. It covers Gemini training and grounding in Gemini Apps and Vertex AI, not AI Overviews or AI Mode.
Blocking to fix load. Crawl-delay, rate limiting and cleaner URLs solve load problems without a permanent visibility cost.
Never checking. Ship the file, then confirm in your logs that allowed bots arrive and declined bots stop.
The vendor block is the one that keeps happening, so it's worth understanding the mechanism. Teams don't decide to leave ChatGPT search. They decide to decline AI training, which is reasonable, and then express that decision at the wrong level of granularity. The company runs several bots, and one of them was earning the citations.
Did your CDN already configure AI crawlers for you?
Quite possibly. On July 1, 2025, Cloudflare began blocking AI crawlers by default for new domains, asking each new customer whether to allow them. A setting like that can stop bots before your robots.txt is ever read. Learn the related Cloudflare trap in Cloudflare Bot Fight Mode.

Cloudflare's move was a reasonable default for publishers, and its announcement noted that more than a million customers had already used the one-click AI crawler block it launched in September 2024. For a B2B company, though, it can be a quiet visibility leak if someone clicked through setup without reading. The block lives in the CDN, not the file, so reviewing robots.txt alone won't find it. That's why my audit order starts outside the file.
Platforms can do the same thing in quieter ways. Security plugins, managed rulesets and hosting templates sometimes ship AI crawler rules that nobody on the marketing side ever saw. Each layer can say no before the next one is consulted. So check the CDN, then the platform, then the file, then the logs.
The logs are the tiebreaker. If a bot you allowed in robots.txt never appears, something upstream is stopping it. If a bot you declined keeps appearing with successful requests, it's either ignoring the file or not the bot it claims to be. Either way, the logs tell you which layer to fix.
How do you verify your robots.txt configuration is live?
Fetch yourdomain.com/robots.txt and read it as served, not as written in your CMS. Then watch your logs for a couple of weeks to confirm each bot's behavior matches your rules. OpenAI says its search systems take about 24 hours to adjust. Learn the indexing side in how to get indexed by Google.
As served is the operative phrase. Platform-level rules can be added to the file in ways that aren't visible in the editor, so what you typed and what a crawler receives can differ. Read the whole file top to bottom. Look for anything that names the same bot twice or sends conflicting instructions.
Then measure the outcome rather than the file. If the point of the change was citation eligibility, your AI visibility tracking should show movement on the retrieval side within weeks. If nothing moves, the constraint was never robots.txt, and you've cheaply ruled out a variable. Most AI visibility work is elimination before it's optimization, and access is the cheapest thing to eliminate.
Where does robots.txt fit in the Engine Optimization Matrix™?
Robots.txt sits under the Distribution lever for all four engines in the Engine Optimization Matrix™. It decides which crawlers can reach your content for SEO, AEO, GEO and LLMO. Nothing downstream works if the wrong line says no. Learn how the levers connect in the Engine Optimization Matrix™.
Row by row, the file does different jobs. In SEO it keeps Googlebot and Bingbot on the pages that matter. In AEO and GEO it decides whether the search crawlers behind AI Overviews, AI Mode, ChatGPT, Claude and Perplexity can use you. In LLMO it's where you make the training decision, deliberately or by accident.
Content, Schema and Authority all assume access. Citation is the payoff lever, and it's the one that disappears first when a robots.txt line goes wrong. That's why access is the first thing I check in every audit. It's the cheapest fix in the whole matrix.
What else do people ask about robots.txt for AI crawlers?
Can robots.txt stop AI training?
It can ask. Blocking GPTBot, ClaudeBot, Google-Extended and similar training tokens tells cooperative vendors not to use your future content for training.
Will blocking GPTBot hurt my ChatGPT visibility?
No. ChatGPT search relies on OAI-SearchBot, which OpenAI lets you allow separately.
Can robots.txt remove me from AI Overviews?
Not without leaving Google Search, because Googlebot feeds both. The Search generative AI control in Search Console handles that separately as of August 31, 2026.
Do user-triggered AI fetchers follow robots.txt?
It depends on the vendor. OpenAI says robots.txt may not apply to ChatGPT-User, while Anthropic says disabling Claude-User stops those retrievals.
Does robots.txt support Crawl-delay?
Some crawlers honor it. Anthropic documents Crawl-delay support, though it's a non-standard directive.
Should I group several bots under one rule?
Yes, when they should behave identically. Keep training and search bots in separate groups so one decision can't spill into the other.
How long until AI crawlers respect my changes?
It varies by vendor. OpenAI says about 24 hours for its search systems, so check your logs over the following days.
Can my CDN override robots.txt?
Yes. A CDN or firewall can block bots before they ever read your file, and Cloudflare has blocked AI crawlers by default on new domains since July 1, 2025.
Related guides
About the author. Harold Bell is the founder of MQL Magnet and has spent about 16 years in enterprise technology marketing, working with brands like Cisco, Rubrik and Nutanix in different capacities. He's a member of the Forbes Communications Council, the creator of the Engine Optimization Matrix™ and the author of Partner Over Product. |




