robots.txt Tester
Paste a robots.txt and a list of user-agent and path pairs to see exactly which line allows or blocks each — with longest-match precedence.
- Allowedrule: Allow: /admin/
- Allowedrule: Allow: /admin/public/
- Disallowedrule: Disallow: /
- Disallowedrule: Disallow: /private/
- https://example.com/sitemap.xml
Substring UA matches are case-insensitive. Longest pattern wins; ties go to Allow.
How to use
- Paste your robots.txt into the upper box.
- Add (user-agent, path) test cases — set UA to '*' to test the catch-all group.
- Read the verdict and the rule that produced it on the right.
About this tool
ShowHide
Implements the matching rules used by Googlebot / Bingbot: groups are keyed by user-agent, the most-specific UA wins (exact > substring > *), and within a group the longest matching pattern wins (Allow ties beat Disallow). Supports the * wildcard and $ end-of-path anchor. Surfaces every Sitemap: declaration too, so you can sanity-check that your sitemap URLs are reachable.
The longest-match rule is where most surprises live, because it ignores the order the lines are written in. A Disallow: /admin/ followed by Allow: /admin/public/ leaves the deeper path crawlable no matter which line comes first, and moving the lines around changes nothing. Ties are resolved toward the least restrictive rule, so a path matched by an Allow and a Disallow of identical length is crawlable. Everything after a # is discarded before matching, which means a rule commented out mid-line stops applying silently.
A robots file is scoped to one scheme, host and port. The file served at https://example.com/robots.txt says nothing about http://example.com, about www.example.com, or about a subdomain, each of which needs its own. Paths are matched case-sensitively even where the server itself is not, so /Admin/ and /admin/ are separate rules.
The most consequential limit is what the file governs at all. Disallow stops a crawler from fetching a URL; it does not remove that URL from search results. A blocked page that other sites link to can still be indexed, listed with no description because the crawler was never allowed to read it. Keeping a page out of the index needs a noindex response header or meta tag, and that in turn requires the page to stay crawlable, so blocking it in robots.txt actively prevents the removal you wanted.
Frequently asked questions
How does longest-match work?
Within the matching UA group, the rule with the longest pattern that still matches the path wins. Allow and Disallow are weighed by pattern length only — an Allow with a longer pattern beats a Disallow with a shorter one.
What does $ at the end of a pattern mean?
It anchors the pattern to the end of the URL path. /foo$ matches /foo exactly, not /foo/bar. Useful for blocking specific file extensions like /*.pdf$.
Does a Disallow rule keep a page out of search results?
Not reliably. It stops well-behaved crawlers from fetching the page, but a URL that other sites link to can still be listed, because the crawler never reads the page and so never sees a noindex tag on it. To keep something out of an index, allow it to be crawled and return noindex, or put it behind authentication.
Does one robots.txt cover my subdomains?
No. The file applies to exactly one scheme, host and port, so example.com and www.example.com each need their own, and so does a different port. It also has to sit at the root of that host — a robots.txt inside a subdirectory is simply not read.
Related tools
User Agent Parser
Parse a User-Agent string into browser, engine, OS, device, and CPU. Detects 20+ bots including GPTBot, ClaudeBot, PerplexityBot.
Network
CORS Headers Builder
Compose Access-Control-* response headers from a checklist, with four presets and live warnings for the dangerous combinations.
Network
DMARC Record Builder
Compose a _dmarc TXT record — policy, subdomain policy, percentage rollout, alignment, rua/ruf reporting — with safety warnings.
Network
TXT Record Splitter (255-Byte Chunks)
Split a long SPF, DKIM or DMARC TXT record into the 255-byte strings DNS requires, in BIND, generic zone-file, Cloudflare or Route 53 syntax.
Network
/.well-known/* URI Reference
Searchable catalog of well-known URIs registered with IANA — security.txt, openid-configuration, acme-challenge and 30+ more, with RFCs.
Network
DKIM Record Builder & Parser
Build or parse a DKIM DNS TXT record — paste your public key, pick selector, key type, hash and flags, and get the record plus its chunked form.
Network