Robots.txt Generator
Generate a properly formatted robots.txt file to control how search engines crawl your site.
How It Works
- 1Set your user-agent and add allow/disallow rules.
- 2Optionally add your sitemap URL.
- 3Copy or download the file.
Features
- Multiple allow/disallow rules
- Optional sitemap directive
Privacy
This tool runs entirely in your browser. Nothing you enter is sent anywhere.
About Robots.txt Generator
A robots.txt file is a plain text file placed at the root of a domain (such as example.com/robots.txt) that tells cooperating web crawlers which parts of a site they're allowed or not allowed to request, using simple User-agent, Disallow and Allow directives. The format follows the long-standing Robots Exclusion Protocol, which was formalized as an official standard (RFC 9309) after decades of informal adoption by search engines.
Common uses include keeping crawlers out of admin panels, staging environments, internal search results pages, or duplicate content paths, and pointing crawlers to a sitemap with the Sitemap directive so they can discover pages more efficiently. The format supports separate rule blocks that target different crawlers by name — for example applying stricter rules to a scraping bot while leaving Googlebot unrestricted — though this generator builds one User-agent block at a time, so a robots.txt with multiple blocks needs to be assembled by generating each block separately and combining them by hand.
The most important thing to understand is that robots.txt is advisory, not a security or access control mechanism: well-behaved crawlers like Googlebot and Bingbot respect it, but nothing stops a malicious scraper from ignoring it entirely, and the file itself is publicly readable by anyone. It also doesn't reliably keep a URL out of search results — if a disallowed page is linked from elsewhere, it can still appear in search listings without a description, since blocking a page in robots.txt can actually prevent search engines from seeing a noindex tag placed on that same page. A meta robots noindex tag or an HTTP header is the correct tool for that job.