Replaces the rules in the User-agent: * group.
GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Bytespider, Meta-ExternalAgent
OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User
AhrefsBot, SemrushBot, MJ12bot, DotBot, BLEXBot
Blocking training bots keeps your pages out of model training. Blocking search and answer bots can also keep you out of AI answers and citations.
Full URLs. Add each sitemap or sitemap index you have.
Written as # lines. Crawlers ignore them.
User-agent: * Disallow: /admin/ Disallow: /api/ Disallow: /private/ Sitemap: https://example.com/sitemap.xml
How to use
Pick a preset or load a file
Choose a preset from the menu to fill the User-agent: * group, or type a domain under Or edit a live robots.txt and press Load to start from the current file.
Adjust groups, rules and bot lists
Edit paths, switch a rule between Allow and Disallow, reorder rules with the arrows, or add a group for a crawler such as Bingbot. Set each bot list to Allow or Block and add your sitemap URLs.
Copy, download or test
Read any warnings above the output, then press Copy or Download and upload robots.txt to your domain root. Test this file opens the draft in the Robots.txt Tester first.
Why Robots.txt Generator
- Ten presets for common platforms, plus import of any live robots.txt to edit.
- Separate groups per crawler with Allow and Disallow rules and their own crawl delay.
- AI training bots, AI search bots and SEO crawlers can be blocked independently.
- Warns about conflicting rules, a site-wide block and invalid sitemap or crawl-delay values.
Example robots.txt files for common sites
Most sites need only a few lines. These are starting points; replace the paths with your own and test the result before you upload it. In every example, rules in the User-agent: * group apply to any crawler that does not have its own group.
Keep two things in mind. A crawler that finds its own group, such as GPTBot, ignores the * group completely. And a robots.txt file is a request, not a lock, so never rely on it to hide private pages.
| Site | Lines to use |
|---|---|
| Open site with a sitemap | User-agent: * ; Allow: / ; Sitemap: https://example.com/sitemap.xml |
| Online shop | User-agent: * ; Disallow: /cart/ ; Disallow: /checkout/ ; Disallow: /search ; Disallow: /*?sort= |
| WordPress blog | User-agent: * ; Disallow: /wp-admin/ ; Allow: /wp-admin/admin-ajax.php |
| Block AI training, keep search | User-agent: GPTBot ; User-agent: CCBot ; User-agent: Google-Extended ; Disallow: / |
| Staging site | User-agent: * ; Disallow: / |
AI crawlers: training bots vs search and answer bots
AI companies run more than one crawler, and they do different jobs. Training crawlers collect pages to build future models. Search and answer bots fetch pages to cite them in AI search results, or when a user asks an assistant to read a link. Blocking the first group keeps your content out of training; blocking the second can also remove you from AI answers.
The generator keeps the two lists apart for that reason. Names change over time, so check each company's crawler documentation now and then.
| Company | Training crawler | Search or user-triggered bot |
|---|---|---|
| OpenAI | GPTBot | OAI-SearchBot, ChatGPT-User |
| Anthropic | ClaudeBot | Claude-SearchBot, Claude-User |
| Google-Extended (a control token, not a separate crawler) | Googlebot (regular Search) | |
| Perplexity | None listed | PerplexityBot, Perplexity-User |
| Apple | Applebot-Extended | Applebot |
| Common Crawl | CCBot | None |