robots.txt Generator
Generate a robots.txt from user-agent rules and sitemaps.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Generated a robots.txt with 5 directive(s) and 0 finding(s).
How it works
- Read the user-agent and the allow/disallow path lists.
- Validated each rule: paths must start with / and sitemaps must be absolute URLs.
- Emitted the group followed by the sitemap lines and reported any findings.
- robots.txt controls crawling, not indexing; a disallowed URL can still appear without a snippet.
Methodology
- Read the user-agent and the path and directive lists.
- Validate allow/disallow rules start with / and sitemap values are absolute URLs.
- Emit the group in a stable order and append the sitemap lines after a blank line.
Usage
- Enter the user-agent (use * for all crawlers).
- Add one allow path per line, or leave it empty.
- Add one disallow path per line.
- Add any extra directives and one sitemap URL per line.
- Generate and copy the robots.txt.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Block an admin path and declare a sitemap
{
"userAgent": "*",
"allow": "/",
"disallow": "/admin/\n/search/",
"sitemaps": "https://gampangin.example/sitemap.xml",
"extra": ""
}Allow everything
{
"userAgent": "*",
"allow": "",
"disallow": "",
"sitemaps": "",
"extra": ""
}Limitations
robots.txt, crawling and indexing
robots.txt tells compliant crawlers which URLs they may request. It does not guarantee a URL is hidden, and it is not a security boundary.
Pair a sitemap with robots.txt so crawlers can both respect your rules and discover the pages you want indexed.
Frequently asked questions
- Does Disallow remove a page from search results?
- Not by itself. Disallow blocks crawling; use noindex (or remove the page) to keep it out of the index, and never block a URL that must be crawled to see its noindex.
- Should I include a Sitemap line?
- Yes when you have a sitemap; it helps crawlers discover URLs, though it does not guarantee crawling.
Sources
- RFC 9309 — Robots Exclusion Protocol — IETF
- Google Search Central — Robots.txt introduction — Google Search Central
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.