Robots.txt Generator and Path Tester

Build a robots.txt from pasted rules and test one path against the supported Google-style subset.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Build rules controls

Use * for every crawler, or a name such as Googlebot. Ignored when the rules box already has User-agent lines.

One Allow or Disallow rule per line. # starts a comment. Paste a full file to keep its own User-agent groups.

Optional. Adds a Sitemap line and must be a full https address.

A path such as /private/ or a full address. The site name and the # fragment are ignored.

The crawler the path test pretends to be. Leave empty to test the * group.

Processed in your browser. Your inputs stay on this device.

Showing a generated example. Generate again for a new result.

How to use Robots.txt Generator and Path Tester

  1. Paste your Allow and Disallow rule lines into Rules, one per line, or keep the example to see how a file is built.
  2. Set the User-agent the rules apply to, and add a Sitemap address if the file should point at one.
  3. Type the path you want to check and the crawler name to test as.
  4. Read the verdict, copy the file, and upload it to the site root before you check it live.

Example: Robots.txt Generator and Path Tester

Block a private folder, keep a public part of it reachable, and confirm the rule catches a real path.

You add
Rules: Disallow: /private/ and Allow: /private/public/, User-agent: *, Path to test: /private/report.pdf, Test as crawler: Googlebot.
You get
A robots.txt with two rule lines, no Sitemap line and the verdict Blocked for Googlebot, matched by Disallow: /private/.

Options

User-agent groups
The User-agent control writes one group for the crawler you name. Paste a file that already carries its own User-agent lines and those groups are kept instead, so a saved file can be checked as it stands.
Patterns and matching
A pattern matches from the start of the path, so /private/ also covers /private/report.pdf. The * wildcard stands for any characters and a trailing $ anchors the pattern to the end of the path, which is how /*?s=$ targets a search query without catching every later folder.

Supported inputs and limits

Rule lines are limited to 500 and 20,000 characters, each pattern to 2,000 characters, and no line may hold control characters. Only this subset is evaluated: Allow, Disallow, User-agent, Sitemap and # comments, with * for any characters and $ to anchor the end. The longest matching pattern wins, and an Allow rule wins a tie, which follows Google's documented behaviour; other crawlers may read the file differently. A robots.txt controls crawling, not indexing. A disallowed address can still appear in results when other pages link to it, and the file cannot remove a page from an index on its own; a noindex directive or an X-Robots-Tag response header is the tool for that. This page never fetches your live file, so check it after you upload it.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Crawl access and indexing are two separate decisions

robots.txt tells a crawler which addresses it may request. Indexing is a later decision made by the search engine. An address that is disallowed is often still eligible to be indexed from external links, because the engine can learn about the page without fetching it. When a page must stay out of results, leave it reachable for the crawler and return a noindex directive, because a crawler cannot read a noindex tag on a page it is not allowed to request.

Google Search Central: Introduction to robots.txt

Questions about Robots.txt Generator and Path Tester

Does a Disallow rule remove a page from search results?

No. A robots.txt controls whether a crawler may fetch an address, and it is not a removal tool. An address that is disallowed can still be indexed from links elsewhere, so use a noindex meta tag or an X-Robots-Tag header when a page must stay out of results.

Why does the test say allowed when I expected a block?

Either no pattern matched, or an Allow rule matched with the same length as a Disallow rule. The longest matching pattern wins and Allow wins a tie, so write a longer Disallow pattern or shorten the Allow rule that overlaps it.

Which rule types can I paste?

User-agent groups, Allow and Disallow lines, Sitemap lines and # comments. A line outside that subset is listed as a note and left out of the verdict, which follows the way Google ignores directives it does not recognise.

Does every crawler follow robots.txt?

Only crawlers that choose to. Well-behaved search engines do, and scrapers often do not. Treat the file as a request that polite crawlers honour, not as access control.

Project manager: Tony Hines · Content updated 29 September 2026 · Report a problem