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.
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 -> allowedWhy 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.
- Allow and Disallow overlapTwo rules match the same URL
- Crawler picks the wrong winnerLonger Disallow beats shorter Allow
- Page not crawledContent and links are never read
- 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
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.
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 ($).
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.
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.
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.
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
Write down the intended outcome
For each conflicting pair, note which URLs must be crawlable and which must stay blocked.
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.
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/.
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.
Put rules in the right group
Repeat any needed Allow lines inside every User-agent group that applies, because groups are not combined.
Publish and re-fetch
Upload the file to the site root, then in Search Console open Settings > robots.txt and request a recrawl.
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.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.
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.
Edit robots.txt.liquid
Go to Online Store > Themes > Edit code, and add or open the robots.txt.liquid template under Templates. Change rules there rather than relying on the default file.
Keep changes minimal
Add only the Allow or Disallow lines you need, and test the live /robots.txt afterwards.
Open SEO settings
Go to Site settings > SEO > Indexing and edit the robots.txt box. Publish the site for the change to go live.
Edit via SEO tools
Go to Marketing & SEO > SEO tools > Robots.txt Editor, change the rules and save.
Limited editing
Squarespace generates robots.txt automatically and does not let you edit it directly. Control crawling per page with the page's SEO settings instead, and check the live file for unexpected Disallow lines.
Edit the file in the web root
Change robots.txt at the root of the host, commit it to version control and deploy. Confirm the server returns it as text/plain with a 200 status.
How to confirm it's fixed
- 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
- 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.
Related issues
- SEO-002robots.txt blocks a money page or landing page directoryFix guide
- SEO-001robots.txt Disallow: / left over from staging blocks the whole siteFix guide
- SEO-006robots.txt syntax errors or unsupported directives (noindex in robots.txt)Fix guide
- SEO-003robots.txt blocks CSS or JS needed to render pagesFix guide
- SEO-011Different robots.txt on www and non-www or http and https hostsFix guide
- SEO-009robots.txt over 500 KB, rules beyond the limit ignoredFix guide