01What is Robots.txt Generator?
Robots.txt Generator builds the small text file that tells crawlers which parts of a site they may fetch. You work in user-agent groups. Each group has a User-agent line, an optional Crawl-delay, and a list of Allow and Disallow rules. Below the groups you add Sitemap URLs and, if you want one, a Host line. The output panel rewrites itself on every edit, and you can copy it or download it as robots.txt. The format follows RFC 9309, the Robots Exclusion Protocol that Google and others standardised in 2022. Under that spec a crawler obeys only the most specific group that names it, and the longest matching path wins between Allow and Disallow. Crawl-delay and Host aren't in RFC 9309, and Google's documentation says it ignores Crawl-delay. So the tool only writes them when you fill them in. Four presets give you a starting point. Allow All and Block All are one-liners. Standard allows the site but blocks /admin/, /api/, /private/ and any URL ending in .json, and adds an example sitemap. Block AI Training adds groups that disallow GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot and meta-externalagent. Those are the tokens the vendors document for collecting training data. It deliberately leaves search crawlers such as OAI-SearchBot, Claude-SearchBot and PerplexityBot alone, along with user-requested fetchers like ChatGPT-User. Blocking those would hide you from AI search answers without stopping training. Google-Extended and Applebot-Extended are control tokens, so blocking them doesn't touch Google or Apple search. A quick example. Put Disallow: /staging/ under *, add a Googlebot group with Allow: /, and enter two sitemaps. You get two groups, then each Sitemap line on its own, separated by blank lines. Because Googlebot now has its own group, it ignores the * rules completely and can crawl /staging/. That catch trips up plenty of people. A few limits. The tool doesn't validate paths or URLs, so a typo goes straight into the file. It also can't check how a particular crawler reads wildcards like * and $. And robots.txt is a request, not a lock. Your rules are built in the page, and nothing is uploaded until you put the file on your own server.
Site owners and SEO folks who need a correct robots.txt, including an AI-training opt-out, without memorising RFC 9309's group matching rules. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Robots.txt Generator
- Pick a preset (Allow All, Block All, Standard or Block AI Training), or start from the default group
- Fill in the User-agent field of each group with * or a crawler token such as Googlebot
- Add rules, choose Allow or Disallow in the Type dropdown, and type the /path
- Enter one or more sitemap URLs, and a Crawl-delay or Host only if you really need them
- Copy or download the output and serve it at /robots.txt on the root of each host
03Worked examples
- Input:
Preset: Standard - Result:
User-agent: * Allow: / Disallow: /admin/ Disallow: /api/ Disallow: /private/ Disallow: /*.json$ Sitemap: https://example.com/sitemap.xml - Swap the example sitemap URL for your own before deploying.
- Input:
Preset: Block All - Result:
User-agent: * Disallow: / - Handy for staging hosts. Never deploy this on a live site you want in search.
- Input:
User-agent left blank; Crawl-delay " 10 "; Disallow /admin/; Allow /admin/public/; Sitemap https://example.com/sitemap.xml plus an empty sitemap row - Result:
User-agent: * Crawl-delay: 10 Disallow: /admin/ Allow: /admin/public/ Sitemap: https://example.com/sitemap.xml - A blank user-agent becomes *, the crawl delay is trimmed, and empty sitemap rows are dropped.
- Input:
Group 1: * with Disallow /staging/. Group 2: Googlebot with Allow /. Two sitemaps. Host " example.com " - Result:
User-agent: * Disallow: /staging/ User-agent: Googlebot Allow: / Sitemap: https://example.com/sitemap.xml Sitemap: https://example.com/news-sitemap.xml Host: example.com - Googlebot follows only its own group here, so it may crawl /staging/. Host is trimmed and written last.
- Input:
Preset: Block AI Training - Result:
User-agent: * Allow: / # AI training crawlers. Search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot) # and user-requested fetchers (ChatGPT-User, Claude-User) are not blocked here. User-agent: GPTBot Disallow: / User-agent: ClaudeBot Disallow: / ... - Shortened. The full output also blocks Google-Extended, Applebot-Extended, CCBot and meta-externalagent, each with Disallow: /.
04Common use cases
- Writing a first robots.txt for a new site and pointing crawlers at the sitemap
- Keeping crawlers out of /admin/, /api/ and staging paths that have no business in search
- Opting out of AI model training with GPTBot, ClaudeBot and Google-Extended groups while staying in Google and Bing
- Listing several sitemaps, such as a main sitemap and a news sitemap, in one file
- Rebuilding a messy inherited robots.txt group by group so you can see which crawler gets which rules
- Blocking everything on a staging host with the Block All preset before it goes public
05Tips
- A crawler with its own group ignores the * group entirely. If GPTBot or Googlebot gets a group, repeat any shared Disallow lines inside it.
- Disallow stops crawling, not indexing. A blocked URL can still show up in Google if other sites link to it, so use noindex on a crawlable page to keep it out.
- robots.txt is public and advisory. Listing /secret-admin/ advertises it, so protect private areas with authentication instead.
- Each subdomain and protocol needs its own file. The one on www.example.com does nothing for blog.example.com.
- New AI crawlers appear often. Recheck the vendors' bot pages now and then and update your groups.
06Related concepts
Robots exclusion protocol, Sitemap XML, Crawl budget, noindex.
Frequently Asked Questions
What is Robots.txt Generator?
Robots.txt Generator is a free, browser-based developer tool on AIDToolStack. Build robots.txt files with user-agent rules, sitemaps, and AI bot blocking. It requires no installation or sign-up and works entirely in your browser.
Is Robots.txt Generator free to use?
Yes. No sign-up, no fees and no usage cap.
Does Robots.txt Generator store my data?
No. It runs in your browser; nothing is uploaded.