A few years ago robots.txt mostly talked to search engines. Today the same file also answers a newer question: which AI systems may read your pages, and for what purpose. OpenAI, Anthropic, Perplexity, Google and Apple each publish one or more tokens, such as GPTBot, ClaudeBot, PerplexityBot or Google-Extended, and state that their crawlers follow the rules you write for those tokens.
The catch is that these tokens do different jobs. Some collect content to train models. Some build the index that an AI assistant searches when it answers a question and links to sources. Others fetch a page only because a user pasted a link or asked about it. Blocking all of them with one line has a different effect from blocking only training, and a rule meant for one token can silently cancel the rules you wrote for everyone else.
This guide explains the three kinds of AI crawler, how to decide what to allow, the robots.txt grouping rules that trip people up, ready-made configurations for common choices, how to set them on WordPress, Next.js, Shopify and at a CDN, and how to verify the result from the outside and in your logs. All examples use example.com.
Scope of this guide
This guide covers robots.txt rules, which crawlers follow voluntarily. robots.txt is not access control, vendor token lists change over time, and an automated audit reads public files and pages only; it cannot see your server logs or what any AI system does with content.
1. How robots.txt applies to AI crawlers
robots.txt is a plain-text file at the root of a host, for example https://example.com/robots.txt. Its format is standardized as the Robots Exclusion Protocol in RFC 9309. A crawler that follows the protocol downloads the file, finds the group of rules addressed to its product token, and skips any path that a Disallow rule in that group matches.
Four properties matter before you write a single AI rule:
- It is per host.
https://example.com/robots.txtdoes not coverhttps://shop.example.com/orhttps://docs.example.com/. Every hostname that serves content needs its own file. - It is voluntary. RFC 9309 states that the rules are not a form of access authorization. Reputable vendors document that their crawlers honor them, but a scraper that ignores the file is not stopped by it. Anything genuinely private needs authentication.
- It controls crawling, not use. A
Disallowrule asks a crawler not to fetch a path. What a vendor does with content it already fetched, or with content obtained elsewhere, is governed by that vendor's policies, not by your file. - Some tokens never appear in your logs. Google-Extended and Applebot-Extended are not separate crawlers. They are tokens you address in robots.txt to control how content fetched by Googlebot or Applebot may be used.
If you need a refresher on robots.txt and indexing in general, the robots.txt and indexing guide covers the basics; this article focuses on the AI tokens.
2. Training, search and user-requested crawlers
Vendor documentation separates AI-related access into three purposes. Each purpose has its own token, so you can make a different decision for each.
- Training crawlers or tokens govern whether your content may be used to train generative models.
- Search or answer crawlers build the index an AI assistant searches when it answers questions and shows sources. Blocking them can mean your pages are not shown or linked in that assistant's answers.
- User-requested fetchers load a page because a person asked the assistant to, for example by pasting a URL. They are not automatic crawling, and vendors treat them differently, so read each vendor's page for how robots.txt applies. Perplexity, for example, documents that its user fetcher generally ignores robots.txt because a user requested the page.
The table summarizes the tokens most site owners ask about, based on each vendor's published documentation at the time of writing. Vendors add and rename tokens, so recheck their pages before you rely on the list.
| Token | Vendor | Purpose | Effect of Disallow |
|---|---|---|---|
GPTBot | OpenAI | Training | Content not used for training OpenAI's generative models |
OAI-SearchBot | OpenAI | Search | Pages not shown in ChatGPT search answers, though they may still appear as navigational links |
ChatGPT-User | OpenAI | User-requested | See OpenAI's page; these are visits triggered by a user, not automatic crawling |
ClaudeBot | Anthropic | Training | Content excluded from Anthropic's model training data collection |
Claude-SearchBot | Anthropic | Search | Content not indexed for search, which Anthropic says may reduce visibility in Claude's search results |
Claude-User | Anthropic | User-requested | Claude cannot fetch your pages when a user asks it to |
PerplexityBot | Perplexity | Search | Pages not surfaced or linked in Perplexity search results; Perplexity says this bot is not used to train foundation models |
Perplexity-User | Perplexity | User-requested | Generally ignores robots.txt, per Perplexity's documentation |
Google-Extended | Training and Gemini grounding (token only) | Content not used for Gemini training or grounding; no effect on Google Search inclusion or ranking | |
Applebot-Extended | Apple | Training (token only) | Content not used to train Apple's generative models; Applebot still crawls for Apple search features |
CCBot | Common Crawl | Public web archive | Pages not added to the Common Crawl archive, which third parties reuse |
One frequent misunderstanding concerns Google. AI Overviews are part of Google Search, so they rely on Googlebot, not Google-Extended. According to Google's crawler documentation, blocking Google-Extended does not remove you from Search. Controlling how your text appears in Search features is done with snippet controls, and leaving Google's AI features entirely with a Search Console setting; both are covered in section 7.
3. Deciding what to allow
There is no single right answer; the choice depends on what your content is for. Work through these questions for each site or section:
- Do you want to be found and cited in AI answers? If people research your product, service or topic in ChatGPT, Claude or Perplexity, the search crawlers (
OAI-SearchBot,Claude-SearchBot,PerplexityBot) are the ones that put your pages in front of them. Allowing them makes citation possible; it does not guarantee it. - Do you object to training use? If your content is your product (journalism, courses, research, original illustrations), you may want to opt out of training tokens while staying visible in search. Vendors document these as independent controls, so this split is supported.
- Is the content licensed or behind a paywall? Paywalled pages should be protected by authentication, not robots.txt. For public preview pages, decide whether a summary in an AI answer helps or hurts your business.
- Are user-requested fetches useful to you? Blocking them stops an assistant from reading a page a user explicitly pointed to, which often hurts support and documentation sites more than it helps.
- Is crawl load a concern? If a crawler causes measurable server load, a narrower rule for heavy paths (search result pages, faceted filters, archives) is often better than a full block.
A common middle ground for marketing sites, documentation and shops is: allow search and user-requested fetchers, decide on training separately, and block only areas that have no public value, such as /cart/, /account/ or internal search. Write the decision down, because robots.txt changes are easy to undo by accident during a redesign or a CMS migration.
Also be clear about what a block cannot do. Disallowing a training token today does not remove content that was collected before, and it does not affect copies of your text that exist on other sites.
4. robots.txt syntax: the grouping rules that matter
Most AI robots.txt mistakes come from one rule in RFC 9309: a crawler obeys only the group that names it. If a group for its token exists, it ignores the User-agent: * group entirely. It uses * only when no group names it.
That has a surprising consequence. Consider this file:
User-agent: *
Disallow: /admin/
Disallow: /cart/
User-agent: GPTBot
Disallow: /members/GPTBot reads only its own group, so it is now allowed into /admin/ and /cart/. If you give a crawler its own group, repeat every general rule you still want it to follow.
The other rules worth knowing:
- Several tokens can share a group. Stack
User-agentlines on top of each other, then write the rules once. RFC 9309 and Google both support this. - Token matching is case-insensitive.
gptbotandGPTBotmatch the same group. Spelling still matters:Claude-Botis notClaudeBot. - Groups for the same token are merged. If
GPTBotappears in two groups, a crawler that follows the standard combines their rules. It is still clearer to keep one group per decision. - The most specific path wins. When an
Allowand aDisallowboth match, the rule with the longer path applies; on a tie, RFC 9309 saysAllowshould be used. - An empty Disallow allows everything.
Disallow:with no value blocks nothing.Disallow: /blocks the whole host. - Status codes change the meaning. Under RFC 9309, a 4xx response for robots.txt lets crawlers fetch anything, while a 5xx or an unreachable server makes them assume everything is disallowed. A misconfigured firewall that returns 5xx only to bots can therefore look like a full block.
- Changes are not instant. The RFC lets crawlers cache the file, generally for up to 24 hours, so allow at least a day before judging the effect.
Google's robots.txt documentation describes the same grouping and precedence rules with examples.
5. Ready-made configurations for common choices
Allow AI search, opt out of training
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
User-agent: *
Disallow: /admin/
Disallow: /cart/
Sitemap: https://example.com/sitemap.xmlOAI-SearchBot, Claude-SearchBot and PerplexityBot have no group of their own here, so they follow the * group: everything except /admin/ and /cart/. Googlebot and Applebot keep crawling for search.
Allow everything except private areas
User-agent: *
Disallow: /admin/
Disallow: /cart/
Sitemap: https://example.com/sitemap.xmlNo AI-specific lines are needed. Check that nothing else in the file, such as an old Disallow: / left from a staging copy, applies to *.
Opt out of AI search and training
User-agent: GPTBot
User-agent: OAI-SearchBot
User-agent: ClaudeBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /
User-agent: *
Disallow: /admin/
Disallow: /cart/This keeps classic search engines working while asking the listed AI crawlers to stay out. Expect your pages to stop appearing as sources in those assistants over time.
Block one section for one crawler
User-agent: GPTBot
Disallow: /admin/
Disallow: /cart/
Disallow: /courses/
User-agent: *
Disallow: /admin/
Disallow: /cart/Note how the general rules are repeated inside the GPTBot group, for the reason explained in section 4.
6. Setting the rules on common stacks
- Static sites and plain servers. Place
robots.txtin the web root so it is served at/robots.txtwith status 200 andContent-Type: text/plain. Keep it in version control so a deploy cannot overwrite it with an old copy. - WordPress. WordPress generates a virtual robots.txt when no physical file exists. SEO plugins usually offer a robots.txt editor; a physical
robots.txtfile in the site root takes over from the virtual one. Use one method, not both, and check the live URL after saving, because caching plugins can serve an old version. - Next.js (App Router). Generate the file from
app/robots.tsso it is versioned with the code:
Do not also keep a staticimport type { MetadataRoute } from 'next' export default function robots(): MetadataRoute.Robots { return { rules: [ { userAgent: ['GPTBot', 'ClaudeBot', 'Google-Extended', 'Applebot-Extended', 'CCBot'], disallow: '/' }, { userAgent: '*', disallow: ['/admin/', '/cart/'] }, ], sitemap: 'https://example.com/sitemap.xml', } }public/robots.txt, or you will be unsure which one is served. - Shopify. Shopify generates robots.txt by default; you customize it with a
robots.txt.liquidtheme template. Add AI groups there and keep the default rules unless you have a reason to change them. - CDNs and edge platforms. Some CDNs offer managed settings that add AI-crawler rules to robots.txt or block AI user agents at the edge. These are convenient but invisible in your repository, so record that they are on. Edge blocking and robots.txt can disagree: a robots.txt that allows
OAI-SearchBotdoes nothing if the firewall answers it with 403. The guide to bot challenges that block crawlers shows how to exempt verified bots with narrow rules.
On every stack, remember the subdomains: docs.example.com or help.example.com on a third-party platform needs its own file, often configured in that vendor's settings.
7. What robots.txt cannot do, and the other controls
robots.txt answers one question: may this crawler fetch this path. Several related needs require other tools.
- Keeping a page out of search results. A disallowed URL can still be indexed from links without its content. To keep it out of Google, allow crawling and send
noindexin a robots meta tag orX-Robots-Tagheader, as described in Google's robots meta tag documentation. - Limiting text shown in Google's AI features. Because AI Overviews belong to Search, the relevant controls are Google's snippet directives:
nosnippet,max-snippetand thedata-nosnippetattribute on specific elements. These reduce what can be shown, which can also reduce how useful your result looks. - Leaving Google's AI features entirely. Search Console's Search generative AI control, under Settings, lets a property owner exclude the site from AI Overviews, AI Mode and generative AI features in Google Discover. Google says the setting is not used as a ranking or inclusion signal for other parts of Search, and it does not affect AI training, which Google-Extended controls.
- Protecting private content. Login, signed URLs or IP restrictions. Listing a secret path in robots.txt actually advertises it, since anyone can read the file.
- Stopping crawlers that ignore the file. Firewall or CDN rules based on verified bot identity and rate limiting. User-agent strings are easy to fake, so allow or deny based on the IP ranges vendors publish where available.
llms.txt is sometimes mentioned in the same breath. It is a proposed convention, not a standard, and it does not grant or deny access; robots.txt remains the file vendors document for crawl control. The llms.txt guide explains what the file can and cannot do, and the AI visibility audit guide covers the other signals that affect whether AI systems can use your pages as sources.
8. How to verify your AI crawler rules
Read the live file. Check what is actually served, not what is in your editor:
curl -sS -D - https://example.com/robots.txtLook for status 200, a text content type and the groups you expect. Repeat for https://www.example.com/robots.txt and every content subdomain. A redirect to the canonical host is fine; a 5xx is not.
Check that the edge does not contradict the file. On your own site, request a page with a crawler-like user agent and compare it with a normal request:
curl -sS -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://example.com/
curl -sS -o /dev/null -w "%{http_code}\n" https://example.com/A 403 or challenge page for the first but not the second means a firewall rule is blocking a crawler your robots.txt allows. Real crawlers come from vendor IP ranges, so this test only shows rules based on the user-agent string.
Walk through the grouping by hand. For each token you care about, find the group that names it. If none does, it follows *. Then find the longest matching path rule for your key URLs. Google Search Console's robots.txt report shows which file Google fetched and any parsing problems for Google's crawlers.
Watch your logs. After a day or two, count AI crawler requests per day:
grep -Ei "gptbot|oai-searchbot|claudebot|claude-searchbot|perplexitybot" /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | headRequests to disallowed paths from IPs inside a vendor's published ranges deserve a report to that vendor; the same user agent from unrelated IPs is likely an impostor and a case for firewall rules. Do not expect Google-Extended or Applebot-Extended in logs, since they are tokens, not crawlers.
Re-check after every migration. CMS changes, theme updates and new CDN settings are the usual reasons a careful AI policy disappears.
9. What Sitelemetry checks for AI crawler access
Two Sitelemetry findings relate to this topic, in two different audits.
seo.robots.ai-crawlers-blocked comes from the technical SEO audit. The audit fetches your robots.txt and, following RFC 9309, evaluates its rules for the URL you enter against known AI tokens, grouped the way vendors document them: search and answer crawlers, training or data-use tokens, and user-requested fetchers.
- Only AI search and answer crawlers can produce this finding, at low severity. It lists the blocked tokens as evidence. A token blocked through its own group appears by name; a token blocked only because it inherits a
User-agent: *block appears asTOKEN (User-agent: *). - If robots.txt blocks the audited page for Googlebot (through a Googlebot group or the
User-agent: *group), a separate high-severity finding,seo.robots.primary-blocked, reports that block, and wildcard-inherited AI blocks are not repeated in this finding. - Blocked training tokens produce an informational note (
seo.robots.ai-training-opt-out), blocked user-requested fetchers another (seo.robots.ai-user-fetchers-blocked), and renamed or legacy tokens are also reported as information (seo.robots.ai-legacy-tokens). These do not cost points, because opting out of training is a legitimate choice. These notes appear only when robots.txt names the token in its own group; a block inherited fromUser-agent: *does not trigger them. - If robots.txt cannot be read because the server answers with a 5xx or 429 error, or the connection fails while the page itself loads, the audit reports
seo.robots.unreachable(medium) instead and does not judge the AI rules.
ai.traffic.crawler-access comes from the AI visibility audit, in its AI Traffic module, as the item "AI crawler access and source map". It produces a 0 to 100 score, shown as the "AI Crawl" metric, with a status derived from that score and the evidence observed. Its score combines an indexability score (the share of read pages that load, carry no noindex and are not blocked by robots.txt, plus sitemap, the primary robots.txt verdict and canonical tags) with a sitemap, an llms.txt file and the share of pages that answered in under 1.2 seconds. Blocked AI search crawlers then lower the score by up to half, in proportion to how many of the seven checked AI search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot, MistralAI-Index, Amzn-SearchBot, meta-webindexer, DuckAssistBot) are blocked; training tokens and user-requested fetchers do not change it. The evidence reads "Index n/100, sitemap yes/no, llms.txt yes/no, fast pages n/N, AI search crawlers allowed n/7". A score of 75 or more passes; 45 to 74 is a low-severity finding and below 45 a medium one. The recommendation is to align robots.txt, sitemap, canonical tags and internal links with your most important landing pages.
Both audits read the HTML and text files your server delivers and do not run JavaScript. They run on any public URL without ownership verification and read up to 5 pages on Starter ($49/month), 15 on Professional ($149/month) and 30 on Enterprise ($249/month); see pricing. They are not included in the Free plan. A Free account can run them with audit credits: one credit runs one audit in one area at Professional depth, a new Free account starts with one welcome credit per area, and credits work in the web app and through the MCP connection. The free Launch Readiness Snapshot runs 8 passive checks (DNS, email DNS, domain registration, TLS, security headers, HTTPS posture, technology fingerprint and delivery) without signup and does not read robots.txt. No audit can see your server logs or confirm what any AI vendor does with your content; the technical SEO audit guide explains the rest of the crawl checks.
Common questions
How do I block GPTBot in robots.txt?
Add a group with User-agent: GPTBot followed by Disallow: / to the robots.txt at the root of each host. That opts out of OpenAI training without affecting OAI-SearchBot, which OpenAI uses for ChatGPT search. If you only want to block part of the site, list those paths and repeat any general rules, because GPTBot ignores the User-agent: * group once it has its own group.
Does blocking Google-Extended remove my site from Google Search or AI Overviews?
No. Google documents that Google-Extended does not affect inclusion or ranking in Google Search. It controls whether content may be used for Gemini training and grounding. AI Overviews are part of Search and rely on Googlebot. To limit what Search features show, use snippet controls such as nosnippet, max-snippet or data-nosnippet; to leave AI Overviews and AI Mode entirely, use the Search generative AI control in Search Console.
Should I block AI search crawlers like PerplexityBot or OAI-SearchBot?
Only if you do not want your pages shown or linked as sources in those assistants. These crawlers build the index the assistant searches when it answers, so blocking them usually reduces visibility there. Many sites allow search crawlers and make a separate decision about training tokens such as GPTBot, ClaudeBot and Google-Extended.
Will blocking AI crawlers now remove content they already collected?
No. robots.txt only asks crawlers not to fetch paths from now on. It does not delete data collected earlier or copies of your text on other sites. Check each vendor's documentation for any separate removal or opt-out process.
Why do I still see AI bots in my logs after blocking them?
Crawlers that follow the standard may use a cached robots.txt for up to about a day, and they still request robots.txt itself. User-requested fetchers may be treated differently from automatic crawlers. Requests can also come from impostors using a vendor's user-agent string, so compare the source IPs with the ranges vendors publish and use firewall rules for anything that ignores your file.
Sources & further reading
- RFC 9309: Robots Exclusion Protocolwww.rfc-editor.org
- Google Search Central: How Google interprets the robots.txt specificationdevelopers.google.com
- Google Search Central: Google's common crawlers (including Google-Extended)developers.google.com
- Google Search Central: Robots meta tag, data-nosnippet and X-Robots-Tagdevelopers.google.com
- OpenAI: Overview of OpenAI crawlersdevelopers.openai.com
- Anthropic: Does Anthropic crawl data from the web, and how can site owners block the crawler?support.claude.com
- Perplexity: Perplexity crawlersdocs.perplexity.ai
- Apple: About Applebotsupport.apple.com
- Search Console Help: Search generative AI controlsupport.google.com
Prepared by the Sitelemetry editorial team. Explore the linked sources for further detail.



