robots.txt Builder & Crawler Simulator

Configure robots.txt crawler rules and test path matching with the built-in sandbox.

Templates:
Configured Crawler Rules
User-agent Directive Path Pattern

Live Crawler Rule Sandbox

RFC 9309 Longest Match Simulator
Generated robots.txt File
Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/robots-txt-generator" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/robots-txt-generator" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - robots.txt Builder & Crawler Simulator</a></div>

Understanding robots.txt and RFC 9309

The robots.txt file resides at the root of a domain to direct search engine crawlers which URL paths may be downloaded. In 2022, the IETF standardized the Robots Exclusion Protocol under RFC 9309, mandating that the most specific (longest) path match wins.

Common robots.txt Mistakes

What happens in the page

generateRobotsFile() assembles the file from the rule rows you add: each block emits a User-agent line followed by its Allow and Disallow paths, groups are separated by blank lines, and a sitemap line is appended last. renderRulesTable() keeps the editor and the generated text in sync. simulatePath() is the part that earns its keep: it takes a URL path and a chosen crawler, applies the rules in order with longest-match precedence, and tells you whether that path would be allowed — which is the question people actually have.

Where it breaks down

The simulator implements the usual longest-match rule, which is what Google documents, but robots.txt has no formal standard and other crawlers differ in edge cases — wildcards combined with $ anchors are the classic disagreement. A Disallow is not access control: it asks well-behaved crawlers to stay out and does nothing about anyone else, and a disallowed page can still be indexed if it is linked from elsewhere.

Privacy: no data leaves this tab

Rules are edited and simulated locally. The simulator tests your own rule text, not a live site, so it never fetches a robots.txt from anywhere.

Frequently asked questions

Does disallowing a page remove it from search?

Not by itself. Blocking the crawl prevents re-reading, but the URL can stay indexed from earlier visits or from inbound links; you need a noindex as well, and only once crawling is allowed.

Which rule wins when two match?

The longest matching path wins, and Allow wins a tie against Disallow of the same length in Google's implementation. The simulator follows that rule.

Is robots.txt a security control?

No. It is a request, honoured by major search engines and ignored by scrapers. Anything private needs authentication, not a Disallow line.