Robots.txt Generator
Build a robots.txt file with Allow and Disallow rules for multiple user-agents, crawl-delay and sitemap links, then copy it to your site's root folder.
Disallow paths
Allow paths
Sitemap URLs
Block AI training crawlers
Each switch adds a group that disallows the whole site for that crawler. Search engines are not affected.
robots.txt
Test a URL
See whether a crawler may fetch a page, using the same rules Google uses: the longest matching rule wins, Allow wins a tie, and * and $ work as wildcards.
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Free Online Robots.txt Generator
Build a custom robots.txt with per-crawler Allow/Disallow rules and sitemap references, with live warnings for common mistakes. It helps site owners write crawler directives for a domain while keeping the rules readable and easy to review before deployment.
What robots.txt controls
robots.txt is a plain-text file at the root of a domain that gives web crawlers instructions about which parts of a site they're allowed to request. It's the first thing well-behaved crawlers check before crawling anything else, using simple User-agent, Allow, and Disallow directives, plus optional Sitemap lines pointing crawlers at your XML sitemap so they can discover pages more efficiently.
How to use this generator
Add one or more user-agent groups — use * to target every crawler, or a specific bot name like Googlebot for crawler-specific rules — then list the paths each group should or shouldn't crawl. Add your sitemap URL so crawlers can find it immediately, and watch the warnings panel for common mistakes like a relative sitemap URL or a rule that accidentally blocks your entire site.
Common use cases
- Blocking crawlers from admin panels, staging paths, or internal search-result pages
- Pointing all crawlers at your XML sitemap to speed up discovery of new pages
- Giving one crawler (like an aggressive scraper bot) different, more restrictive rules than the rest
- Double-checking an existing robots.txt for a mistake that's accidentally blocking the whole site
Everything is generated locally in your browser — no part of your configuration is sent to a server.
Common mistakes and edge cases
- Two groups for the same crawler (for example two
User-agent: *blocks) are flagged, because crawlers read only one of them. Use Merge groups for the same crawler to combine them. - The same path under both Allow and Disallow in one group is flagged, since it is unclear which one wins.
- Paths are case-sensitive and match from the start of the address:
Disallow: /fishalso blocks/fish.htmland/fishing, but not/Fish. A$at the end of a rule stops that:/*.pdf$blocks/a.pdfbut not/a.pdf?download=1. Use Test a URL to check. - A numeric Crawl-delay only avoids this tool's own warning — it doesn't mean every crawler honors it. Google ignores Crawl-delay entirely regardless of value; only Bing and Yahoo respect it.
Worked example
Take one group for all crawlers (*) that blocks /admin/ but allows /admin/help, and add the sitemap https://example.com/sitemap.xml. The generator writes User-agent: *, then Disallow: /admin/, then Allow: /admin/help, a blank line, and finally Sitemap: https://example.com/sitemap.xml. Save the text as robots.txt in the top folder of the site.