Blogs/How Do I Block AI Training but Allow AI Search in robots.txt?

How Do I Block AI Training but Allow AI Search in robots.txt?

Nov 27, 20267 min read
Pulkit Khurana

Founder, SproutMe

A settings card with toggles, one switched on and linked to a result tile, in violet: illustration for "How Do I Block AI Training but Allow AI Search in robots.txt?".

You added GPTBot to robots.txt to keep your content out of model training, and now you're unsure whether you also vanished from ChatGPT search. The crawler names look almost identical, and one misread line can cost you citations without protecting anything you meant to protect.

You can separate the two, because OpenAI, Anthropic and Google each use a distinct robots.txt token for training. Disallow GPTBot, ClaudeBot and Google-Extended in their own user-agent groups, and leave OAI-SearchBot, Claude-SearchBot and PerplexityBot allowed. As the vendors document it, a training opt-out does not remove you from their search answers.

Block AI training? Let a skill write the rules.

GET IT FREE IN CLAUDE

The split works because the AI companies stopped sending one crawler for every job. As of late 2026, the major vendors publish separate tokens for three purposes: collecting training data, building a search index, and fetching a page live when a user asks for it. Blocking one token stops only that job. A different bot from the same company can keep visiting for another purpose.

Here is how the tokens divide:

  • OpenAI. GPTBot collects pages for training future models. OAI-SearchBot builds the index behind ChatGPT search. ChatGPT-User fetches a page in real time when someone's question needs it.
  • Anthropic. ClaudeBot collects training data. Claude-SearchBot evaluates content for search-style answers. Claude-User visits a page on behalf of a person asking Claude something.
  • Google. Google-Extended is a control token, not a separate crawler. It governs whether Google may use your content for Gemini training and for grounding Gemini's answers. Google Search, AI Overviews and AI Mode all run on regular Googlebot, so Google-Extended does not touch them.
  • Perplexity. PerplexityBot is the search crawler and Perplexity-User handles user-triggered fetches. Perplexity says the exact division of PerplexityBot's tasks can vary, so check its current crawler documentation before you rely on the list above.
  • Other training and corpus crawlers. Applebot-Extended, Meta-ExternalAgent and Bytespider gather training data. CCBot feeds Common Crawl, a public dataset that third parties reuse for their own models.

Vendors add and rename tokens. OpenAI now also lists OAI-AdsBot, for example. Treat any list, this one included, as a snapshot, and read each vendor's own crawler page before you deploy.

This article assumes you have already decided to opt out of training. Whether that decision makes sense for your site is whether to block GPTBot and other AI crawlers at all, which is a separate question with its own trade-offs.

What should the robots.txt file look like?

Give every bot its own group. The robots.txt standard does allow several user-agent lines in one group. Separate groups are still easier to audit, and you can change one bot's rule without accidentally changing three others.

```

Search and answer engines: allowed

User-agent: OAI-SearchBot Allow: / Disallow: /admin/

User-agent: Claude-SearchBot Allow: / Disallow: /admin/

User-agent: PerplexityBot Allow: / Disallow: /admin/

Training and corpus crawlers: blocked

User-agent: GPTBot Disallow: /

User-agent: ClaudeBot Disallow: /

User-agent: Google-Extended Disallow: /

User-agent: Applebot-Extended Disallow: /

User-agent: Meta-ExternalAgent Disallow: /

User-agent: CCBot Disallow: /

Everyone else, including Googlebot and Bingbot

User-agent: * Disallow: /admin/ ```

Two details trip people up.

Named groups ignore the wildcard. A crawler obeys only the most specific group that names it. Once OAI-SearchBot has its own group, it skips everything under `User-agent: *`. Any path you want hidden from all bots, such as `/admin/` above, has to be repeated inside every named group. Otherwise you have quietly opened it to the search crawlers.

Don't block with the wildcard. A blanket `User-agent: *` with `Disallow: /` is the most common way to lose search visibility while trying to stop training. It catches Googlebot, Bingbot and every answer engine along with the training crawlers.

Leave the user-triggered agents (ChatGPT-User, Claude-User, Perplexity-User) out of the file. OpenAI states that because these fetches are initiated by a user, robots.txt rules may not apply to them. Listing them adds nothing you can count on.

Block the training bots, allow the search bots

Where does the training/search split break?

The file above does what it says. Four limits still apply, and each one changes what you should expect from it.

Google's AI features sit inside Search. Blocking Google-Extended keeps your content out of Gemini training and grounding. That also means your pages won't appear as links in the Gemini app. It does not remove you from AI Overviews or AI Mode. The only lever there is a `nosnippet` or `max-snippet:0` directive, and that also strips your snippets from ordinary search results. For most commercial sites, that cost isn't worth paying.

Microsoft has no separate token to block. Copilot draws on the Bing index, and Microsoft documents meta tags rather than a dedicated training crawler as the control. A robots.txt rule can't split training from search on Microsoft's side the way it can for OpenAI or Anthropic.

Blocking is forward-only. A disallow keeps you out of future training runs. Content a model has already learned stays in its parameters.

robots.txt is a request. Even Google's documentation says it cannot enforce crawler behaviour. The named vendors say they honour it. A crawler that doesn't respect it needs blocking at the server or firewall, by user-agent string or IP range.

There is also one open question nobody has settled. Some argue that withholding training data makes a model less likely to know your brand when it answers without searching. The vendors document no such effect on search citations today. It's a reasonable concern, but it isn't a measured one. If your content exists mainly to market your products rather than being the product itself, the case for blocking training is weaker.

How do I confirm the change took effect?

Start with the live file. Load `yourdomain.com/robots.txt` in a browser and confirm it shows the new rules. Caching, a CDN or a file saved to the wrong path can all leave an old version in place.

Next, check that you haven't blocked a search crawler somewhere else. Many CDN and firewall defaults challenge unfamiliar bots. That can stop OAI-SearchBot even when robots.txt allows it. OpenAI publishes the IP ranges its crawlers use, so you can allowlist them. Also expect a delay: the change isn't instant on the vendor's side.

Then watch your server logs. They're the only record of which tokens actually visit after the change. A healthy result shows GPTBot and ClaudeBot requests dropping away, while OAI-SearchBot and Claude-SearchBot keep crawling.

Finally, track referral traffic. ChatGPT appends `utm_source=chatgpt.com` to the links it sends, which makes those visits identifiable. Our guide to seeing ChatGPT traffic in Google Analytics covers the report setup. If AI referrals hold steady through the weeks after the change, the split is working as intended.

Conclusion

Blocking AI training without losing AI search comes down to naming the right tokens. Disallow GPTBot, ClaudeBot, Google-Extended and the other training crawlers in their own groups. Leave the search crawlers allowed, and repeat your shared rules in every named group. Then verify the result in your logs, not just in the file.

Expect gaps where Google and Microsoft fold AI features into their main search products. Re-check every vendor's token list periodically, because the list will keep changing.

Companion answers questions like "did ChatGPT referrals move after we changed robots.txt?" from your connected Analytics data, so you can check the effect without building the report yourself.

Frequently Asked Questions

No. A GPTBot disallow tells OpenAI not to use your content in future training runs. Anything a model learned before the rule was added is already part of its parameters, and robots.txt cannot reach back into it. The block protects new and updated content from that point forward, which is why it is worth adding sooner rather than later if you have decided to opt out.

No. Google-Extended only controls whether Google may use your content for Gemini training and grounding. It is not a ranking signal and does not affect whether your pages appear in Google Search. AI Overviews and AI Mode rely on regular Googlebot, so they are unaffected too. The one visible cost is that your site will not appear as a link inside the Gemini app.

There is little point. ChatGPT-User fetches a page only when a person asks ChatGPT something that needs it, and OpenAI states that robots.txt rules may not apply to these user-initiated requests. The same is true of comparable agents from Anthropic and Perplexity. If you want a page kept away from them, a server-level block is the only dependable option.

Get weekly AI search tips straight to your inbox.

Ready to Unlock Your Growth at Zero Cost?

We can help you turn these findings into a measurable growth system. Let’s walk through the recommendations and build a plan to act on them.

Try SproutMe Skills