Skip to content
FunnelGuard

Fix guide by FunnelsGuard

robots.txt Allow vs Disallow conflicts blocking pages: fix

SEO-008Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

A robots.txt file tells crawlers which paths they may fetch. It uses Disallow to block a path and Allow to make an exception inside a blocked area. A conflict happens when two rules match the same URL and point in opposite directions.

Google does not read the file top to bottom. It picks the matching rule with the longest path (the most specific one). If an Allow and a Disallow match with the same length, Google uses the Allow. Bing also supports this logic, but some smaller crawlers simply use the first matching rule, so the same file can behave differently by crawler.

A conflict that looks fine but is nottext
User-agent: *
Allow: /shop/
Disallow: /shop/*?*
Disallow: /shop/sale

# /shop/sale/summer-offer  -> blocked (Disallow: /shop/sale is longer than Allow: /shop/)
# /shop/shoes?color=red     -> blocked (longer Disallow pattern wins)
# /shop/shoes               -> allowed

Why it costs you leads or sales

If a landing page, product category or blog post is blocked by an accidental conflict, search engines cannot crawl it. It may drop out of results or show with no description, and AI search tools that respect robots.txt may skip it. You lose organic visits to pages that were meant to bring in leads or sales, and nothing on the page looks broken when you open it in a browser.

The problem is easy to miss because it is partial. The home page works, so the site looks healthy, while one directory or a set of URLs quietly stops being crawled.

How a rule conflict hides a page
  1. Allow and Disallow overlapTwo rules match the same URL
  2. Crawler picks the wrong winnerLonger Disallow beats shorter Allow
  3. Page not crawledContent and links are never read
  4. Organic visits fallFewer leads and sales from search

The page works for visitors, but the crawler never reaches it.

How to check if your site has it

Find conflicting rules
  1. Open your live robots.txt

    Go to https://yourdomain.com/robots.txt and read it. Look at every group that applies to User-agent: * and to Googlebot.

  2. List overlapping paths

    Mark any Allow and Disallow lines where one path starts with, or matches, the other. Pay attention to wildcards (*) and the end-of-URL marker ($).

  3. Test key URLs in Google Search Console

    Open Settings > robots.txt report to see the version Google fetched, then use the URL Inspection tool on a key page. It shows whether the page is blocked by robots.txt.

  4. Check the Pages report

    In Search Console, open Indexing > Pages and look for the reason 'Blocked by robots.txt'. Compare the listed URLs with pages you want indexed.

  5. Run a crawler

    Crawl the site with a desktop SEO crawler that respects robots.txt and filter for URLs reported as blocked. Check whether any are pages you want in search.

How to fix it

The goal is a file where each URL has one clear answer. Start by deciding what you want crawled, then write the rules so the intended winner is also the longest match.

Making the Allow the more specific rule

Before: ambiguous

  • Disallow: /resources/
  • Allow: /resources/guides/
  • Disallow: /resources/guides/drafts*
  • Result: Allow wins for guides, but drafts and similar URLs stay blocked in ways nobody planned

After: explicit

  • Disallow: /resources/drafts/
  • No broad Disallow on /resources/
  • Guides are open by default
  • Result: one clear rule, same answer in every crawler
Fix conflicting rules
  1. Write down the intended outcome

    For each conflicting pair, note which URLs must be crawlable and which must stay blocked.

  2. Prefer removing the overlap

    Narrow the broad Disallow so it no longer covers the pages you want open. This works in every crawler, unlike relying on precedence.

  3. If you need an exception, make the Allow longer

    The Allow path must be longer (more characters) than the Disallow it overrides. For example, Disallow: /private/ with Allow: /private/press-kit/.

  4. Handle wildcards carefully

    Patterns like /*?* count by character length, so a short Allow may lose to a wildcard Disallow. Add an explicit longer Allow, or avoid the wildcard.

  5. Put rules in the right group

    Repeat any needed Allow lines inside every User-agent group that applies, because groups are not combined.

  6. Publish and re-fetch

    Upload the file to the site root, then in Search Console open Settings > robots.txt and request a recrawl.

Example: allow one file type inside a blocked foldertext
User-agent: *
Disallow: /internal/
Allow: /internal/public-report.pdf

# Allow is longer than Disallow for that one file, so Google crawls it.
# Everything else under /internal/ stays blocked.
Where to edit robots.txt by platform
  1. Check for a physical file first

    If a robots.txt file exists in the site root, edit it over SFTP or your host's file manager. If not, WordPress serves a virtual one.

  2. Use your SEO plugin's editor

    Yoast SEO (Tools > File editor) and Rank Math (General Settings > Edit robots.txt) let you edit the file when it is writable. Also check Settings > Reading that 'Discourage search engines' is off.

How to confirm it's fixed

Confirmation checklist
  • Live /robots.txt shows the new rules
  • Search Console Settings > robots.txt shows the latest fetch with no errors
  • URL Inspection on each affected page no longer says blocked by robots.txt
  • A desktop crawler reports the intended pages as crawlable
  • Pages that must stay private are still blocked
  • The Pages report 'Blocked by robots.txt' list shrinks over the following weeks

How to prevent it happening again

Habits that stop conflicts
  • Keep robots.txt short and comment each block of rules
  • Avoid broad Disallow rules with narrow Allow exceptions when you can
  • Store the file in version control and review changes like code
  • Test a list of must-index URLs after every edit
  • Re-check after theme, plugin, platform or migration changes that rewrite the file
  • Use noindex meta tags or authentication for pages that must be kept out of results, not robots.txt alone

How FunnelGuard handles this

FunnelGuard does not check this yet. Reading robots.txt rules and testing which URLs they block is a possible future check, but it is not something the service does today.

What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step, the tracking hits and whether test leads arrive. That covers what happens after a visitor lands on your site, not whether search crawlers can reach a page.

To watch for robots.txt conflicts today, keep the file in version control, re-test your key URLs in Google Search Console after each change, and run a desktop SEO crawler on a schedule. A free read-only FunnelGuard website audit is also available if you want a broader look at your site.

Questions people ask

Which wins in robots.txt, Allow or Disallow?

For Google, the rule with the longest matching path wins, whether it is Allow or Disallow. If an Allow and a Disallow match with equal length, Google uses the Allow. Some other crawlers use the first matching rule instead, so do not rely on precedence alone.

Why is my robots.txt Allow rule not working?

Usually a longer or more specific Disallow matches the URL, so it wins over your shorter Allow. Another common cause is a separate User-agent group for Googlebot, which makes Googlebot ignore the Allow in the * group. Make the Allow path longer than the Disallow and repeat it in the right group.

Does the order of rules in robots.txt matter?

For Google, no. It chooses by specificity, not by order in the file. Some other crawlers read top to bottom and use the first match, so putting the Allow before the related Disallow is a sensible habit.

How do I test if a URL is blocked by robots.txt?

Open Google Search Console and run the URL Inspection tool on the page. It reports whether the page is blocked by robots.txt. You can also check the robots.txt report under Settings to see the file Google last fetched, and use a desktop SEO crawler to test many URLs at once.

How do I allow one page inside a disallowed folder?

Add an Allow line with the full path of that page, such as Allow: /private/press-kit/, below Disallow: /private/. The Allow is longer, so Google crawls that page while the rest of the folder stays blocked.

Do wildcards change which robots.txt rule wins?

Yes, because the length of the pattern counts. A wildcard rule like Disallow: /*?* can be longer than a short Allow and win. Add a longer, explicit Allow for the URLs you need, or narrow the wildcard.

Does FunnelGuard check robots.txt for conflicting rules?

No. This is not a check FunnelGuard runs today, although it is a possible future one. Use Google Search Console and a scheduled SEO crawl to watch for it.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.