The fields feeding the generator
Six controls rebuild the file on every keystroke. An Allow all crawlers checkbox ships ticked, a User-agent text box ships with a lone asterisk, a Disallow paths textarea ships with /admin/ and /cgi-bin/ on separate lines, an Allow paths textarea ships with /public/, a Sitemap URL box ships with https://example.com/sitemap.xml, and a Crawl-delay number field ships with 10.
How the text is assembled
The generate function opens with a User-agent line, falling back to an asterisk if you clear the box. While the checkbox is ticked it writes a bare Disallow and skips the Disallow textarea entirely; unchecking it emits one Disallow line per non-blank path, trimmed. Allow paths follow one per line, Crawl-delay appears whenever the field holds a number, including 0, and is omitted only when the field is empty; a non-empty sitemap adds a blank line then the Sitemap. The whole file lands in a read-only textarea, and the Copy button shows a Copied! flash that clears after 1.5 seconds.
A worked example
On load, with Allow all ticked, the shipped /admin/ and /cgi-bin/ lines never appear. The output reads User-agent: * and an empty Disallow, then Allow: /public/ and Crawl-delay: 10, a blank line, and Sitemap: https://example.com/sitemap.xml. Untick the box and the two Disallow paths slot in ahead of the Allow line instead.
Where it stops
- One User-agent line only, so separate rule groups for different bots cannot be written.
- Ticking Allow all silently discards every path typed into the Disallow box.
- Nothing validates paths or the sitemap URL beyond the browser's basic url check, and Crawl-delay is honored by only some crawlers.
- Blank lines between paths are dropped instead of kept as group separators.
Questions people ask
Why is my disallow list missing?
Because the Allow all crawlers checkbox is ticked; it replaces the whole list with one empty Disallow line, so untick it first.
Should Crawl-delay stay in the file?
Only if your crawlers support it. Google ignores the directive, and this page emits it whenever the field is non-empty and numeric, zero included.
XML Sitemap Generator, Robots.txt Validator and Meta Robots Generator finish the crawling setup this file controls.