# robots.txt generator

Updated 2026-11-23

Write a robots.txt file that allows or blocks each AI crawler, with presets by kind, private paths and a sitemap line. Live preview, copy or download.

The interactive tool runs in the browser at /tools/robots-txt-generator.

## How do you block AI crawlers with this generator?

Choose allow or block for each AI crawler, add any private paths and your sitemap, and the tool writes a valid robots.txt file as you go. Copy it or download it, then upload it to the root of your site as `/robots.txt`. Once it is live, the [AI crawler checker](/tools/ai-crawler-checker) reads it back and shows what each crawler is allowed.

The crawler list comes from the [crawler directory](/bots), where each entry links the operator's documentation or says when none could be found, so the names are the product tokens the crawlers send: 19 AI crawlers in three kinds. The presets set a whole kind at once: block only the crawlers that collect training data, block every AI crawler, or allow them all. "Everyone else" is the rule for search engines and any crawler not on the list.

## Which AI crawlers can you block, and what does it change?

| Kind | On the list | What blocking changes |
| --- | --- | --- |
| AI training crawlers | [Amazonbot](/bots/amazonbot), [Applebot-Extended](/bots/applebot-extended), [Bytespider](/bots/bytespider), [CCBot](/bots/ccbot), [ClaudeBot](/bots/claudebot), [cohere-ai](/bots/cohere-ai), [Google-Extended](/bots/google-extended), [GPTBot](/bots/gptbot), [meta-externalagent](/bots/meta-externalagent) | Your pages stop being collected to train models. Where the operator runs a separate search crawler, search is not affected. |
| AI search crawlers | [Claude-SearchBot](/bots/claude-searchbot), [DuckAssistBot](/bots/duckassistbot), [OAI-SearchBot](/bots/oai-searchbot), [PerplexityBot](/bots/perplexitybot), [YouBot](/bots/youbot) | The assistant's search index stops reading your pages, so they are less likely to be shown or linked in its answers. |
| AI user agents | [ChatGPT-User](/bots/chatgpt-user), [Claude-User](/bots/claude-user), [meta-externalfetcher](/bots/meta-externalfetcher), [MistralAI-User](/bots/mistralai-user), [Perplexity-User](/bots/perplexity-user) | The assistant may stop opening your pages when a person asks it to, but only where the operator applies robots.txt to these fetches. Not every one says it does. |

Operators split the jobs differently, so read the kind before you block. OpenAI treats [GPTBot](/bots/gptbot), its training crawler, and [OAI-SearchBot](/bots/oai-searchbot), its search crawler, as independent settings: blocking training does not take you out of ChatGPT search. [Google-Extended](/bots/google-extended) is a robots.txt token with no crawler behind it; it opts content out of Gemini training and grounding and leaves Google Search alone.

Not every crawler promises to obey the file. Of the 19, the operators of [Bytespider](/bots/bytespider), [ChatGPT-User](/bots/chatgpt-user), [cohere-ai](/bots/cohere-ai), [meta-externalfetcher](/bots/meta-externalfetcher), [Perplexity-User](/bots/perplexity-user), [YouBot](/bots/youbot) say it is not always followed, or say nothing we could verify. The tool marks them next to their name.

## What does each line in robots.txt mean?

| Line | What it does | Example |
| --- | --- | --- |
| `User-agent:` | Starts a group and names the crawler it applies to. Matching ignores case. | `User-agent: GPTBot` |
| `Disallow:` | A path the crawler should not fetch. `/` is the whole site. | `Disallow: /admin/` |
| `Allow:` | A path it may fetch, to open part of a disallowed folder. | `Allow: /admin/help/` |
| `Sitemap:` | The full address of a sitemap. Belongs to no group. | `Sitemap: https://example.com/sitemap.xml` |
| `#` | A comment. Crawlers ignore it. | `# Blocked` |

Paths are case-sensitive and match from the start. `*` stands for any run of characters and `$` marks the end, so `/*.pdf$` covers every PDF. These rules are from [RFC 9309](https://www.rfc-editor.org/rfc/rfc9309.html), the Robots Exclusion Protocol standard published in September 2022. The Sitemap line is not part of it; Google reads it and [documents it](https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt) as a full URL that can appear more than once.

## A worked example

1. Everyone else: Allow
2. Preset: Block AI training
3. Private paths: `/admin/`
4. Sitemap: `https://example.com/sitemap.xml`

```txt
# Everyone else
User-agent: *
Disallow: /admin/

# Blocked
User-agent: Amazonbot
User-agent: Applebot-Extended
User-agent: Bytespider
User-agent: CCBot
User-agent: ClaudeBot
User-agent: cohere-ai
User-agent: Google-Extended
User-agent: GPTBot
User-agent: meta-externalagent
Disallow: /

Sitemap: https://example.com/sitemap.xml
```

Every training crawler shares one group that ends in `Disallow: /`. The search crawlers and user fetches are not named, so they follow the `*` group: the whole site except `/admin/`. Nothing is written for a crawler whose rule matches everyone else's, which keeps the file short.

Now set everyone else to Block and allow only the AI search crawlers. The generator writes `Disallow: /` for `*`, then a group for the search crawlers with `Allow: /` and `Disallow: /admin/` repeated inside it. The repeat matters: a crawler obeys the group that names it and ignores the `*` group, so without it the allowed crawlers would read `/admin/`.

## How do you read the result?

- **The most specific rule wins.** When an Allow and a Disallow both match a URL, the longer path decides. If the two are equivalent, RFC 9309 says Allow should win.
- **A named crawler ignores the `*` group.** Rules are not inherited, which is why the tool repeats private paths in allowed groups.
- **It is a request, not a lock.** RFC 9309 says the rules are not access authorization, and every path you list becomes public knowledge. Put private pages behind a login.
- **Blocking crawling is not removal.** Google can still list a disallowed URL, without a snippet, when other pages link to it.
- **Changes take time.** Crawlers may keep a cached copy for up to 24 hours, and Google reads only the first 500 KiB of the file.

## How CrispStats shows whether crawlers listen

Crawlers do not run analytics scripts, so they never show up as visitors. CrispStats reports their hits separately on the [AI traffic](/features/ai-traffic) page, from your edge or middleware, which sends only the user agent, the path and the status code, never an IP address. Hits are grouped by operator and by purpose (training, search, user fetch), so after you change robots.txt you can see whether a blocked crawler's requests stop. [AI visibility](/analytics/ai-visibility) sets those crawls next to the visitors each assistant sends, which is the trade you are making when you block one.

The honest limit: you see only what your edge forwards. A crawler that respects the block makes no further page requests, and one that ignores it shows up with the paths it took. To point the crawlers you allow at your best pages, add an llms.txt file with the [llms.txt generator](/tools/llms-txt-generator).

## Frequently asked questions

### Does blocking AI crawlers hurt my Google rankings?

Not by itself. Googlebot is not one of the AI crawlers on the list, and blocking Google-Extended opts content out of Gemini training and grounding without changing Google Search. Leave everyone else on Allow and search engines keep crawling as before.

### Does blocking GPTBot remove my site from ChatGPT?

No. OpenAI treats GPTBot, its training crawler, and OAI-SearchBot, its search crawler, as separate settings. Blocking GPTBot opts your pages out of training only, so they can still appear in ChatGPT search.

### Where does the robots.txt file go?

At the root of each host, as /robots.txt, served as plain text in UTF-8. A file on www.example.com does not cover shop.example.com; each host needs its own.

### Do AI crawlers have to obey robots.txt?

No. The file is a request. Most operators on the list say their crawlers follow it, but some say their user-triggered fetchers do not always, and a few publish no statement at all. The tool marks those.
