What Robots.txt Generator helps you do
Compose a robots.txt file with allow and disallow rules, crawler-specific user agents, and sitemap directives, then validate common mistakes before publishing to your site root. It is a syntax helper, not a security control: robots.txt asks crawlers to stay out, but it does not make a page private.
Draft rules are built locally in your browser. Nothing is uploaded until you publish the file yourself.
How it works
The page builds the text from the selected user agent, the allow and disallow lines, and the sitemap list. If no rules are entered, it emits a single Disallow line so the result is still a valid file. Validation checks that paths start with /, that sitemap entries are absolute HTTP(S) URLs, and that a full-site block is not accidental.
How to use Robots.txt Generator
- Add user-agent blocks, path rules, and one sitemap URL per line.
- Review validation hints, then copy or download robots.txt for deployment.
- Upload it to the site root at /robots.txt and open the URL to confirm it is served.
- Use a supported noindex method on pages that must not be indexed.
When to use it
- Launch a new site and publish baseline crawler rules with sitemap references.
- Block staging paths or internal search URLs from being crawled.
- Document Bingbot or Googlebot-specific allowances without hand-editing syntax.
- Keep a site search or a cart from generating crawlable URLs.
- Point crawlers at a sitemap after a migration.
- Check a proposed block rule before it reaches production.
When not to use it
- Do not use robots.txt to hide confidential pages; use authentication or a noindex mechanism.
- Do not expect a Disallow rule to remove a page from search results.
- Do not add Crawl-delay and expect every crawler to honor it; it is not part of the core protocol.
Example
A staging site needs to stay out of search while the production sitemap stays visible. The block-all preset emits Disallow: / for the selected user agent, and the warning confirms the whole site is blocked. The file is uploaded to staging only, while production uses the allow preset with its sitemap.
What you can do with Robots.txt Generator
- Choose a user agent, including Googlebot and Googlebot-Image.
- Start from allow-all, block-private or block-all presets.
- Add allow and disallow paths, one per line.
- Add one or more absolute sitemap URLs.
- Validate path prefixes and sitemap syntax.
- Copy or download the finished robots.txt.
Example: block admin and search paths
Choose the crawler and start from the private-areas preset. It fills the common admin, account, checkout and search paths, which you can edit.
Add the sitemap URL, one per line, and read the validation hints. A path that does not start with a slash, or a sitemap that is not absolute, is flagged before you publish.
Download the file, upload it as /robots.txt at the site root, and request it in a browser to confirm it is served as text, not as an HTML error page.
What to know before you start
- Robots.txt controls crawling, not guaranteed de-indexing — use supported noindex on pages when needed.
- Crawl-delay is not generated because it is not part of the core protocol.
- The file cannot enforce access control; anyone can read a public URL.
- Only one user-agent block is generated per file.
- Crawler behavior varies, and a rule that one engine honors may be ignored by another.
Common mistakes
- Uploading robots.txt below the site root so crawlers never find it.
- Using a relative sitemap URL instead of an absolute HTTPS URL.
- Assuming Disallow removes a page from search results.
- Blocking a path that a crawler needs for rendering CSS or JavaScript.
- Leaving a full-site block in place after a staging test.
Troubleshooting
If the file is ignored, check that it is served at the exact host and protocol the crawler uses, such as https://example.com/robots.txt.
If a path rule is rejected, add the leading slash. A rule must start with /.
If the sitemap is rejected, use a full http:// or https:// URL, not a relative path.
If a blocked page still appears in search, robots.txt is not a de-indexing tool; add noindex on a crawlable page or remove the URL another supported way.
If the browser shows an HTML page at /robots.txt, the server is rewriting the request; fix the route before debugging the rules.
If a rule path contains a query string, remove it; robots.txt matches paths, not query parameters.
Related standards and documentation
- RFC 9309 defines the Robots Exclusion Protocol and its user-agent and path rules.
- Sitemap directives are an extension supported by major search engines, not part of the original protocol.
- Upload to the site root.
- Sitemaps need absolute URLs.
- Use noindex for indexing control.