Workflow Tools Control Yard

Home / Web

robots.txt tester

Paste a site's robots.txt, the crawler's name and the paths to test: the page finds the group the crawler follows, the rule that decides each path, and why, by the rules of RFC 9309. It reads only what you paste: nothing is fetched and nothing leaves your browser.

How a crawler reads the file

StepWhat the crawler does
GroupsA group is one or more user-agent lines followed by rules, and it ends at the next user-agent line or the end of the file. A group without rules lets the crawler fetch everything. A Sitemap line or another record the protocol does not define does not end a group; a rule before the first user-agent line is in no group, and crawlers should ignore it.
Which groupA crawler looks for groups that name its product token, a name of letters, "_" and "-", matched without regard to case. Several groups that name it are merged into one. With none, it follows the "*" group; with no "*" group either, no rule applies to it.
Which ruleEach allow and disallow path is matched against the start of the path being fetched, case by case. The rule with the longest match wins; when an allow rule and a disallow rule match equally, allow wins. When no rule matches, the path is allowed, and /robots.txt itself always is.
Special characters* in a rule stands for any run of characters, the slash included; $ at its end means the path must end there; # starts a comment. To match a real * or $ in an address, write it %2A or %24 in the rule.
EncodingCharacters outside ASCII are compared in their %-encoded form, and %-forms of letters, digits and - . _ ~ as the characters themselves.
Empty rulesDisallow: with no path blocks nothing, and Allow: with no path allows nothing more: Google's parser, the one Googlebot uses, gives a rule with no path no effect, and this page does the same.

When the file is fetched

CaseWhat the crawler does
The fileAt /robots.txt, all lower case, at the top of the site; UTF-8 text, served as text/plain.
2xx, readThe crawler follows the rules it can parse; a line it cannot parse is skipped.
3xx redirectThe crawler should follow at least five redirects in a row, to another host too, and apply the file it reaches to the site it first asked. After more than five it may treat the file as unavailable.
4xx, unavailableThe crawler may fetch anything on the site.
5xx or a network error, unreachableThe crawler must take everything as disallowed. After a long time, such as 30 days, it may treat the file as unavailable or keep using a copy it cached.
CachingA crawler should not use a cached copy for more than 24 hours, unless the file is unreachable.
SizeA crawler must read at least the first 500 KiB of the file.

The rules ask crawlers to stay away; they do not stop anyone. A path listed in robots.txt is public for anyone to read, so a path that must stay private needs real protection, such as HTTP authentication.

Sources

More Web tools