πŸ” Robots.txt Generator β€” Allow, Disallow, Sitemap

Choose a default policy, list paths to block or allow, and add a sitemap URL. The generator writes a robots.txt body you can place at your site root.

SEO Free Β· no sign-up Reviewed 2026-11-03
Input
Result
Checks

Private by design. This tool runs entirely in your browser β€” nothing you enter or add is uploaded to any server.

What this tool does

The robots.txt generator builds a plain-text crawl policy from a user-agent, a default policy and a list of paths. Choose whether the site is allowed by default with specific paths disallowed, or blocked by default with specific paths allowed, then optionally add a sitemap URL. The output is ready to paste into a robots.txt file.

The two modes produce different files. Allow mode writes "Allow: /" followed by a Disallow line for each path you list. Disallow mode writes "Disallow: /" followed by an Allow line for each exception. The second pattern is useful for staging sites or for blocking most of a site while keeping a few public pages crawlable.

A robots.txt file is a voluntary crawling instruction, not a security control. Well-behaved search engines honour it, but scrapers and malicious bots can ignore it. Anything that must not be public needs authentication or server-side access control, not a Disallow rule.

When to use it

  • Block a staging site from being indexed while leaving the home page crawlable.
  • Keep search engines out of admin, cart, search-result or account pages.
  • Publish a sitemap location for crawlers to discover.
  • Create a starting file for a new site and then refine it by hand.
  • Document a deliberate crawl policy for a client or team.

How it works

  1. Set the user-agent. A star applies the group to every crawler that does not have its own group.
  2. Pick a default policy and list paths that are exceptions, one path per line.
  3. Add a sitemap URL if you have one, then generate and copy the file to your site root.

Worked example

To block a staging site except for its home page, choose Disallow as the default policy and list "/" as the allowed path. The output starts with "User-agent: *", then "Disallow: /", then "Allow: /". To block only an admin area and a internal search page on a normal site, choose Allow as the policy and list "/admin" and "/search". The generator adds a Sitemap line only when you provide an absolute https URL.

  • Allow all with /admin disallowed blocks that path while leaving the rest crawlable.
  • Disallow all with /public allowed is a closed default plus an exception.
  • A sitemap line points crawlers at https://example.com/sitemap.xml.

Accuracy and limitations

  • The generator emits one user-agent group. Complex files with separate rules for Googlebot, Bingbot and others must be edited by hand.
  • Path matching in robots.txt follows prefix rules, not glob or regular-expression semantics; the tool does not validate whether a path is the right prefix.
  • It does not test the file against a live site or report crawl errors, and it cannot guarantee that every crawler will obey the rules.
  • A sitemap URL must include http:// or https://; relative values are rejected.

Privacy and data handling

The policy is assembled in your browser. No URLs, paths or sitemap addresses are uploaded to ToolNova.

Frequently asked questions

Does robots.txt hide private pages?

No. It is a crawl hint, not access control. Sensitive URLs still need authentication even if they are disallowed.

Where should the file live?

Place it at the host root, for example https://example.com/robots.txt. A file in a subfolder is not the standard location.

Is the text uploaded?

No. The file body is assembled in your browser.

Can robots.txt hide private pages?

No. It only asks crawlers not to fetch a URL. Anyone with the address can still open it, so protect private content with authentication.

Does Disallow remove a page from search results?

Not necessarily. A blocked URL can still be indexed from links. To keep a page out of results, use a noindex directive on the page itself rather than relying on robots.txt.

Where should the file live?

At the root of the domain, for example https://example.com/robots.txt. Rules in subdirectories are not treated as site-wide policy.

More SEO tools β†’