Blocked by Robots.txt? How to Find the Matching Rule

Diagnose a blocked-by-robots.txt result with Googlebot group selection, Allow and Disallow examples, and a workflow for testing draft and live rules safely.

SharePost on XShare on LinkedIn
Watercolor illustration of a small crawler following branching cobalt paths through blue and coral access gates

The short answer

Identify the exact crawler, final host and path, then inspect the live robots.txt file. Select the applicable user-agent group and compare matching Allow and Disallow paths; the most specific matching rule determines access. Confirm the restriction’s purpose before changing it, and verify indexing separately.

Overhyped Robots.txt Tester showing that Googlebot is allowed to request the Overhyped homepage
Live Overhyped robots.txt test captured 30 August 2026. The result applies to the selected crawler and path.

A robots.txt file can look like a top-to-bottom list of instructions. Crawlers do not simply stop at the first line that resembles the URL.

They first select the applicable crawler group, then compare matching path rules by specificity.

Diagnose a blocked-by-robots.txt result

  1. Record the exact URL and crawler, such as Googlebot. Confirm the final host after redirects; a different host can have a different robots.txt file.
  2. Fetch the public /robots.txt file for that host. Confirm that you are reading the deployed policy, not a local draft or a staging file.
  3. Use the Robots.txt Tester with Googlebot and the exact path. Leave pasted rules empty to test the live file.
  4. Read the applicable group, matching rule and decision. Do not assume the first rule in the file wins.
  5. Confirm whether the restriction is intentional before changing the responsible CMS setting or file.
  6. Test the proposed rules separately, publish through the policy owner, clear the pasted draft, and recheck the live host.

An Allowed result describes this rule evaluation. It does not certify Google’s current indexed state, rendering, authentication or actual crawler visits.

Example: disallow a directory but allow a narrower path

User-agent: *
Disallow: /draft/
Allow: /draft/example/

For a crawler using this group, /draft/notes/ is blocked. /draft/example/start/ matches the longer Allow exception and is allowed. The paths are case-sensitive: test the exact spelling rather than assuming uppercase and lowercase behave identically.

This hypothetical example demonstrates matching, not a recommendation to block a real directory. If a more specific named group applies to Googlebot, evaluate that group instead of assuming these wildcard rules govern it.

Why a URL can be indexed though blocked by robots.txt

Crawl permission and indexed state are different questions. Google can discover a blocked URL through links and may show the URL without having crawled its content. A robots block does not reliably remove a page from search.

Google must be able to retrieve a page to see its noindex directive. Do not add a noindex rule to robots.txt or combine controls blindly. Decide whether the page should be crawlable and searchable, excluded from search, or protected by authentication, then use the appropriate control. Google explains the access requirement in its noindex documentation.

Use Search Console URL Inspection on a verified property for Google’s evidence. Compare the crawl date with the deployment: an old stored result does not prove the current rule change failed. Preserve deliberate restrictions and security controls while diagnosing.

Select the crawler group first

A group begins with one or more User-agent lines followed by its rules. A crawler looks for the most specific user-agent token that matches its name. The wildcard group applies when no more specific group matches.

For example:

User-agent: ExampleBot
Disallow: /private/

User-agent: *
Allow: /

ExampleBot uses its named group rather than combining it with the wildcard group. Google documents this group selection in its robots.txt specification guidance.

Use the longest matching path

Within the applicable group, compare every Allow and Disallow path that matches the requested URL path. The rule matching the most characters is the most specific.

User-agent: *
Disallow: /private/
Allow: /private/public-example/

The path /private/public-example/page matches both rules. The longer Allow rule wins, so the crawler is allowed to request that path.

The standardized Robots Exclusion Protocol defines this most-specific-match behaviour in RFC 9309.

Allow wins an equal-length conflict

When an Allow and Disallow rule match the same number of characters, the Allow rule is used under the RFC model. Google describes the same least-restrictive result for equal rules.

Rule order is therefore not a reliable way to resolve a tie. Make the intended exception explicit and test the exact path.

Wildcards and end anchors need care

Google supports * as a wildcard and $ as an end-of-path marker in rule values. A pattern such as /*.pdf$ is narrower than a plain / block, but small punctuation changes can alter which paths match.

Crawler implementations are not identical. Test named crawlers against the syntax they document rather than assuming every agent supports every extension.

No matching rule normally means allowed

An empty Disallow value does not block the site. When no applicable Allow or Disallow path matches, crawling is normally allowed.

That does not guarantee that the crawler will visit the page. It only means this robots.txt evaluation did not prohibit the request.

What a robots test cannot prove

A deterministic tester can identify the applicable group, matching rule, and resulting Allow or Disallow decision for the text it receives. It cannot prove that a crawler will visit, render, index, cite, or rank the page.

Robots.txt is also not authentication. The file is public, and disallowed URLs can still be discovered from links. Google’s robots.txt introduction warns against using it to keep web pages out of Search or to protect sensitive information.

A safe rule-testing workflow

  1. Name the exact crawler you want to test.
  2. Use the URL path, including relevant query text when the crawler’s syntax supports it.
  3. Test the current live file and any proposed replacement separately.
  4. Record the selected group and exact matching rule.
  5. Check important public paths as well as intended blocked paths.
  6. Deploy the file at the site root as /robots.txt.
  7. Fetch the public file and repeat the same tests.

Use the free Robots.txt Tester to evaluate a named crawler and path against live or pasted rules.

Method note: the tester uses deterministic group and longest-path matching for the supplied crawler and rules. It reports policy evidence, not crawler behaviour or indexing. Last reviewed 17 October 2026.

Continue learning

Keep moving with a closely related topic and a free tool you can use immediately.

Watercolor illustration of repeated webpage labels becoming distinct after a shared template is repaired

How to Fix Duplicate Title Tags and Meta Descriptions

Diagnose repeated metadata across URLs, competing tags in one page, and matching H1/title wording with a worked example and a safe template repair workflow.

Watercolor illustration of a cobalt link path meeting one coral break while other paths fade behind cream mist

How to Fix Broken Links Without Removing Useful References

Learn how to fix broken links with a worked example, internal-link repair choices, and checks that separate missing pages from redirects or unavailable responses.

Watercolor illustration of cobalt content cards connected by clear coral paths across textured cream paper

What a Useful Internal Link Tells People and Search Engines

Review crawlable internal links, descriptive anchor text, destination intent, and page-level evidence without pretending one page reveals a whole site architecture.