WebmasterID logoWebmasterID
Robots & crawl control

robots.txt path matching and case sensitivity

robots.txt path rules are compared against the URL path, and that comparison is case-sensitive: /Page and /page are different. This page covers how Google matches paths, why case and encoding matter, and how trailing characters and wildcards change the rule that applies.

Verified against primary sources

Case sensitivity and the path

Google documents that robots.txt rules apply to the URL path and that path matching is case-sensitive. So Disallow: /Folder/ does not block /folder/ — the casing must match. If your site serves the same content under multiple casings, you may need rules for each, or better, canonical URLs that avoid the ambiguity.

Matching is against the path portion of the URL, so include the leading slash and the exact segments you mean.

Prefix behaviour and trailing characters

Without a wildcard, a path rule matches as a prefix: Disallow: /news matches /news, /news/, and /newsletter. Add a trailing slash (/news/) to scope to a folder, or anchor the end with $ where supported (Disallow: /report.pdf$) to match an exact ending.

Percent-encoding also matters: the path is compared as it appears, so be consistent about encoded characters. When several rules match, the most specific (longest) one wins between Allow and Disallow.

How it appears in analytics and logs

If a rule does not match a URL you expected, a case or encoding mismatch is a common cause — robots.txt path matching is case-sensitive and operates on the path as written.

Diagnostic use case

Write path rules that match the exact URLs you intend, accounting for case sensitivity and prefix behaviour, so you neither over- nor under-block.

What WebmasterID can help detect

WebmasterID shows which paths crawlers fetch, so you can confirm a case-sensitive rule matches the exact URLs you meant and no others.

Common mistakes

Privacy and accuracy notes

Path matching is public configuration. It involves no visitor data; do not list sensitive paths expecting them to be hidden.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.