For AI crawlers, a more specific Allow rule can override Disallow because RFC 9309 selects the longest matching path pattern, and Allow wins when both rules match equally.

This is not a last-rule-wins system. The position of a directive does not determine the outcome. Instead, two separate questions matter: which crawler group applies, and which path pattern is the most specific match inside that group.

why can a more specific allow rule override disallow when using robots txt ai crawlers
AI Crawler Robots.txt: Why Allow Beats Disallow

How robots.txt resolves conflicting directives

A parser first identifies groups by their User-agent directives. Rules from multiple groups that target the same product token are combined. For each AI crawler token being evaluated, a matching specific product-token group takes precedence over the User-agent: * group. The wildcard group applies only when no specific group matches the token being checked.

Once the applicable group is selected, the parser compares its Allow and Disallow patterns with the requested path from the beginning. The most specific matching pattern wins, regardless of which directive appeared first in the file.

Decision point Comparison Result
Applicable crawler group Specific product-token group versus wildcard group The specific group is used; the wildcard group applies only if no specific group matches.
Conflicting path patterns Longest matching Allow or Disallow pattern The most specific matching pattern controls the result.
Equal path specificity Allow and Disallow match equally Allow wins the tie.

That sequence explains why a broad Disallow does not necessarily block a path that a longer Allow pattern also matches. Specificity must be evaluated within the applicable crawler group; rules from an unrelated product-token group cannot be used to break the conflict.

What makes an Allow path more specific

Path specificity is based on the matching pattern, not on directive order. Consider this illustrative group for a fictional crawler: User-agent: ExampleBot, Disallow: /private/, and Allow: /private/public-report.

For the requested path /private/public-report, both patterns match from the beginning, but the Allow pattern is longer and therefore more specific, so it controls. For /private/secret-note, only the Disallow pattern matches, so that path remains blocked under these rules.

If an Allow and a Disallow pattern match with equal specificity, RFC 9309's tie-break favors Allow. A later Allow directive does not receive special treatment merely because it appears after a Disallow directive.

Pattern or condition Matching behavior
User-agent product token Matched without regard to letter case.
Requested path Matched with case sensitivity, so /Private and /private can produce different results.
Asterisk Matches any sequence of characters.
Dollar sign at the end Anchors the pattern to the end of the path.
Empty Disallow value Does not block anything.
No applicable Allow or Disallow match Access is reported as allowed.
Comments Removed before the rules are interpreted.

Why the AI crawler token changes the outcome

The same path can be allowed for one AI crawler token and blocked for another because each token can select a different group. The AI Bot Robots.txt Checker evaluates a pasted file independently against 32 current robots.txt product tokens used by AI crawlers, AI assistants, model-training controls, and AI-adjacent search crawlers.

Those 32 entries are robots.txt product tokens, not a promise that every string appears verbatim in an HTTP User-Agent header. Some operators publish dedicated control tokens, such as Google-Extended or Applebot-Extended, for model-training or data-use preferences. Other entries represent crawler or assistant retrieval products. The report labels each operator, purpose category, and source status so these distinctions remain visible.

Cloudflare's AI bot and crawler traffic reference can help cross-check major product names, but critical policies should be confirmed against the relevant operator's current documentation before deployment.

Check a production robots.txt file

  1. Paste the exact production file. Keep the UTF-8 input within 500 KiB, or 512,000 bytes. The checker also accepts at most 5,000 non-empty access rules and enforces an aggregate matching-work limit of 20,000,000 operations. As a result, a file within the byte limit can still be rejected atomically by the safety limit rather than produce a partial report.
  2. Enter the path to model. Use a case-sensitive URL path beginning with a slash. Include a query string only when it is part of the crawler request you want to evaluate.
  3. Run the check and inspect every match. Use the AI Bot Robots.txt Checker to review the allowed or blocked result for each of the 32 product-token rows. Inspect the matching rules and determine whether the result came from a specific group or the wildcard group.
  4. Verify critical product tokens. Before deployment, confirm each important token and its intended policy against current operator documentation. For sites using managed controls, compare the result with Cloudflare's managed robots.txt reference.
  5. Repeat the check for important paths. Test the paths that matter most, including case-sensitive variants and relevant query strings. Compare each result with the access policy you intended to publish.

The checker processes the pasted text in your browser. It does not upload the file, fetch a website, or contact a crawler operator.

Read the result without overstating it

An allowed result means only that the pasted rules do not request a block for the selected path under the implemented protocol logic. It does not prove that an operator will crawl, index, cite, train on, or display the page. A blocked result likewise does not prove enforcement or removal from an index.

Robots.txt is a voluntary crawler request, not authentication, authorization, a firewall, or a contractual enforcement system. A crawler can ignore it. For the broader enforcement distinction, see the guide on whether a robots.txt block actually stops AI crawlers.

Search indexing, snippet controls, training preferences, and live network blocking are separate controls. Protect confidential or paid material with authentication and server-side access controls, and monitor actual traffic separately. Publicly listing a restricted path in robots.txt can also reveal that path.

The access report evaluates User-agent, Allow, and Disallow directives. Other lines do not affect the result. Sitemap and Crawl-delay lines may matter to particular crawlers, but they are outside this access-decision report.

Verify the live file after publishing

The checker analyzes only the pasted text and entered path, so it cannot detect redirects, CDN overrides, syntax served only to certain clients, an incorrect host scope, caching delays, an unreachable file, or whether the submitted file is currently deployed.

After publishing, fetch the live /robots.txt from the exact scheme and host, confirm that it returns successfully as plain text, and then verify behavior through available operator tools or server logs. Review redirects, managed rules, CDN behavior, caching, and host scope separately because none appears in the pasted-file report.

A precedence checklist for the final review

  • Confirm that the product token selects the intended specific group before interpreting any path conflict.
  • Compare every matching path pattern and select the longest match; use Allow as the tie-break when specificity is equal.
  • Remember that product tokens are case-insensitive while paths are case-sensitive.
  • Account for * and a terminal $ when comparing paths.
  • Treat the report as a reproducible, pre-deployment protocol review rather than proof of crawler or training behavior.