# Robots.txt generator

> Build a robots.txt in seconds: allow everything, block AI training crawlers but keep AI search, or close a staging site. Copy or download the file.

Canonical: https://scaplet.com/tools/robots-txt-generator

FREE TOOLRobots.txt generator

Start from a preset, switch crawlers on or off and add your sitemap. Copy or download the file.

Roles from operator docs Live preview Checked with the tester

Short answer

To opt out of AI training but stay in AI search, disallow the training tokens, such as GPTBot, ClaudeBot and Google-Extended, and leave search crawlers such as OAI-SearchBot, Claude-SearchBot and PerplexityBot allowed. Each crawler follows only the group that names it, so one file can do both.

1 · Start from
Allow all Every crawler, every page Block AI training Keep search, AI search and user fetches Block everything For a staging site Custom Pick each crawler

2 · Crawlers

Switch off to block a crawler from the whole site.

AI training and products [GPTBot](/ai-crawlers/gptbot) OpenAI Crawls content that may be used to train OpenAI's generative AI foundation models. [ClaudeBot](/ai-crawlers/claudebot) Anthropic Collects web content that could potentially contribute to training Anthropic's generative AI models. [Google-Extended](/ai-crawlers/google-extended) Google A standalone robots.txt product token publishers use to manage whether content Google crawls may be used to train future Gemini models and for grounding in Gemini Apps and Grounding with Google Search on Vertex AI. [Applebot-Extended](/ai-crawlers/applebot-extended) Apple A secondary robots.txt token that lets publishers opt out of their content being used to train Apple's general purpose foundation models. [Meta-ExternalAgent](/ai-crawlers/meta-externalagent) Meta Crawls the web for use cases such as training foundation AI models or improving products by indexing content directly. [Amazonbot](/ai-crawlers/amazonbot) Amazon Used to improve Amazon products and services; Amazon says it may be used to train Amazon AI models. [CCBot](/ai-crawlers/ccbot) Common Crawl Crawler for Common Crawl, a non-profit that provides an open copy of the web for research and analysis.

AI search [OAI-SearchBot](/ai-crawlers/oai-searchbot) OpenAI Surfaces websites in search results in ChatGPT's search features. [Claude-SearchBot](/ai-crawlers/claude-searchbot) Anthropic Navigates the web to improve the relevance and accuracy of Claude's search results. [PerplexityBot](/ai-crawlers/perplexitybot) Perplexity Designed to surface and link websites in Perplexity search results; Perplexity says it is not used to crawl content for AI foundation models.

AI user fetchers [ChatGPT-User](/ai-crawlers/chatgpt-user) OpenAI Visits web pages for certain user actions in ChatGPT and Custom GPTs, including GPT Actions. [Claude-User](/ai-crawlers/claude-user) Anthropic Accesses websites when individuals ask Claude questions. [Perplexity-User](/ai-crawlers/perplexity-user) Perplexity Visits a page to help answer a user's question in Perplexity and link the page; not used for web crawling or to collect training content.

Search engines [Googlebot](/ai-crawlers/googlebot) Google Google Search's crawler, used as Googlebot Smartphone and Googlebot Desktop; its crawl preferences also affect Google Images, Video, News and Discover. [Bingbot](/ai-crawlers/bingbot) Microsoft Bing's web crawler. [Applebot](/ai-crawlers/applebot) Apple Apple's web crawler; its data powers search in Spotlight, Siri and Safari, may provide context for AI answers, and may help train Apple foundation models.

3 · Details
Sitemap URL (optional)

Paths to keep every crawler out of (one per line) /admin/ /cart

robots.txt

```
# AI training crawlers: opted out User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: meta-externalagent User-agent: Amazonbot User-agent: CCBot Disallow: / # Everyone else User-agent: * Disallow: /admin/ Disallow: /cart Sitemap: https://example.com/sitemap.xml
```

Result on your home page
Googlebot Bingbot Applebot GPTBot OAI-SearchBot ChatGPT-User ClaudeBot Claude-SearchBot Claude-User PerplexityBot Perplexity-User Google-Extended Applebot-Extended Meta-ExternalAgent Amazonbot CCBot

Upload it to the root of your host as `/robots.txt`. Each subdomain needs its own file.

01

## How to use it

1. 01

Pick a preset

Allow all, block AI training, block everything, or start from scratch with custom.
2. 02

Switch crawlers

Turning a crawler off adds it to a group with `Disallow: /`. Changing a switch moves you to custom.
3. 03

Add your sitemap and private paths

Paths you list are disallowed for every crawler that has no group of its own.
4. 04

Upload it

Save the file as `/robots.txt` at the root of your host, then check it with the [robots.txt tester](/tools/robots-txt-tester).

02

## The presets

| Preset | What it writes | Use it when |
| Allow all | `User-agent: *` with `Allow: /` | You want every crawler everywhere. |
| Block AI training | One group of training tokens with `Disallow: /` | You want AI search and user fetches, not model training. |
| Block everything | `User-agent: *` with `Disallow: /` | A staging or preview site. |
| Custom | Your switches and paths | Anything else. |

03

## Crawlers by job

Each role comes from the operator's own documentation. Blocking a training crawler opts you out of future training; blocking a search crawler can keep you out of that service's answers.

| Crawler | Job | What the operator says it does |
| [GPTBot](/ai-crawlers/gptbot) | AI training | Crawls content that may be used to train OpenAI's generative AI foundation models. |
| [ClaudeBot](/ai-crawlers/claudebot) | AI training | Collects web content that could potentially contribute to training Anthropic's generative AI models. |
| [Google-Extended](/ai-crawlers/google-extended) | AI training | A standalone robots.txt product token publishers use to manage whether content Google crawls may be used to train future Gemini models and for grounding in Gemini Apps and Grounding with Google Search on Vertex AI. |
| [Applebot-Extended](/ai-crawlers/applebot-extended) | AI training | A secondary robots.txt token that lets publishers opt out of their content being used to train Apple's general purpose foundation models. |
| [Meta-ExternalAgent](/ai-crawlers/meta-externalagent) | AI training | Crawls the web for use cases such as training foundation AI models or improving products by indexing content directly. |
| [Amazonbot](/ai-crawlers/amazonbot) | AI training | Used to improve Amazon products and services; Amazon says it may be used to train Amazon AI models. |
| [CCBot](/ai-crawlers/ccbot) | AI training | Crawler for Common Crawl, a non-profit that provides an open copy of the web for research and analysis. |
| [OAI-SearchBot](/ai-crawlers/oai-searchbot) | AI search | Surfaces websites in search results in ChatGPT's search features. |
| [Claude-SearchBot](/ai-crawlers/claude-searchbot) | AI search | Navigates the web to improve the relevance and accuracy of Claude's search results. |
| [PerplexityBot](/ai-crawlers/perplexitybot) | AI search | Designed to surface and link websites in Perplexity search results; Perplexity says it is not used to crawl content for AI foundation models. |
| [ChatGPT-User](/ai-crawlers/chatgpt-user) | User fetch | Visits web pages for certain user actions in ChatGPT and Custom GPTs, including GPT Actions. |
| [Claude-User](/ai-crawlers/claude-user) | User fetch | Accesses websites when individuals ask Claude questions. |
| [Perplexity-User](/ai-crawlers/perplexity-user) | User fetch | Visits a page to help answer a user's question in Perplexity and link the page; not used for web crawling or to collect training content. |
| [Googlebot](/ai-crawlers/googlebot) | Search | Google Search's crawler, used as Googlebot Smartphone and Googlebot Desktop; its crawl preferences also affect Google Images, Video, News and Discover. |
| [Bingbot](/ai-crawlers/bingbot) | Search | Bing's web crawler. |
| [Applebot](/ai-crawlers/applebot) | Search | Apple's web crawler; its data powers search in Spotlight, Siri and Safari, may provide context for AI answers, and may help train Apple foundation models. |

CCBot (Common Crawl) builds an open web dataset that others reuse, so the training preset includes it.

04

## Common mistakes

before `User-agent: Applebot Disallow: /` Applebot powers search in Spotlight, Siri and Safari.

after `User-agent: Applebot-Extended Disallow: /` Apple says Applebot-Extended "does not crawl webpages"; it only controls training use.

before `User-agent: OAI-SearchBot Allow: / User-agent: * Disallow: /admin/` A crawler with its own group ignores the `*` group, so `/admin/` is open to it.

after `User-agent: OAI-SearchBot Disallow: /admin/` Repeat private paths in every named group.

before `User-agent: * Disallow: / (on production)` Every crawler is shut out, search engines included.

after `User-agent: * Allow: /` Block whole sites on staging only.

Questions

## What people ask next

Where does robots.txt go?

At the top-level directory of the host, as `/robots.txt`. Google says crawlers "don't check for robots.txt files in subdirectories," and a file on a subdomain is only valid for that subdomain.

Will blocking GPTBot keep me out of ChatGPT search?

No, they are separate. OpenAI says disallowing GPTBot "indicates a site's content should not be used in training generative AI foundation models." ChatGPT search uses OAI-SearchBot: "Sites that are opted out of OAI-SearchBot will not be shown in ChatGPT search answers, though can still appear as navigational links."

Is there one line that blocks every AI crawler?

No. Each crawler looks for a group that names its own product token, and falls back to `*` only if none does. List each token you want to block.

Can I keep a staging site out of Google with robots.txt?

Not reliably. Google says it may still index a disallowed URL and show it without a snippet. Put staging behind a login, or use [noindex](/glossary/x-robots-tag) on pages crawlers can fetch.

Sources

## Every rule, linked and dated

1. [How Google interprets the robots.txt specification](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt) developers.google.com checked 25 Oct 2026
2. [RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309.html) rfc-editor.org checked 25 Oct 2026
3. [Overview of OpenAI crawlers](https://developers.openai.com/api/docs/bots) developers.openai.com checked 25 Oct 2026
4. [Does Anthropic crawl data from the web, and how can site owners block the crawler?](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler) support.claude.com checked 25 Oct 2026
5. [Perplexity crawlers](https://docs.perplexity.ai/docs/resources/perplexity-crawlers) docs.perplexity.ai checked 25 Oct 2026
6. [About Applebot](https://support.apple.com/en-us/119829) support.apple.com checked 25 Oct 2026

Keep going

## Learn. Compare. _Do._

[Learn Block AI training, keep AI search Read](/ai-search/block-ai-training-keep-ai-search) [Compare AI crawler directory Browse](/ai-crawlers) [Do Test your live robots.txt Open the tester](/tools/robots-txt-tester)

More free tools
[Robots.txt generator](/tools/robots-txt-generator) [AI agent readiness checker](/tools/ai-agent-readiness-checker) [Robots.txt tester](/tools/robots-txt-tester) [llms.txt generator](/tools/llms-txt-generator) [All free tools](/tools)

From the library
[Block AI training, keep AI search](/ai-search/block-ai-training-keep-ai-search) [AI crawler directory](/ai-crawlers) [robots.txt, explained](/glossary/robots-txt) [Blocked by robots.txt](/seo-issues/blocked-by-robots-txt)

## Wrote the file? Check what crawlers see.

The free audit reads your live robots.txt and checks AI visibility in ChatGPT, Perplexity, Gemini and Google AI Overviews.

[Audit my site free](/site-audit)
Free, no card 60 seconds Nobody will call you

46 fixes shipped without a ticketA data platform

0→7 ChatGPT citations in six weeksA payments API
