Debugging RFC 9309 robots.txt Precedence for Search & AI Crawlers
How RFC 9309 rule matching works
When evaluating a URL path, compliant crawlers first select the most specific matching User-agent group. Within that group, the longest matching Allow or Disallow pattern wins — regardless of line order in the file.
Wildcards (*) match any character sequence and a trailing dollar sign ($) anchors the match to the end of the URL path. An empty Disallow: directive allows everything.
Catching silent regressions after deployments
A single staging robots.txt pushed to production (Disallow: /) or an unintended CDN managed rule can wipe out both Google and AI search indexing overnight. IndexMirror Regression Guard checks your robots.txt automatically on a schedule and emails you the exact diff.
Frequently Asked Questions
- Does line order matter in robots.txt?
- Under RFC 9309, path length determines priority rather than line order. If an Allow and Disallow rule have identical length, Allow takes precedence.
- Can I test a specific subpath like /docs/api?
- Yes — paste the full URL including the path (for example https://yourdomain.com/docs/api) and IndexMirror evaluates every AI bot against that exact path.
- What happens if a site has no /robots.txt file (HTTP 404)?
- When /robots.txt returns 404, RFC 9309 treats all crawlers as allowed by default unless restricted by page-level meta robots or X-Robots-Tag headers.
- Does IndexMirror check Sitemap directives inside robots.txt?
- Yes. We parse all Sitemap: lines and use them when running full 50-page site audits or auto-synced Live Mirrors.