Your files stay on your device

robots.txt tester

Paste robots.txt rules and get a verdict for each path under RFC 9309 longest-match rules.

robots.txt

Loading editor…
Paste it in. Nothing is fetched.

The longest matching rule wins, and Allow wins a tie. * and $ work as wildcards, as in Google's rules.

Longest match and ties

Every rule is a path prefix. When several rules match one path, the longest rule decides. Suppose a file has Disallow: /admin and Allow: /admin/public. The path /admin/public/page matches both, and the Allow rule is longer (13 characters against 6), so the path is allowed. The path /admin/users matches only the Disallow rule and is blocked. If an Allow and a Disallow match with equal length, Allow wins.

Wildcards in path patterns

The asterisk matches any run of characters. A dollar sign at the end of a rule anchors it to the end of the URL path.

/privateany path that starts with /private
/*.pdf$any path that ends in .pdf, because $ anchors the end

Directives outside RFC 9309

  • Crawl-delay is not in RFC 9309, and Google ignores it.
  • Sitemap lines are read on their own and do not belong to any User-agent group.
  • Rules listed before the first User-agent line belong to no group, so crawlers do not apply them.

Was this tool useful?