Robots.txt Generator
The Robots.txt Generator writes the robots.txt file that tells crawlers which paths they may fetch — with presets for the 2026 decision (allow all, block AI training but keep AI search, block all for staging), per-crawler toggles grouped by what the crawler does, a sitemap line, a pasted-file tester with rule attribution, and a download in UTF-8 with no BOM and LF endings. It leads with the honest fact: robots.txt is public and voluntary, and blocking training does not untrain a model.
How to Use
- 1
Pick a preset first: Allow all, Block AI training only (allow AI search), Block all crawlers for a staging site, or Custom. The preset is the first decision — the toggles below refine it.
- 2
Use the per-crawler toggles, grouped honestly: Training (GPTBot, ClaudeBot, CCBot), AI search (OAI-SearchBot), assistant fetchers (ChatGPT-User, Claude-Web), and search engines (Googlebot, Bingbot). The list is dated on the page — checked 2026-11-21, reviewed quarterly.
- 3
Add Disallow paths with the quick-add buttons (/admin/, /cart, /search, /wp-admin/) or type your own, and add Allow exceptions inside disallowed paths — /admin/public stays reachable while /admin/ is closed.
- 4
Add your sitemap URL as a Sitemap: line. Set a crawl-delay only if you need one — the page states plainly that crawl-delay is not in RFC 9309 and Google ignores it.
- 5
Paste an existing robots.txt into Import to edit from it: unknown directives are kept verbatim, and noindex or crawl-delay lines come back with a warning about what they actually do.
- 6
Copy the file or download it as robots.txt (UTF-8, no BOM, LF endings), upload it to your site root, then test it: load the generated file into the tester, pick a crawler, and check each URL — Allowed or Disallowed, with the exact rule that decided it.
Frequently Asked Questions
What is robots.txt?
Does robots.txt hide my pages?
How do I block GPTBot and ClaudeBot but keep Google?
What's the difference between AI training crawlers and AI search?
Why is my page still in Google after I disallowed it?
Do I need a robots.txt at all?
What is crawl-delay and does Google respect it?
Is my file uploaded anywhere?
Does blocking training crawlers untrain a model?
One file per site — what about subdomains?
Generative Answer & AI Documentation
What is the Robots.txt Generator?
The Robots.txt Generator is a form-to-file tool for the plain-text file that lives at a site's root (example.com/robots.txt) and tells crawlers which paths they may fetch, as defined by RFC 9309: User-agent lines name the crawler, Disallow lines name the paths it must not fetch, Allow lines carve out exceptions. Pick a preset first — Allow all, Block AI training only (allow AI search), Block all crawlers for a staging site, or Custom — then refine it with per-crawler toggles grouped by what the crawler does: Training (GPTBot, ClaudeBot, CCBot, Google-Extended, Applebot-Extended, Meta-ExternalAgent, Bytespider, Amazonbot, cohere-ai, PerplexityBot), AI search (OAI-SearchBot), assistant fetchers (ChatGPT-User, Claude-Web, Perplexity-User, facebookexternalhit, Twitterbot, LinkedInBot), and search engines (Googlebot, Bingbot, DuckDuckBot, Applebot, YandexBot). The crawler list is dated on the page — checked 2026-11-21, reviewed quarterly — and each toggle shows what blocking that crawler costs. Add Disallow paths with quick-add buttons (/admin/, /wp-admin/, /cart, /checkout, /search, /account/, /api/, /private/) or type your own, add Allow exceptions inside disallowed paths, add one or more Sitemap: lines, and set a crawl-delay only if you need one — the file itself carries a comment saying Google ignores it. Paste an existing robots.txt into Import to edit from it: unknown directives are kept verbatim, and noindex or crawl-delay lines come back with a warning about what they actually do. The tester takes a pasted file and a list of URLs and reports Allowed or Disallowed for a chosen crawler, with the exact rule that decided each URL, using RFC 9309 longest-match rules. The download is robots.txt in UTF-8, no BOM, LF line endings. Everything runs in the browser; nothing is uploaded.
Why use Robots.txt Generator offline?
The robots.txt decision in 2026 is not 'allow or block' — it is three different decisions at once, and most generators collapse them into one toggle. Training crawlers collect pages to train models on; AI search crawlers fetch pages to cite in AI answers; assistant fetchers fetch one page when a user asks about it; search engines decide whether the page exists in search at all. Blocking GPTBot costs nothing in search. Blocking OAI-SearchBot can remove the page from AI answers. Blocking Googlebot removes the page from Google entirely. A generator that groups crawlers by what they do makes the decision visible instead of hiding it behind a single 'block AI' switch. The second reason is the file's honesty problem: robots.txt is the most misunderstood file on the web. People write it believing it hides pages (it is public), believing it de-indexes pages (Disallow is not noindex), believing crawl-delay throttles Google (Google ignores it), and believing blocking training untrains a model (it only governs future fetches). A generator that states those limits on the page — and warns in the output when a disallowed path looks like a secret — prevents the file from doing the opposite of what its author wanted. The third reason is the tester: a robots.txt file is a program, and the longest-match rule is easy to get wrong by hand. Testing a URL against the pasted file, with the deciding rule named, turns a guess into a check.
When should you use this tool?
Use it when you launch a site and need the file for the first time: the Block AI training preset is the 2026 default most sites want — training crawlers out, AI search and normal search in. Use it when you put a staging site behind a block-all file — and remove that file at launch, or the live site vanishes from search. Use it when an AI crawler you had not heard of shows up in the logs: find its token in the list, block it, and re-download the file. Use the tester whenever you edit the file: paste it, pick the crawler, and check the URLs that matter — /admin/public should stay allowed while /admin/ is closed. Do not use it to hide a page: a Disallow lists the path in a public file, and Google may still index the URL if other pages link to it — private pages need a login, and de-indexing needs a meta robots noindex tag. Do not use it as a substitute for the sitemap: the Sitemap: line points crawlers at the sitemap, it does not replace it. The Sitemap Generator on this site builds that file from a URL list.
Key Benefits
- Presets for the real 2026 decision — allow all, block AI training only, block all for staging, custom — instead of one blunt switch.
- Per-crawler toggles grouped by what the crawler does: training vs AI search vs assistant fetchers vs search engines, with the cost of blocking each one stated.
- Dated crawler list (checked 2026-11-21, reviewed quarterly) — the list is a fact with a date, not a guess.
- Pasted-file tester with rule attribution: Allowed or Disallowed per URL, with the exact rule that decided it (RFC 9309 longest match).
- Import an existing file and edit from it — unknown directives kept verbatim, noindex and crawl-delay flagged honestly.
- Clean download: robots.txt in UTF-8, no BOM, LF line endings — plus validation warnings in the output.
Common Use Cases
- A blog that wants AI search traffic but not model training: the Block AI training preset — GPTBot, ClaudeBot and CCBot disallowed, OAI-SearchBot and Googlebot allowed.
- A staging site: the Block all preset — Disallow: / for every crawler — removed at launch.
- A shop: quick-add /cart, /checkout and /search to Disallow, so crawlers stop indexing cart and search-result pages, with /admin/public allowed as an exception.
- A site audit: paste the live robots.txt into Import, see the noindex warning (dead since September 2019), and replace it with a meta robots tag.
- A dispute with a crawler: paste the file into the tester, pick the crawler's token, and prove which rule allowed or blocked a URL.
Developer Notes & Best Practices
The file is built by one function from a settings object: one User-agent group per rule, Allow lines before Disallow lines inside each group (a group with neither emits a bare Disallow: — the RFC 9309 way of saying 'everything allowed'), then the crawl-delay block with its non-standard comment, then Sitemap: lines, then any unknown directives kept verbatim from an import. Output is LF line endings with exactly one trailing newline, no BOM. The tester parses the pasted file with the same parser as Import, then evaluates each URL with RFC 9309 longest-match: among all rules for the chosen user-agent plus the * group, the longest matching pattern wins, and Allow beats Disallow at equal length; no matching rule means allowed. Patterns support * (any sequence) and a trailing $ (end of path). The parser keeps unknown directives in extraLines so an import round-trips without silently dropping a line, and it warns — rather than errors — on noindex (Google dropped support in September 2019) and crawl-delay (not in RFC 9309). Validation runs on the generated text: it warns on a block-all file (staging only), on a non-absolute sitemap URL, on a blocked Googlebot, on a disallowed path that looks like a secret directory, and on a missing Sitemap: line. The tester cannot fetch a live file from a URL: browsers block cross-origin reads of other sites' robots.txt, so v1 tests pasted text only and says so.
The crawler groups — what blocking each one costs
| Group | Examples | What blocking it costs |
|---|---|---|
| Training | GPTBot, ClaudeBot, CCBot | Pages stop feeding future model training |
| AI search | OAI-SearchBot | Pages stop appearing in AI answers |
| Assistant fetchers | ChatGPT-User, Claude-Web | Assistants can no longer fetch your pages on request |
| Search engines | Googlebot, Bingbot | Pages leave search entirely |
What robots.txt can and cannot do
| Belief | Reality |
|---|---|
| It hides my pages | No — the file is public; it lists the paths you want hidden |
| Disallow removes a URL from Google | No — Disallow is not noindex; use a meta robots tag |
| Crawl-delay throttles Google | No — not in RFC 9309; Google ignores it |
| Blocking training untrains a model | No — it only governs future fetches |
| noindex in robots.txt works | No — Google dropped it in September 2019 |
- Start from the preset, then refine: the Block AI training preset is the right default for most live sites.
- Keep the file short and readable: one group per crawler, comments only where a future reader needs the reason.
- Declare the sitemap: a Sitemap: line is the cheapest way to make sure every page is found.
- Test after every edit: paste the file into the tester and check the URLs that matter, especially Allow exceptions inside Disallow paths.
- One file per host: blog.example.com needs its own robots.txt at its own root.
- Never put a secret path in Disallow: the file is public, so a secret directory listed there is announced, not hidden.
Common Mistakes
- Blocking Googlebot by accident: a Disallow: / under User-agent: * removes the whole site from search — the generator warns, but the file still lets you do it.
- Using robots.txt to hide a page: the file is public, so the 'hidden' path is listed in it for anyone to read.
- Writing noindex in robots.txt: Google stopped supporting it in September 2019 — it does nothing; use a meta robots tag instead.
- Setting crawl-delay and expecting Google to slow down: Google ignores it; the crawl rate is set in Search Console.
- Forgetting the staging block-all file at launch: the site goes live still disallowed, and vanishes from search.
- One file for all subdomains: a rule on example.com does not cover blog.example.com.
Limitations
robots.txt is public and voluntary: well-behaved crawlers obey it, bad actors ignore it, and anyone can read the paths it lists. Blocking a training crawler does not untrain a model on content already taken — it only governs future fetches. Disallow is not noindex: a disallowed URL can still appear in search results if other pages link to it. Crawl-delay is not in RFC 9309 and Google ignores it — this generator emits it only when explicitly set, with a comment saying so. The tester tests pasted text only: it cannot fetch a live robots.txt from a URL because browsers block cross-origin reads; check the live file in Google Search Console's robots.txt report. The crawler list is dated (checked 2026-11-21) and reviewed quarterly, but crawler tokens change — a token that appears in logs and is not in the list can be added as a custom rule only by editing the downloaded file by hand.
Structured Input/Output Example
Preset: Block AI training, allow AI search + Disallow: /admin/ + Sitemap: https://example.com/sitemap.xml
User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / User-agent: * Disallow: /admin/ Sitemap: https://example.com/sitemap.xml
Related Tools
Meta Tag Generator
Meta tag generator: title, description, canonical, Open Graph and X card tags — Google + social previews, pixel meters, HTML, Next.js and JSON-LD output.
Sitemap Generator
Sitemap generator: build sitemap.xml from a URL list — validation, dedupe, 50,000-URL split with index, pasted-file validator. Free, offline.
Slug Generator
Slug generator: turn titles into URL slugs — 4 presets, bulk mode with duplicate handling, CSV export, transliteration, live URL preview. Free, offline.
URL Encoder
URL encoder: percent-encode URLs and query parameters so spaces, symbols, and non-Latin text survive transport intact. Free, offline, browser-based.