Robots.txt Generator
Generate a robots.txt file with a user agent, Disallow and Allow rules and a sitemap line. Copy or download. Free, in your browser.
About Robots.txt Generator
The Robots.txt Generator builds a robots.txt file that tells search engine crawlers which parts of your site to skip. Fill in four fields, then copy or download the file.
Fields
User-agent (* means all crawlers), Disallow paths, Allow paths and your sitemap address.
Paths
Start every path with a slash. /admin/ blocks that folder and everything inside it; a single / blocks the whole site.
Crawling, not indexing
Blocking a page stops crawling, but it can still appear in results if other sites link to it. Use a noindex tag to keep a page out of search.
Where to put it
Upload the file as robots.txt in the top folder of your site, then test it with the Robots.txt Tester.
Good to know
One group of rules for one user agent; edit the file by hand for more.
Private
Everything runs in your browser. Nothing you paste is uploaded.
How to use Robots.txt Generator
- Enter the user agent, for example * for all crawlers.
- Type the Disallow paths, one per line, and any Allow paths.
- Add your sitemap URL.
- Copy or download the robots.txt and upload it to the root of your site.
Help & FAQ
What does the Robots.txt Generator do?
It writes a robots.txt file with a user agent, Disallow and Allow rules and an optional sitemap line.
Where do we put the robots.txt file?
At the root of your domain, so it can be opened at https://yourdomain.com/robots.txt.
Does robots.txt hide pages?
No. It asks well-behaved crawlers not to crawl paths, but anyone can still open the URLs. It is not security.
Does Disallow keep a page out of Google?
Not reliably. A blocked page can still be listed if others link to it. Use a noindex tag on a crawlable page instead.
What does Disallow: / do?
It blocks the named crawler from the whole site, apart from any paths a more specific Allow rule permits. Use it only when you really mean it, such as on a staging site.
What does an empty Disallow mean?
Nothing is blocked. In the test an empty Disallow line was written when both boxes were empty.
Why is Allow written before Disallow?
The tool lists Allow lines first. Crawlers such as Google use the most specific matching rule, so Allow for a subfolder can override a broader Disallow.
What does * as user agent mean?
It applies the rules to all crawlers.
Can we add several crawlers?
The generator makes one group of rules. You can add more groups by hand in the finished text.
Should we add our sitemap?
Yes. A Sitemap line helps crawlers find your sitemap. Use the full address, as in the example.
Should we put private folders in robots.txt?
No. The file is public, so listing them shows where they are. Protect private areas with a login.
Is our data uploaded?
No. The file is generated in your browser.