Home / Free tools / robots.txt generator for AI crawlers
robots.txt generator with an AI crawler policy
Pick a policy, list your private paths and your sitemap, and get a robots.txt that repeats your private rules in every named group, the step most hand-written files miss.
How to use it
- Choose a policy. "Citable" lets AI search and user-request fetchers read public pages while asking training crawlers to stay out.
- List private paths. One per line, for example /admin/ or /cart/. They are repeated inside every named group.
- Add your sitemap URL. A full https URL so crawlers can find new pages.
- Copy or download. Save it as robots.txt at the root of your domain, then test it with the checker.
The three policies explained
Citable, opt out of training. You want to appear in AI answers that link to sources, but you do not want your pages used to train models. The file allows the search and user-request fetchers (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User) and disallows the training and dataset crawlers. Traffic from assistants depends on being fetchable, so this is the usual choice for publishers and shops.
Allow everything. The simplest file. Right for open documentation and anyone who benefits from maximum reach.
Block AI crawlers, keep Google and Bing. Right if you sell content and do not want assistants reading it. The trade-off is plain: you will not be fetched by those assistants either, so do not expect to be cited by them.
Why private paths are repeated
A crawler that finds a group naming it ignores the * group. A file that closes /admin/ only under * and then opens a group for OAI-SearchBot without repeating the rule has silently opened /admin/ to that bot. The generator writes the private paths into each named group so the intent survives.
After you publish
Put the file at /robots.txt on the exact host (www and non-www are separate), make sure it returns HTTP 200 and plain text, and run it through the AI crawler checker with a public path and a private path. Re-check after any CDN or CMS change, because platforms sometimes overwrite the file.
Worked example
This is what the tool produces for the sample input, so you can see the result without running it.
Input
/admin/ /checkout/
Result
- Google-Extended and Applebot-Extended are control tokens: they do not crawl separately, they tell the vendor whether content may be used for AI training.
Output
# Default: public pages crawlable, private paths closed. User-agent: * Allow: / Disallow: /admin/ Disallow: /checkout/ # AI search and user-request fetchers may read public pages. Private paths repeated: a named group ignores the * group. User-agent: OAI-SearchBot User-agent: ChatGPT-User User-agent: Claude-SearchBot User-agent: Claude-User User-agent: PerplexityBot User-agent: Perplexity-User Allow: / Disallow: /admin/ Disallow: /checkout/ # Training and dataset crawlers: opted out. This is a request, not enforcement. User-agent: GPTBot User-agent: ClaudeBot User-agent: anthropic-ai User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: Bytespider User-agent: meta-externalagent User-agent: cohere-ai Disallow: / Sitemap: https://shop.example/sitemap.xml
Frequently asked questions
Is robots.txt enough to keep content private?
No. It asks polite crawlers to stay away; it does not stop anyone who ignores it, and listing a path in it can advertise that the path exists. Protect private content with authentication.
Should I block training crawlers?
That is your decision. Opting out is a legitimate policy choice and the file says so clearly, but it only affects future crawling by bots that honour it.
Why not use crawl-delay?
Support varies and Google ignores it. Rate-limit at your server or CDN if crawlers load you too heavily.
Can I add my own groups?
Yes. Edit the output freely and retest it. Each new group must repeat any private-path rules it should still obey.
More free tools
- robots.txt AI crawler checker: Paste a robots.txt and a URL path. See which of 20 AI and search crawlers may fetch it, which rule decided, and where a named group overrides the * group.
- sitemap.xml generator: Turn a list of URLs into a valid sitemap.xml with lastmod, XML escaping, duplicate removal and host consistency checks. Includes the robots.txt Sitemap line.
- llms.txt generator: Generate a valid llms.txt: site name, one-sentence summary and grouped links with short notes. Free, runs in your browser, with an honest note on what it does.