RankDossier
Guide

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.

Blocking AI crawlers · Author: The RankDossier team · Updated:

Check your own site Start the free pre-check

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.

Diagram: the robots file is a request, not a lock. In the example, search engine crawlers and AI search crawlers are allowed, AI training crawlers are blocked, and user-triggered bots may not follow the file at all. robots.txt a request, not a lock Search engine crawlers Googlebot, Bingbot Allow: / AI search crawlers OAI-SearchBot, Claude-SearchBot, PerplexityBot Allow: / AI training crawlers GPTBot, ClaudeBot, CCBot Disallow: / User-triggered bots ChatGPT-User, Claude-User, Perplexity-User some may not follow robots.txt Diagram: the robots file is a request, not a lock. In the example, search engine crawlers and AI search crawlers are allowed, AI training crawlers are blocked, and user-triggered bots may not follow the file at all. robots.txt a request, not a lock Search engine crawlers Googlebot, Bingbot Allow: / AI search crawlers OAI-SearchBot, Claude-SearchBot, PerplexityBot Allow: / AI training crawlers GPTBot, ClaudeBot, CCBot Disallow: / User-triggered bots ChatGPT-User, Claude-User, Perplexity-User some may not follow robots.txt
Example: block AI training, stay in AI search

Crawling instructions, not access control

  • Disallow tells 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 noindex in a meta tag or in the X-Robots-Tag header and leave the page open to crawling: a bot that cannot fetch the page never sees the noindex.
  • 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.

PurposeDocumented behavior toward robots.txt
GPTBotTraining OpenAI’s modelsFollows it; a block means the content should not be used for training
OAI-SearchBotChatGPT searchFollows it; blocked sites are not shown in search answers but can still appear as navigational links
ChatGPT-UserActions a user asks forOpenAI says robots.txt rules may not apply, because a user starts the request
ClaudeBot, Claude-SearchBot, Claude-UserTraining, search and user requestsAnthropic says its bots follow robots.txt, including Crawl-delay
PerplexityBotPerplexity resultsPerplexity recommends allowing it in robots.txt
Perplexity-UserOpening a page a user asks forPerplexity says it generally ignores robots.txt, because the request comes from a user
Google-ExtendedGemini training and answers in Gemini appsNot 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 JSON files, 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 crawlersAI search crawlersUser-triggered fetchers
Maximum visibilityAllowAllowAllow
No training, but in AI answersBlockAllowAllow
Paid or unique contentBlockDecide per sectionDecide per section
The server cannot take the loadLimitLimit on the serverLimit on the server

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-agent starts 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.
  • Disallow blocks a path and Allow opens a path inside a blocked one: Disallow: /private/ and Allow: /private/public.html.
  • An empty Disallow: means “nothing is blocked”, while Disallow: / 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, GPTBot ignores the User-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: GPTBot and, on the next line, Disallow: / – blocks only OpenAI’s training crawler.
  • User-agent: ClaudeBot and Disallow: / – blocks Anthropic’s training crawler.
  • User-agent: CCBot and Disallow: / – blocks Common Crawl.

Search allowed, training restricted

  • User-agent: Google-Extended and Disallow: / – the content is not used to train Gemini models or as a source for answers in Gemini apps; Googlebot and Google Search are not affected.
  • User-agent: Applebot-Extended and Disallow: / – the content is not used to train Apple’s models; Applebot still crawls.
  • User-agent: * and Allow: / – everything else, including OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot and Bingbot.

Restricting selected directories

  • User-agent: GPTBot, then Disallow: /premium/ and Disallow: /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 to Googlebot and Bingbot if 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.

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.txt or use someone else’s name in the User-Agent header.
  • 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

  1. For Googlebot and Bingbot, run a reverse DNS lookup on the IP. The host name must end in googlebot.com, google.com or googleusercontent.com for Google and in search.msn.com for Bing.
  2. Run a forward DNS lookup on that host name. It must return the same IP address; otherwise the request is fake.
  3. 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 4xx response (except 429) as if there were no file, so nothing is blocked; on 5xx it 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.

What to check with every change

  1. The goal: what you want – visibility in AI search, no training, less load.
  2. The bots: which user agents the rule affects, according to the current documentation.
  3. The rules: the most specific group for each bot and the general rules repeated in it.
  4. The tests: the representative URLs and the HTTP status of the file.
  5. Publishing: an archive of the previous file and a written way to roll back an unwanted block.
  6. Monitoring: the logs and the /tools/ai-bots tool 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, ClaudeBot and CCBot. Data that was already collected, copies held by third parties and models that are already trained do not change.

  • No. GPTBot is for training. ChatGPT search uses OAI-SearchBot, which is allowed or blocked separately, and ChatGPT-User opens pages at a user’s request; for it, OpenAI says robots.txt rules may not apply.

  • No. According to Google, the Google-Extended token 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, follow robots.txt. If you block Claude-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: GPTBot and Disallow: /, 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-bots shows the result for all the main bots at once.

Also read

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