Skip to content
Koit Academy

Robots.txt tester

Your details

The token, such as Googlebot, Bingbot or GPTBot, not the full user-agent string.

The details filled in are an example. Everything runs in this browser; nothing you type is sent anywhere or stored.

How the decision was made

Blocked: Googlebot may not crawl this URL.

BLOCKED · /search?q=roof+repair

Crawler:      Googlebot
Path tested:  /search?q=roof+repair
Group used:   user-agent: *
Deciding rule: line 3, Disallow: /search
  • Note: No group names Googlebot, so the * group applies. Some crawlers answer to more than one token; Google lists both Googlebot-Image and Googlebot for its image crawler. Test each token you care about.

How to use it · free, no signup

How to use the Robots.txt Tester

Paste a robots.txt file, a URL and a crawler name to see whether the URL is allowed, which group and rule decided it, and which lines are ignored. Runs in your browser.

  1. 01

    Paste the file

    The robots.txt as it is, or as you plan to publish it.

  2. 02

    Enter a URL and crawler

    A full address or a path, and a token such as Googlebot.

  3. 03

    Read the decision

    Allowed or blocked, with the group and the rule that decided it.

Three rules decide every answer

A robots.txt file can look simple and still behave in ways its author did not intend, because three rules sit underneath it. They are set out in how Google interprets the robots.txt specification, and the tester follows them:

  • One group per crawler. A crawler follows the group whose user-agent names it most specifically. If several groups name it, their rules are merged. The * group applies only when nothing names the crawler.
  • The longest rule wins. Among the rules in that group that match the address, the one with the longest path decides.
  • Allow wins a tie. If an allow and a disallow match with paths of the same length, the less restrictive one, the allow, applies.

A worked example

With the file filled in above, Googlebot asks for /search?q=roof+repair. No group names Googlebot, so it follows the * group. Two rules there could matter: Disallow: /search matches, and Allow: /search/help does not, because the address does not continue with /help. The disallow decides, and the address is blocked. Ask for /search/help and both match; the allow is longer, so it wins.

Lines that do nothing

Google reads only user-agent, allow, disallow and sitemap lines, and reads only the first 500 KiB of the file. A Crawl-delay or a Noindex: line is skipped, and the tester lists every line it ignored so they can be removed or replaced with something that works. Remember too what robots.txt cannot do: Google’s introduction to robots.txt notes that a blocked address can still appear in results without a description.

Where the test stops

The tester matches the path and query as typed. Crawlers also normalise percent-encoded characters before matching, which is not reproduced here, so an address with encoded characters gets a warning. To write a new file from scratch, use the robots.txt generator; to find which pages should be crawled at all, a sitemap built with the XML sitemap generator is the other half.

Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.

Questions

What people ask about the Robots.txt Tester

How does Google choose between allow and disallow?
The most specific rule wins, which means the one with the longest path. If an allow and a disallow are equally long, Google uses the less restrictive one, the allow.
Which group does a crawler follow?
Only one: the group whose user-agent matches it most specifically. Groups naming the same crawler are merged, and the * group applies only when no group names the crawler.
Does this tool fetch my live robots.txt?
No. It tests the text you paste, which also lets you test changes before you publish them. Nothing is requested from your site.
Are robots.txt paths case sensitive?
Yes. Field names and user-agent names are not, but paths are, so /Fish and /fish are different paths.
Why is a line marked as ignored?
Google reads only user-agent, allow, disallow and sitemap. Anything else, such as crawl-delay or noindex, is skipped, and so is a rule that appears before any user-agent line.