Block AI crawlers: robots.txt rules for GPTBot and other bots
To block AI crawlers with robots.txt, add a group for each crawler to the robots.txt file at the root of your site – for example User-agent: GPTBot followed by Disallow: /. AI crawlers are not one kind of bot: some collect training data, some crawl for AI search and some open a page only when a user asks for it, so blocking them all can also remove you from AI answers. The file is a request, not a lock: crawlers that follow it obey it, but it does not stop the others and does not remove pages from the index.
What robots.txt controls – and what it does not
robots.txt is a text file with access rules for bots: which paths they may crawl and which they may not. It controls crawling, not indexing, and it is not protection – anyone can read it and any bot can ignore it. Compliance is voluntary and depends on the operator of each bot.
On WordPress, one setting can discourage search engines from indexing the whole site; the WordPress SEO audit shows where it is.
On Shopify, robots.txt is changed only through the robots.txt.liquid template; the Shopify SEO audit checklist shows what else the platform sets for you.
Crawling instructions, not access control
Disallowtells compliant bots not to fetch a path. The page stays public: any browser and any bot that ignores the file can still open it.- A blocked URL can still appear in search if other sites link to it – without a description, because the bot has not read the content.
- To keep a page out of the index, use
noindexin a meta tag or in theX-Robots-Tagheader and leave the page open to crawling: a bot that cannot fetch the page never sees thenoindex. - The file is public: do not list secret paths in it, because that shows them to everyone.
Why blocking does not delete data
A new rule in robots.txt applies to future visits of compliant bots. It does not delete copies that were already collected, does not remove content from third-party datasets and does not make models that are already trained forget it. If the content was public for months, part of it may already have been used – the file only limits the next crawl.
Types of AI crawlers by purpose
The large providers use separate user agents for separate tasks and describe different rules for each. Blocking one user agent is therefore not a ban on all the services of that provider – and allowing one does not open the site to all of them.
Training crawlers
They collect public content that may be used to train models: GPTBot (OpenAI), ClaudeBot (Anthropic) and CCBot (Common Crawl, whose public archive is often used to train language models). The control tokens Google-Extended and Applebot-Extended belong here too: they are not separate crawlers but decide how content crawled by Googlebot and Applebot may be used.
AI search crawlers
They crawl the site so that it can be shown and cited in AI search answers: OAI-SearchBot for ChatGPT search, Claude-SearchBot for search in Claude and PerplexityBot for Perplexity results. If you block them, your pages are less likely to appear as a source in those services.
User-triggered fetchers
ChatGPT-User, Claude-User and Perplexity-User do not crawl on their own: they open a specific page when a user asks the assistant to. Their providers document different behavior toward robots.txt – see the table in the next section.
Which AI crawlers respect robots.txt
The table summarizes the documented behavior from the providers’ official pages, checked on 3 November 2026. Providers change names and rules, so check the current documentation before you decide.
| Purpose | Documented behavior toward robots.txt | |
|---|---|---|
GPTBot | Training OpenAI’s models | Follows it; a block means the content should not be used for training |
OAI-SearchBot | ChatGPT search | Follows it; blocked sites are not shown in search answers but can still appear as navigational links |
ChatGPT-User | Actions a user asks for | OpenAI says robots.txt rules may not apply, because a user starts the request |
ClaudeBot, Claude-SearchBot, Claude-User | Training, search and user requests | Anthropic says its bots follow robots.txt, including Crawl-delay |
PerplexityBot | Perplexity results | Perplexity recommends allowing it in robots.txt |
Perplexity-User | Opening a page a user asks for | Perplexity says it generally ignores robots.txt, because the request comes from a user |
Google-Extended | Gemini training and answers in Gemini apps | Not a separate crawler: crawling is done by Googlebot; no effect on Google Search |
Comparing purpose and documented behavior
Keep the declared behavior apart from what you see in your logs. A request with the name GPTBot in the User-Agent header does not prove that it comes from OpenAI – anyone can send that name. So do not call a bot non-compliant from the user agent alone: check the IP address first (see the verification section below).
How to check the official sources
- Read the provider’s own page, not a summary: OpenAI, Anthropic and Google publish lists of their crawlers and what they are for.
- Write the date of the check next to every rule in your own documentation, so that you know later whether the description is out of date.
- Check whether the provider publishes the IP addresses of its bots: OpenAI publishes lists as
JSONfiles, and Google publishes the ranges of its crawlers.
Choose a policy that fits the goals of your site
There is no single right answer: the choice depends on whether you want visibility in AI answers, whether your content is paid or unique, and how much load your server can take. The trade-off is between access for AI search and limiting the extraction of content – and neither direction guarantees traffic or citations.
| Training crawlers | AI search crawlers | User-triggered fetchers | |
|---|---|---|---|
| Maximum visibility | Allow | Allow | Allow |
| No training, but in AI answers | Block | Allow | Allow |
| Paid or unique content | Block | Decide per section | Decide per section |
| The server cannot take the load | Limit | Limit on the server | Limit on the server |
Blocking training while staying in AI search
This option fits when you want to stay visible in AI answers but keep the content out of training: block GPTBot, ClaudeBot, CCBot and the Google-Extended and Applebot-Extended tokens, and allow OAI-SearchBot, Claude-SearchBot, PerplexityBot and the search engines. Compliant bots then do not collect the content for training, while your pages can still be shown and cited in AI search.
Different rules for different parts of the site
The decision does not have to cover the whole site. You can allow the blog and the service pages and block training crawlers from a section with paid material or internal documents. Remember that content which must not be public is protected with a login, not with robots.txt.
robots.txt syntax and scope
The file lives at /robots.txt in the root of the host. Its rules apply only to the host, protocol and port where it is placed: https://example.com/robots.txt does not apply to https://shop.example.com or to http://example.com. Google reads up to 500 KiB of the file and ignores the rest.
User-agent, Allow and Disallow
User-agentstarts a group and names the bot the following rules apply to;User-agent: *is the group for all bots that have no group of their own.Disallowblocks a path andAllowopens a path inside a blocked one:Disallow: /private/andAllow: /private/public.html.- An empty
Disallow:means “nothing is blocked”, whileDisallow: /blocks the whole site. Sitemap:points to the sitemap and does not depend on the groups.
Groups, precedence and path matching
- A crawler follows only the most specific group that names it: if there is a group for
GPTBot,GPTBotignores theUser-agent: *group completely. - In Google, the most specific rule wins – the one with the longest matching path; when rules conflict equally, the least restrictive one,
Allow, wins. The order of the lines does not decide, so “the last line wins” is misleading. - Paths are case-sensitive, and
*and$work as a wildcard and as the end of the URL.
Example robots.txt for AI crawlers: alternative rules
The examples below are illustrative and are alternative scenarios – do not paste them mechanically into one file. Each group is a User-agent line followed by its rules; leave an empty line between groups.
Blocking one specific crawler
User-agent: GPTBotand, on the next line,Disallow: /– blocks only OpenAI’s training crawler.User-agent: ClaudeBotandDisallow: /– blocks Anthropic’s training crawler.User-agent: CCBotandDisallow: /– blocks Common Crawl.
Search allowed, training restricted
User-agent: Google-ExtendedandDisallow: /– the content is not used to train Gemini models or as a source for answers in Gemini apps;Googlebotand Google Search are not affected.User-agent: Applebot-ExtendedandDisallow: /– the content is not used to train Apple’s models;Applebotstill crawls.User-agent: *andAllow: /– everything else, includingOAI-SearchBot,Claude-SearchBot,PerplexityBot,GooglebotandBingbot.
Restricting selected directories
User-agent: GPTBot, thenDisallow: /premium/andDisallow: /docs/internal/– the training crawler skips these sections and crawls the rest.User-agent: *is not a selector for AI crawlers only: a rule there also applies toGooglebotandBingbotif they have no group of their own. If you add a separate group for a bot, repeat in it the rules from the general group that should still apply.
How the rules affect SEO and AI search
Blocking GPTBot is not the same as blocking search crawlers. GPTBot is for training; ChatGPT search uses OAI-SearchBot, and ChatGPT-User opens pages on request. If you block OAI-SearchBot, the site is not shown in ChatGPT search answers, although it can still appear as a navigational link.
Visibility in search engines and AI answers
Google-Extended does not affect inclusion or ranking in Google Search. AI Overviews are part of Google Search and use the pages Googlebot crawls; you limit them with nosnippet, max-snippet or noindex, not with Google-Extended. How AI search systems choose the sources they cite is explained in how to get cited by AI search. Be careful not to block search crawlers or the CSS and JavaScript files a page needs to render by accident.
The difference between Disallow and noindex
Disallow stops crawling, but the URL can stay in the index without a description. noindex removes the page from the index, but only if the bot can fetch the page and read the directive. So do not combine the two on the same page: first leave crawling open and add noindex, and once the page has dropped out of the index, decide whether to block it. The most common mistakes with noindex and canonical are covered in noindex, canonical and hreflang errors on multilingual sites.
Limits and reasons a block may not work
Even a correct file does not give full control. Requests can continue for several reasons, and not all of them are violations.
Non-compliant bots and spoofed identities
- Some bots ignore
robots.txtor use someone else’s name in theUser-Agentheader. - Content can be fetched through intermediaries – page preview services, translators or third-party servers.
- Often a request is not a violation at all: the bot still uses a cached copy of the old file, the rule has a mistake, or the request comes from another type of bot of the same provider – for example a user-triggered one.
Old copies and outside sources
Third-party copies, older datasets and models that are already trained do not change when you change the file. If the content is also published elsewhere – aggregators, archives, social networks – the rules of your site do not apply there.
How to check which bots visit your site
The only reliable evidence of which bots arrive is your server logs. The User-Agent header is only a claim; the proof is the IP address.
Analyzing server logs
- The useful fields: time, IP address, user agent, URL and the HTTP status of the response.
- Compare the requests before and after you change the file – over several weeks, not one day.
- No requests is not proof of full protection: a bot can come under another name or from other IP addresses.
Verifying a claimed identity
- For
GooglebotandBingbot, run a reverse DNS lookup on the IP. The host name must end ingooglebot.com,google.comorgoogleusercontent.comfor Google and insearch.msn.comfor Bing. - Run a forward DNS lookup on that host name. It must return the same IP address; otherwise the request is fake.
- For AI crawlers, compare the IP with the official ranges when the provider publishes them: OpenAI publishes the IP addresses of its bots, and Google publishes the ranges of its crawlers.
Extra control with the server, CDN and WAF
robots.txt is an instruction; a real refusal of access happens on the server, in the CDN or in the web application firewall (WAF) – with rules by user agent and IP address, with authentication or with a bot challenge. The reverse is also a problem: a file that allows everything does not help if the firewall rejects the request first. Cloudflare, for example, has separate settings for AI crawlers and on newer domains may block some of them by default.
IP blocking and rate limiting
Blocking by IP address is a blunt tool: bot addresses change, infrastructure is often shared and you may block real visitors. Crawl-delay is not a universal answer – it is not part of the RFC 9309 standard, Google does not support it, while other bots support it: Bing names robots.txt as the only valid place for crawl-delay, and Anthropic says its bots support it. For load, use rate limiting on the server: return 429 or 503 for a short time, not for days.
Protecting content that must not be public
If bots must not see something at all, put it behind a login or authentication. Unlike robots.txt, a login does not depend on the goodwill of the bot.
Testing, publishing and how long changes take
A change to robots.txt is one of the few that can block crawling of a whole site with one line. Test before you publish and monitor afterwards.
Checks before publishing
- Open the public file in the browser and check the syntax and the groups: which bot falls into which group.
- Test several representative URLs – the home page, a category, an article, a CSS or JavaScript file – against the rules of every important bot.
- Check the HTTP status of the file itself. Google treats a
4xxresponse (except429) as if there were no file, so nothing is blocked; on5xxit stops crawling for 12 hours and then uses the last good copy for up to 30 days. It follows at least five redirect hops. Other bots may behave differently – check their documentation. - After publishing, enter your domain in the free tool at
/tools/ai-bots: it shows for each AI and search bot whether it is allowed or blocked and the exact line that decides it. From outside it cannot see firewall rules that block only some bots.
Monitoring after the change
There is no universal delay. Caching happens everywhere: Google generally keeps a copy of the file for up to 24 hours, OpenAI says its search systems need about 24 hours to reflect a change, and other bots may read the file less often. The cache of your CDN or server can also serve the old version. Watch the logs for a few days before you decide that a bot ignores the new rule.
A checklist for maintaining the rules
Maintain the file like code: with history, review and a check after every change. RankDossier audits sites with its own crawler, RankDossierBot, which identifies itself, follows robots.txt, respects Crawl-delay and is described on the /bot page – an example of a transparent crawler you can allow, slow down or block like any other.
- Google: Introduction to robots.txt
- Google: How Google interprets the robots.txt specification
- Google: Verify requests from Google crawlers and fetchers (
Googlebot) - OpenAI: Overview of OpenAI crawlers (
OAI-SearchBot,ChatGPT-User,GPTBot) - Anthropic: How Anthropic crawls the web and how to block its crawler
- Cloudflare: Block AI bots: the settings for AI crawlers and their defaults
What to check with every change
- The goal: what you want – visibility in AI search, no training, less load.
- The bots: which user agents the rule affects, according to the current documentation.
- The rules: the most specific group for each bot and the general rules repeated in it.
- The tests: the representative URLs and the HTTP status of the file.
- Publishing: an archive of the previous file and a written way to roll back an unwanted block.
- Monitoring: the logs and the
/tools/ai-botstool after the change.
When to update the policy
Review the rules when a new bot appears in the logs, when a provider changes its documentation, during a migration or a change of domain, and whenever the business decision about training changes. Checking the providers’ documentation every few months is a good habit. If you also publish an llms.txt file, remember that it does not control bot access – see what llms.txt is.
Terms from this chapter in the glossary: AI crawler
Questions and answers
Does robots.txt stop my site from being used to train AI?
Only for future crawling by bots that follow the file, such as
GPTBot,ClaudeBotandCCBot. Data that was already collected, copies held by third parties and models that are already trained do not change.Does blocking GPTBot remove my site from ChatGPT search?
No.
GPTBotis for training. ChatGPT search usesOAI-SearchBot, which is allowed or blocked separately, andChatGPT-Useropens pages at a user’s request; for it, OpenAI saysrobots.txtrules may not apply.Does Google-Extended affect ranking in Google Search?
No. According to Google, the
Google-Extendedtoken does not affect inclusion or ranking in Google Search; it decides whether content may be used to train Gemini and for answers in Gemini apps.Does Claude-User follow robots.txt?
According to Anthropic’s documentation, yes: its bots, including
Claude-User, followrobots.txt. If you blockClaude-User, Claude cannot open your pages when a user asks it to.Does Crawl-delay work for AI crawlers?
It depends on the bot. Google does not support it, while Anthropic says its bots respect it. For load problems, rate limiting on the server is more reliable.
Is blocking by IP address enough?
Rarely. Block only verified official ranges, because addresses change and are shared, and a wrong block also stops real visitors.
How long does a robots.txt change take to apply?
There is no fixed delay. Google generally caches the file for up to 24 hours, OpenAI says about 24 hours for its search, and other bots follow their own schedule.
How do I block GPTBot and check that the block works?
Add
User-agent: GPTBotandDisallow: /, test the rules on representative URLs, then watch the server logs and verify the IP address of each request. The free tool at/tools/ai-botsshows the result for all the main bots at once.
Also read
- How to get cited by AI search: ChatGPT, Perplexity and Google
- Generative engine optimization (GEO): what it is and how to do it
- What is a GEO audit and how is it different from an SEO audit?
- What is llms.txt and should your site have one?
- Common indexing and canonical tag mistakes on multilingual sites
- AI bots in robots.txt
- robots.txt tester
- Videos: how to use RankDossier
- RankDossierBot: how our crawler works
- robots.txt errors
Check your own site
Enter a domain – the free pre-check reads up to 10 pages and shows how many types of problems it finds. You pay only if you want the full report.
Start the free pre-check