Robots.txt Generator
Build a robots.txt with allow and disallow rules, an optional sitemap line and one-click blocks for AI crawlers, or paste an existing file to test which addresses it allows, and see which rule decided.
Free, no sign-up. The file is built in your browser.
Crawler rules
Your robots.txt appears here.
How to
Build a robots.txt in three steps
Pick the default
Leave it on Allow for a normal site. Block the whole site only for staging or private copies.
List what to keep out
Add one path per line, such as /admin/ or /cart/. Add exceptions below if a blocked folder holds a page crawlers should still see.
Download and upload
Download robots.txt and upload it to the root of your site so it opens at yourdomain.com/robots.txt.
Getting robots.txt right
- Never block the CSS and JavaScript your pages need to render. Search engines use them to understand the page.
- Blocking a page in robots.txt does not remove it from search if other sites link to it. To keep a page out, use a noindex tag and let crawlers fetch it.
- Re-test after every change. One stray Disallow: / can take a whole site out of crawling.
- Put the sitemap line in so crawlers find it without being told in each search console.
FAQ
Robots.txt questions
What does robots.txt do?
It tells crawlers which parts of your site they may request. It sits at the root of the site and is read before a crawler visits other pages.
Will blocking a page in robots.txt remove it from Google?
Not reliably. A blocked page can still appear in results if other pages link to it, just without a description. To keep a page out of search, use a noindex tag instead and leave the page crawlable.
Where do I put the robots.txt file?
In the root folder of the domain, so it loads at https://yourdomain.com/robots.txt. Each subdomain needs its own file.
How do I block AI crawlers?
Tick the crawlers you want to opt out of. Each one gets its own block with Disallow: /. Companies that publish these names say they honour them, but robots.txt cannot force any crawler to comply.
Is the file uploaded anywhere when I use this tool?
No. It is generated in your browser and the page makes no network request with what you type.
How does the tester decide if an address is allowed?
It follows RFC 9309. It picks the group for the crawler name you give (or the * group), then the matching rule with the longest pattern wins. If an Allow and a Disallow tie, Allow wins. * matches any characters and $ at the end means the address must end there. The path is compared with its query string as written.