How to block GPTBot and other AI crawlers in robots.txt (and which bots to allow)

Published

You block an AI crawler in robots.txt by adding its exact user-agent token in its own group with Disallow: / — and you allow it the same way with Allow: /. The decision that actually matters isn't "AI crawlers: yes or no" — it's which of 12 named bots to allow and which to block, since some crawl to power live search answers and others crawl only to train a model. Our AI robots.txt generator writes the exact rules for you.

Generate your rules free →

Want to see whether your current robots.txt already blocks the bots you'd rather keep? Run your site through the AI visibility checker first — six of its 14 checks are exactly this, one per named AI bot it tracks (a mix of search, fetch, and training purposes).

The 12 bots you're actually deciding about

Every row below is a real, vendor-published user-agent token. "Purpose" is what that specific bot does when it crawls you — training, live search, or a one-off fetch (explained below the table):

TokenVendorPurposeWhat it does
GPTBotOpenAItrainingCrawls pages to help train OpenAI's models
OAI-SearchBotOpenAIsearchCrawls pages for ChatGPT search results and citations
ChatGPT-UserOpenAIfetchFetches a page live when a ChatGPT user asks it to
ClaudeBotAnthropictrainingCrawls pages that may be used to train Claude models
Claude-SearchBotAnthropicsearchCrawls pages to improve Claude's search and citation quality
PerplexityBotPerplexitysearchCrawls and indexes pages for Perplexity's search answers
Google-ExtendedGoogletrainingControls whether Gemini and Vertex AI can train on the site's content
Applebot-ExtendedAppletrainingControls whether Apple Intelligence can train on the site's content
CCBotCommon CrawltrainingCrawls pages into the Common Crawl dataset, used to train many LLMs
BytespiderByteDancetrainingCrawls pages for ByteDance's (TikTok's) AI model training
Meta-ExternalAgentMetatrainingCrawls pages to train and improve Meta's AI models
AmazonbotAmazonsearchCrawls pages for Amazon's search, Alexa and assistant answers

Search, training, and fetch aren't the same decision

"Search" bots crawl to power an AI's live search answers and citations — blocking one means that assistant can't surface or link to your page in its search results. "Training" bots crawl to train a future model version — blocking one has no effect on today's answers, only on whether a future model learns from your content.

ChatGPT-User is different from both: it's a one-off live fetch that happens only when an actual ChatGPT user asks the assistant to pull that exact page — for example, pasting your URL and asking "what does this page say?" It isn't crawling your whole site in the background like the others. This is the distinction people get wrong most often: blocking ChatGPT-User doesn't stop training or search indexing, it stops ChatGPT from being able to fetch your page on a user's direct request.

The recommended rule, and how to generate it

Our generator offers three presets: "Allow AI search, block training" (allows every search and fetch bot, blocks every training bot — the recommended default), "Allow all", and "Block all". The default lets your pages show up in AI search answers while opting out of being training data.

It writes one group per bot, in this shape:

User-agent: GPTBot
Disallow: /

User-agent: OAI-SearchBot
Allow: /

(that example uses a placeholder domain, not our own site — our own robots.txt is a generic allow-all with no AI-bot-specific rules, so it isn't an example of these rules in use). If you already have a robots.txt and run the generator again later, it only replaces the bot groups it added previously — matched by exact token — so you won't end up with duplicate rules.

robots.txt only controls crawling, not whether an AI can quote your content once it's been read — see how to create an llms.txt file for the other half of making a site AI-readable, and get recommended by ChatGPT for the fuller checklist.

Questions

How do I block GPTBot specifically?

Add User-agent: GPTBot followed by Disallow: / as its own group in your robots.txt. The exact same pattern works for any of the other 11 named AI bots — just swap the token.

Should I block all AI crawlers?

Not necessarily. Blocking a search-purpose bot (like OAI-SearchBot or PerplexityBot) can stop your pages from showing up in that AI's search answers at all. The recommended default is to allow search and fetch bots while blocking training-only bots, which our generator's "Allow AI search, block training" preset sets up for you.

What's the difference between ChatGPT-User and GPTBot?

GPTBot crawls broadly to help train OpenAI's models. ChatGPT-User only fetches a specific page, once, when a ChatGPT user directly asks the assistant to pull that URL — it's not an ongoing background crawl.

Will blocking Google-Extended affect my Google search ranking?

No — Google-Extended only controls whether Gemini and Vertex AI can train on your content. Classic Google Search crawling and ranking use a separate crawler (Googlebot), unaffected by this token.

Can I just allow everything?

Yes — the generator's "Allow all" preset does exactly that in one pass. It's the simplest option if you have no reason to restrict any bot.