How to Block AI Crawlers Without Leaving Search
Which robots.txt names collect text for AI training and which index pages for search, with a file you can copy and the limits of what it can stop.
Which robots.txt names collect text for AI training and which index pages for search, with a file you can copy and the limits of what it can stop.
What bandwidth overage fees are in cloud hosting, the three ways providers handle traffic past the allowance, how to estimate yours, and how to cap the bill.
What US-based cloud hosting means in practice, the four places data leaves the country without you noticing, and the questions that get it in writing.
Seven steps to host a website on a VPS: pick a server, connect over SSH, secure it, install a web server, upload your site, point your domain, and add HTTPS.
You can block AI crawlers in robots.txt without disappearing from search, because the large AI and search companies now use separate names for collecting training data and for indexing pages. You disallow the training names, leave the search names allowed, and your pages keep showing up in search results while asking not to be used to train models.
Here's a file that does that for the crawlers whose operators document separate names:
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
That keeps OpenAI's, Anthropic's and Google's training collection out while every search crawler, theirs included, keeps reading the site. If your pages aren't showing up in search at all, start with How to Get Your Website Indexed by Search Engines.
Robots.txt is a plain text file at the root of your site that tells crawlers which paths they may fetch. Rules are grouped by crawler name, and each crawler follows the group that names it. It's a request, not a lock: crawlers that follow the standard honor it, and nothing forces the rest to.
The format has been around since the 1990s and became a formal Internet standard in September 2022 as RFC 9309. The standard is direct about its limits: "These rules are not a form of access authorization." Think of it as a sign on an unlocked gate. Most visitors read it, and the ones who don't can still walk through.
Each block of the file is a group. A group starts with one or more User-agent: lines naming crawlers, then lists Allow: and Disallow: rules for paths. Disallow: / covers the whole site. Disallow: /drafts/ covers everything under that folder.
OpenAI, Anthropic and Google each publish one name for training collection and a different one for search, so you can tell them apart in robots.txt. Blocking the training name doesn't affect search, according to each company's own documentation. For crawlers with only one name, blocking it blocks everything that crawler does.
Here's what each company says about its names:
How to upload a PDF, a photo, or a long paste to a free AI chat without an account, what happens to the file, and what the free tier won't do with it.
GPTBot crawls "content that may be used in training our generative AI foundation models." OAI-SearchBot "is used to surface websites in search results in ChatGPT's search features." OpenAI says the settings are independent, so a site can "allow OAI-SearchBot in order to appear in search results while disallowing GPTBot." A third name, ChatGPT-User, "is not used for crawling the web in an automatic fashion": it fetches a page when a person asks ChatGPT about it (OpenAI).ClaudeBot collects web content that could contribute to training, and blocking it means a site's future material "should be excluded from our AI model training datasets." Claude-SearchBot indexes content to improve search answers, and Claude-User fetches pages when someone asks Claude a question. Anthropic warns that blocking either of those two "may reduce your site's visibility" in its search results (Anthropic).Google-Extended controls whether content Google crawls may be used to train its Gemini models and to ground their answers. It has no crawler of its own: Google fetches with its usual crawlers and reads the token as an instruction. Google says it "does not impact a site's inclusion in Google Search," and it isn't "used as a ranking signal in Google Search" (Google Search Central).Other crawlers collect text too, and not all of them split training from search. Check each operator's documentation for the name it reads, then add a group for it. A name you don't list falls under your User-agent: * group.
A crawler finds the group whose name matches its own, ignoring case, and follows only that group. If several groups name it, their rules are combined. If none does, it follows the * group, and with no * group, nothing is blocked. Within a group, the longest matching rule wins, and a tie goes to allow.
Those rules come straight from RFC 9309, and three of them catch people out:
* group. A crawler that finds its own group doesn't also read the rules under *. If you give GPTBot a group that only blocks /drafts/, it may fetch everything else on the site, even paths your * group disallows.Allow: /blog/public/ beats Disallow: /blog/ for a page under /blog/public/. Order in the file doesn't matter.Allow and a Disallow match equally, the standard says the Allow "SHOULD be used."The file lives at /robots.txt at the top level of each site, and each subdomain has its own. Rules in example.com/robots.txt say nothing about blog.example.com.
The costly robots.txt mistakes are a server error on the file itself, a stray Disallow: / under *, and trying to remove pages from search by blocking them. Each one either hides pages you wanted found or leaves listed pages you wanted gone, and none of them shows up as an obvious error.
5xx for robots.txt "MUST assume complete disallow." If your robots.txt route breaks, compliant crawlers stop reading your whole site until it's fixed. A 404 is the opposite: the crawler "MAY access any resources on the server." If you don't need rules, having no file at all is safe.Disallow: / copied from staging. Staging sites often block everything, and the file ships to production with the code. Check robots.txt after every deploy that touches it.noindex on it. Google says robots.txt "is not a mechanism for keeping a web page out of Google," and a blocked page can still be listed by its address if other sites link to it (Google Search Central). To take a page out of search, let it be crawled and mark it noindex.Robots.txt can't stop a crawler that ignores it, can't take back pages already collected, and doesn't cover every fetch made by an AI assistant. It's the right first step because the companies that document their crawlers honor it, but anything you need to keep private belongs behind a login, not behind a robots.txt rule.
ClaudeBot today asks Anthropic to leave out your "future materials." Pages collected before the rule existed aren't covered by robots.txt.ChatGPT-User visits, because they happen when a person asks about a page rather than as automatic crawling.There are also signals beyond robots.txt. Some crawlers read a noai value in a page's robots meta tag, and some read the tdm-reservation header from the TDM Reservation Protocol (TDMRep), published by a W3C community group, where a value of 1 means text and data mining rights are reserved. Neither is universal, so treat them as extra signals alongside robots.txt, not replacements for it.
Fetch your robots.txt the way a crawler does, confirm it returns 200 with the rules you expect, then test a few paths against each name you care about. Some search consoles include a robots.txt tester. Your server logs show which crawlers came by and what they fetched afterward.
curl -i https://example.com/robots.txt and check for a 200 status and your current rules.GPTBot, ClaudeBot, Google-Extended and *./robots.txt alone are what you want to see.Carpathian runs its own search engine, Carpathian Search, and its crawler uses two names so you can make the same choice there. CarpathianBot is the search crawler: it reads robots.txt under RFC 9309, including Crawl-delay, and a page it's turned away from leaves the index. Carpathian-AI is the training name. Every page it indexes is stored with a record of whether training is allowed, and that's set to no when robots.txt turns away Carpathian-AI or any of the major AI crawlers named above, when the page says noai or noimageai, or when the response carries tdm-reservation: 1. Disallowing GPTBot, ClaudeBot and Google-Extended already keeps your pages out of Carpathian's training data without blocking its search.
It can't speak for anyone else's crawler, and it doesn't rank pages up or down for their training choice. CarpathianBot's page lists what it fetches and how to address it. If you'd like to see what it has indexed from your site, Search Engine Console is free with a Carpathian account.