robots.txt Tester
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.
- 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.
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.
CORS Headers Builder
Compose Access-Control-* response headers from a checklist, with four presets and live warnings for the dangerous combinations.
DMARC Record Builder
Compose a `_dmarc` TXT record — policy, subdomain policy, percentage rollout, alignment, rua/ruf reporting — with safety warnings.
TXT Record Splitter (255-Byte Chunks)
Split a long SPF, DKIM or DMARC TXT record into the 255-byte chunks the DNS protocol requires — outputs BIND, generic zone file, Cloudflare or Route 53 syntax.
/.well-known/* URI Reference
Searchable catalog of well-known URIs registered with IANA — `security.txt`, `openid-configuration`, `apple-app-site-association`, `acme-challenge`, and 30+ more, with RFC references and use cases.
DKIM Record Builder & Parser
Build or parse a DKIM (DomainKeys Identified Mail) DNS TXT record — paste your public key, pick selector, key type (RSA/Ed25519), hash and flags, get the full record plus the selector._domainkey hostname and a DNS-chunked version for records over 255 chars.