robots.txt
robots.txt for AI bots: copy-paste templates (allow AI search, block AI training)
Copy-paste robots.txt templates that allow AI search crawlers and block training tokens. Googlebot stays allowed.
Check the file, then the live response (free, no account). The robots.txt tester takes one URL and one user-agent you type. It fetches /robots.txt with this Googlebot user-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html). It then applies the matching group to the token in the user-agent you entered. It says allowed or blocked, quotes the matching line, and shows the file. It does not fetch the page.
The free check fetches the page as a normal browser, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36. It live-fetches that same page as only these three crawlers:
- Googlebot:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) - GPTBot:
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.2; +https://openai.com/gptbot - ClaudeBot:
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ClaudeBot/1.0; +https://claude.com/bot
It fetches robots.txt with that same Googlebot user-agent. It judges the file for every crawler in the report: Googlebot, Bingbot, Google-Extended, GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Perplexity-User, Applebot-Extended, CCBot, Bytespider, Amazonbot, and Meta-ExternalAgent. The live column is filled only for Googlebot, GPTBot, and ClaudeBot. Every other row says Not probed. A 401, a 403, or a 5xx on the Googlebot, GPTBot or ClaudeBot fetch is marked blocked; on the normal-browser fetch it is reported as an HTTP error. It does not live-fetch as OAI-SearchBot, PerplexityBot, Claude-SearchBot, Claude-User, ChatGPT-User, Perplexity-User, Google-Extended, Applebot-Extended, or CCBot. It does not request indexing.
OpenAI's crawler page shows a GPTBot example that includes GPTBot/1.4 and says the version number may change. The free check sends the GPTBot/1.2 string above.
The short answer
AI companies publish separate robots.txt names for search and for training. Allow the search names. Disallow the training names.
Blocking GPTBot leaves ChatGPT search on OAI-SearchBot. Blocking ClaudeBot leaves Claude search on Claude-SearchBot. Blocking Google-Extended leaves Google Search on Googlebot. Each of those splits is what that operator's own page says.
Which name does what
The cells below follow the operator pages linked in Sources. OpenAI's crawler overview, Perplexity's crawlers, Anthropic's crawler article, Google's common crawlers, Apple's Applebot page, and Common Crawl's CCBot page.
| User agent | Company | What the operator says | If you block it |
|---|---|---|---|
| OAI-SearchBot | OpenAI | Surfaces sites in ChatGPT search. OpenAI says each robots.txt setting is independent | The site will not be shown in ChatGPT search answers. OpenAI says it can still appear as a navigational link |
| ChatGPT-User | OpenAI | Visits a page for a user action in ChatGPT. OpenAI says it is not used to decide Search inclusion | OpenAI says robots.txt rules may not apply. Use OAI-SearchBot for Search opt-outs |
| PerplexityBot | Perplexity | Surfaces and links sites in Perplexity search. Perplexity says it is not used to crawl content for AI foundation models | Perplexity says each setting works independently, and recommends allowing this bot so the site can appear in search results |
| Perplexity-User | Perplexity | Fetches a page for a user question. Perplexity says it is not used for crawling or for training | Perplexity says this fetcher generally ignores robots.txt |
| Claude-SearchBot | Anthropic | Improves the quality of Claude search results | Anthropic says this may reduce the site's visibility and accuracy in search results |
| Claude-User | Anthropic | Fetches a page when a person asks Claude | Anthropic says this may reduce visibility for user-directed web search |
| GPTBot | OpenAI | Crawls content that may be used to train OpenAI's generative AI models | OpenAI says this indicates the content should not be used for that training |
| ClaudeBot | Anthropic | Collects web content that could contribute to training | Anthropic says this signals that future material should be excluded from training datasets |
| Google-Extended | A robots.txt token for Gemini training and for grounding in Gemini Apps and Vertex AI. Google says it has no separate HTTP user-agent | Google says this does not change inclusion in Google Search and is not a ranking signal | |
| Applebot-Extended | Apple | Does not crawl. Controls use of data Applebot already crawled, for Apple's generative models | Apple says the pages can still be included in search results |
| CCBot | Common Crawl | Crawls for Common Crawl's open repository of web crawl data. Common Crawl identifies it as CCBot/2.0 (https://commoncrawl.org/faq/) | Common Crawl says a Disallow stops CCBot from crawling the site. Their page does not describe that crawl as model training |
More on one bot at a time: OAI-SearchBot vs GPTBot, how to allow or block GPTBot, how to allow or block ClaudeBot, how to allow or block PerplexityBot, Google-Extended explained, and the ClaudeBot crawler page.
The rule that makes a named group replace `*`
A robots.txt file is a list of groups. A group starts with one or more User-agent lines and then its Allow and Disallow lines. Google's robots.txt documentation says a crawler uses the group with the most specific user-agent that matches it, and ignores the other groups. A group that names the bot is not combined with the User-agent: * group. RFC 9309 says the same thing in standards language: groups that match the product token are the ones that apply, and * is used only when no group names that bot. A matching group with no rules allows the URL.
So a copied User-agent: GPTBot line with nothing under it allows GPTBot on every path, including paths the * group disallows. The named group replaced *. See robots.txt explained.
This file is the mistake. Do not ship it:
Example
User-agent: * Disallow: /private User-agent: GPTBot Sitemap: https://example.com/sitemap.xml
GPTBot is allowed on /private because its group matches and has no rule. Googlebot still uses * and is disallowed there.
Google also says lines other than user-agent, allow, and disallow are ignored when the file is split into groups. A Sitemap line between two User-agent lines does not split them, so those two bots can end up sharing one set of rules. Put each bot's Allow or Disallow directly under its name, and put Sitemap at the end.
Every template below keeps a User-agent: * group and a Sitemap line. The sitemap URL is a placeholder. Replace https://example.com/sitemap.xml with your own sitemap. A path rule is a prefix: Google's docs say Disallow: /fish/ matches /fish/ and /fish/salmon.html, and does not match /fish or /fish.html. The same prefix match is what the robots.txt tester applies.
Template A. Allow AI search, block training
This is the usual choice for a small business that wants to be eligible for AI answers and wants to opt out of the training controls the operators document.
User-agent: * with Allow: / leaves Googlebot allowed, because this file has no Googlebot group. Apple says Applebot follows a Googlebot group when the file names Googlebot and does not name Applebot. This template does not add a Googlebot group, so Applebot uses *.
CCBot is in the block list because Common Crawl's page says Disallow: / under User-agent: CCBot stops that crawl. Common Crawl describes an open web-crawl repository. It does not say the crawl is for model training.
ChatGPT-User and Perplexity-User are left to the * group, which allows them. OpenAI says robots.txt rules may not apply to ChatGPT-User. Perplexity says Perplexity-User generally ignores robots.txt.
Example
User-agent: * Allow: / User-agent: OAI-SearchBot Allow: / User-agent: PerplexityBot Allow: / User-agent: Claude-SearchBot Allow: / User-agent: Claude-User Allow: / User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: Google-Extended Disallow: / User-agent: Applebot-Extended Disallow: / User-agent: CCBot Disallow: / Sitemap: https://example.com/sitemap.xml
Template B. Allow everything
If you are not adding AI rules, a normal file looks like this. Every bot uses the * group, so every path is allowed. You still keep the sitemap line.
Example
User-agent: * Allow: / Sitemap: https://example.com/sitemap.xml
Template C. Block AI search as well
Use this only when you want out of AI answers too. Read the table before you paste it.
OpenAI says a site opted out of OAI-SearchBot will not be shown in ChatGPT search answers, and can still appear as a navigational link. Perplexity recommends allowing PerplexityBot so the site can appear in search results. Anthropic says disabling Claude-SearchBot may reduce visibility and accuracy in search results, and disabling Claude-User may reduce visibility for user-directed web search.
The ChatGPT-User and Perplexity-User lines are requests. OpenAI says robots.txt rules may not apply to ChatGPT-User. Perplexity says Perplexity-User generally ignores robots.txt. Googlebot stays on Allow: /.
Example
User-agent: * Allow: / User-agent: OAI-SearchBot Disallow: / User-agent: PerplexityBot Disallow: / User-agent: Claude-SearchBot Disallow: / User-agent: Claude-User Disallow: / User-agent: ChatGPT-User Disallow: / User-agent: Perplexity-User Disallow: / User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: Google-Extended Disallow: / User-agent: Applebot-Extended Disallow: / User-agent: CCBot Disallow: / Sitemap: https://example.com/sitemap.xml
Template D. Block training on one folder
This disallows the training tokens, Google-Extended, Applebot-Extended, and CCBot on /blog/ only. A named group does not inherit the * rules, so those bots are allowed on every other path, including a path * might disallow in a different file. /blog/ matches /blog/post. It does not match /blog or /blogger.
Search bots stay allowed on /blog/. Googlebot uses * and stays allowed.
Example
User-agent: * Allow: / User-agent: OAI-SearchBot Allow: / User-agent: PerplexityBot Allow: / User-agent: Claude-SearchBot Allow: / User-agent: Claude-User Allow: / User-agent: GPTBot Disallow: /blog/ User-agent: ClaudeBot Disallow: /blog/ User-agent: Google-Extended Disallow: /blog/ User-agent: Applebot-Extended Disallow: /blog/ User-agent: CCBot Disallow: /blog/ Sitemap: https://example.com/sitemap.xml
Caveats in plain English
robots.txt is a request. Cloudflare's AI Crawler and Agent access policies can still block a request the file allows. Cloudflare says the Block action blocks matching requests across the zone, and that robots.txt directives are voluntary. When Bot Preference Sync is on, Cloudflare says a Training Disallow also blocks AI training crawlers at the edge, and that mixed-purpose crawlers used for both Search and Training are excluded from that edge block. Check the live response. See Cloudflare blocking AI crawlers.
OpenAI says a robots.txt change for search can take about 24 hours to be picked up. Perplexity says a change can take up to 24 hours.
OpenAI says that if a site allows both OAI-SearchBot and GPTBot, OpenAI may use one crawl for both search and training. Template A disallows GPTBot, so that sentence is about the case where both are allowed.
Google's common crawlers page still includes this note, dated on the page as last updated 2026-10-30 UTC: Google intends to support the AIPREF shared machine-readable training preference signal, with user-agent: __usage_ai-training, in early 2027. That note describes a future signal. Google-Extended is the control Google documents today.
Anthropic's article says that as of October 30, 2026, Anthropic has begun recognizing a machine-readable preference for AI training, based on the IETF aipref draft. Anthropic says a robots.txt rule that names ClaudeBot is followed even when that general setting says something else. If the file does not mention ClaudeBot, Anthropic says it follows the general setting. The article does not print the signal's syntax.
Google says Google-Extended has no separate HTTP user-agent. The crawl uses existing Google user-agents, and the token only controls later use. Apple says Applebot-Extended does not crawl, and is only used to decide how Applebot's data may be used.
How to check that it worked
- Paste the URL and one token, such as
GPTBotorOAI-SearchBot, into the robots.txt tester. The tester fetches robots.txt asMozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html). It does not fetch the page as the bot you typed. Run it once per token you care about. A known token inside a longer user-agent string is what the tester matches.Google-Extendedis matched on its own, and aGooglebotstring does not select the Google-Extended group. - Paste the same URL into the free check. The live fetches are the browser user-agent and the three crawler user-agents listed at the top of this guide. OAI-SearchBot, PerplexityBot, Claude-SearchBot, Google-Extended, Applebot-Extended, and CCBot are judged from robots.txt on that report, and the live column says Not probed.
Prompt for Lovable, v0, Bolt, or Cursor
Paste this to add Template A without deleting rules that are already in the file:
Example
Add these robots.txt rules without deleting existing User-agent groups, Allow lines, Disallow lines, or the Sitemap line. If the file is public/robots.txt, merge these groups into that file. If the site uses a Next.js app/robots.ts file, add these userAgent rules beside the existing rules and keep the sitemap field. Keep a User-agent: * group. Put Allow or Disallow directly under every named User-agent. A named group replaces the * group for that bot, and a named group with no rules allows every path. Leave Googlebot allowed. Do not add a Disallow for Googlebot. User-agent: * Allow: / User-agent: OAI-SearchBot Allow: / User-agent: PerplexityBot Allow: / User-agent: Claude-SearchBot Allow: / User-agent: Claude-User Allow: / User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: Google-Extended Disallow: / User-agent: Applebot-Extended Disallow: / User-agent: CCBot Disallow: / Sitemap: https://example.com/sitemap.xml Replace the Sitemap URL with this site's real sitemap URL. Do not call an indexing API.
FAQ
If I block GPTBot, does ChatGPT search stop using my site?
OpenAI says the settings are independent. Disallowing GPTBot is the training signal. OAI-SearchBot is the token for ChatGPT search. A site opted out of OAI-SearchBot will not be shown in ChatGPT search answers, and OpenAI says it can still appear as a navigational link.
Does blocking Google-Extended remove the site from Google Search?
Google says Google-Extended does not impact inclusion in Google Search and is not a ranking signal. Googlebot is the Search crawler. Template A allows Googlebot through the * group.
Which user-agents does the free check fetch the page as?
A normal browser, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36, plus Googlebot Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html), GPTBot Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.2; +https://openai.com/gptbot, and ClaudeBot Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ClaudeBot/1.0; +https://claude.com/bot. robots.txt is fetched with that Googlebot string. It does not live-fetch as OAI-SearchBot, PerplexityBot, Claude-SearchBot, Google-Extended, Applebot-Extended, or CCBot.
Sources
- OpenAI crawler overview: https://developers.openai.com/api/docs/bots
- Perplexity crawlers: https://docs.perplexity.ai/guides/bots
- Anthropic, does Anthropic crawl data from the web: https://support.anthropic.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler
- Google common crawlers, including Google-Extended: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers
- About Applebot, including Applebot-Extended: https://support.apple.com/en-us/119829
- Common Crawl, CCBot: https://commoncrawl.org/ccbot
- How Google interprets robots.txt: https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt
- RFC 9309, Robots Exclusion Protocol: https://www.rfc-editor.org/rfc/rfc9309
- Cloudflare AI Crawler and Agent access policies: https://developers.cloudflare.com/bots/additional-configurations/block-ai-bots/