How to block GPTBot comes down to two lines in your robots.txt file, although blocking it well takes a little more thought. GPTBot is OpenAI's crawler for training its models, and it is only one of several AI bots visiting your site. Some of them train models, some power AI search, and some fetch a page only when a person asks an assistant about it. This guide shows you exactly which rules to write so AI companies stop training on your content while your pages stay in Google Search. You can also keep them in ChatGPT and Perplexity search answers if you want.

What GPTBot is, and the other OpenAI bots

OpenAI runs three crawlers, and each one does a different job. Treating them as one bot is the most common mistake site owners make.

User agent What OpenAI says it does Block it to…
GPTBot Collects content to make OpenAI's generative AI foundation models more useful and safe Keep your content out of model training
OAI-SearchBot Indexes sites so they can appear in ChatGPT search Disappear from ChatGPT search answers
ChatGPT-User Fetches a page when a ChatGPT user or Custom GPT asks for it Limited effect, since OpenAI says robots.txt rules may not apply

So if your goal is "don't train on my content", you block GPTBot only. Blocking OAI-SearchBot as well removes you from ChatGPT search, which is a very different decision. For most businesses it means giving up visits from people who use ChatGPT to find things.

The robots.txt rule that blocks GPTBot

robots.txt is a plain text file at the root of your domain, for example https://www.example.com/robots.txt. Crawlers read it before they request anything else. To block GPTBot from your whole site, add this group:

User-agent: GPTBot
Disallow: /

To block only part of the site, such as your premium articles, disallow that path instead:

User-agent: GPTBot
Disallow: /premium/

Two details trip people up. First, each subdomain needs its own robots.txt. Rules on www.example.com don't cover blog.example.com. Anthropic's documentation makes the same point for its crawler. Second, a crawler obeys only the most specific group that names it. Under the Robots Exclusion Protocol (RFC 9309), if you write a group for GPTBot, it ignores your User-agent: * group entirely. Any shared rules, like Disallow: /admin, must be repeated inside the GPTBot group if you also allow it elsewhere.

If you'd rather not write the file by hand, the robots.txt Generator has a "Block AI training" preset that writes these groups for you and lets you test any URL against the result.

Blocking ClaudeBot, Google-Extended and other training bots

GPTBot isn't the only training crawler. Here is a rule set that blocks the main AI training bots while leaving search and assistant bots alone:

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Meta-ExternalAgent
User-agent: CCBot
Disallow: /

Listing several user agents above one Disallow line is valid, and they form a single group. Here is what each one controls.

  • ClaudeBot is Anthropic's crawler. It collects web content which could contribute to training its models. Anthropic also runs Claude-SearchBot, which improves search result quality, and Claude-User, which fetches pages when Claude users ask questions. Anthropic states that its bots honor robots.txt.
  • Google-Extended is not a separate crawler but a product token. It controls whether content Google crawls may be used to train future Gemini models and for grounding in Gemini Apps and Vertex AI.
  • Applebot-Extended is also a control token rather than a crawler. Apple says it "does not crawl webpages". It decides how data crawled by Applebot may be used, including for training Apple's foundation models.
  • Meta-ExternalAgent belongs to Meta, which says it crawls the web "for use cases such as training foundation AI models".
  • CCBot is Common Crawl's crawler. It builds an open web archive that anyone can download. Block it if you don't want your pages in that public dataset.

OAI-SearchBot, Claude-SearchBot, PerplexityBot and Applebot are missing on purpose. They power search and citation features, so leaving them allowed keeps you visible in AI answers. Perplexity, for example, says PerplexityBot surfaces and links websites in its results and is not used to crawl content for AI foundation models.

Blocking Google-Extended feels risky because it has "Google" in the name. It isn't. Google's documentation says "Google-Extended does not impact a site's inclusion in Google Search nor is it used as a ranking signal in Google Search." Google Search is crawled by Googlebot, which you are not touching.

Apple says the same about its token. Site rules for Applebot-Extended are not considered in ranking for Search. In other words, the training tokens were designed so publishers can opt out of model training without paying for it in search visibility.

Opting out is also becoming more standard. Anthropic says that since October 30, 2026 it recognizes a machine-readable "no AI training" signal, with a robots.txt rule that names ClaudeBot taking priority over it. Google says it intends to support the AIPREF usage token __usage_ai-training in early 2027. Until those signals are universal, explicit user-agent rules remain the clearest instruction you can give.

Should you block AI crawlers?

There's no single right answer, so decide by purpose. If you sell access to your writing, blocking training bots protects what you sell. If you want people to find your product through AI assistants, keep the search bots.

Your site Training bots AI search bots
Paid news or research Block Your choice
Online store Your choice Allow
Software docs Your choice Allow
Private or staging site Use a password instead Use a password instead

You can change your mind later. New rules apply the next time each crawler reads the file, although content already collected stays collected.

How to test that the block works

Writing the rules is half the job. Run these three quick checks to confirm they work.

  1. Open the live file. Visit /robots.txt on every domain and subdomain you care about. You should see plain text, not your site's HTML 404 page.
  2. Test the rules. Paste the file into the robots.txt Generator's tester, choose GPTBot and enter a URL. It shows whether the URL is allowed and which line decided it.
  3. Check the live site from outside. Run your domain through the AI Crawler Checker. It fetches your real robots.txt and shows every major AI crawler as allowed, blocked or not specified, so you can confirm GPTBot is blocked and OAI-SearchBot is still allowed.

Watch for server errors too. Under RFC 9309, if robots.txt returns a 5xx error, crawlers must assume everything is disallowed. Google handles it a little differently. It pauses crawling for 12 hours, then falls back to its last cached copy of the file. Either way, a broken robots.txt quietly changes who can crawl you.

What robots.txt can't do

robots.txt is a voluntary standard, not a lock. Well-known AI companies document that they follow it, but it doesn't stop a crawler that chooses to ignore it, and it doesn't remove content that was collected before you added the rule.

User-triggered fetchers are also different from crawlers. Perplexity says Perplexity-User "generally ignores robots.txt rules" because a person requested the page, and OpenAI says robots.txt rules may not apply to ChatGPT-User. If content must stay private, put it behind a login. Anthropic also notes that blocking by IP address may not work correctly or persistently, so robots.txt rules are the supported route.

Finally, decide what you actually want. Blocking training bots is a content-licensing choice. Blocking AI search bots is a visibility choice. The AI Readiness Audit scores the second one separately for that reason. You can block every training crawler and still score full marks for being findable in AI search.