robots.txt Generator

Generate a robots.txt from user-agent rules and sitemaps.

  • Runs locally in your browser
  • No upload required

Try it

Directives
4
Lines
7
robots.txt
# Generated by the Gampangin robots.txt Generator. # Review against RFC 9309 and your crawler policy before publishing. User-agent: * Allow: / Disallow: /admin/ Sitemap: https://gampangin.example/sitemap.xml
Findings
none
# Generated by the Gampangin robots.txt Generator.
# Review against RFC 9309 and your crawler policy before publishing.
User-agent: *
Allow: /
Disallow: /admin/

Sitemap: https://gampangin.example/sitemap.xml

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

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

  1. Read the user-agent and the path and directive lists.
  2. Validate allow/disallow rules start with / and sitemap values are absolute URLs.
  3. Emit the group in a stable order and append the sitemap lines after a blank line.

Usage

  1. Enter the user-agent (use * for all crawlers).
  2. Add one allow path per line, or leave it empty.
  3. Add one disallow path per line.
  4. Add any extra directives and one sitemap URL per line.
  5. 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

jsonSelect to copy
{
  "userAgent": "*",
  "allow": "/",
  "disallow": "/admin/\n/search/",
  "sitemaps": "https://gampangin.example/sitemap.xml",
  "extra": ""
}

Allow everything

jsonSelect to copy
{
  "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

  1. RFC 9309 — Robots Exclusion Protocol — IETF
  2. Google Search Central — Robots.txt introduction — Google Search Central