Blocked by robots.txt in Search Console: How to Fix It

"Blocked by robots.txt" means a Disallow rule in your robots.txt file stops Googlebot from crawling the URL. For cart, checkout and internal search pages that is exactly what you want. For a service page, a product or an article, it keeps the page out of Google.

The fix is to find the rule that matches the URL and narrow it, without opening the pages that should stay blocked.

Blocked vs indexed, though blocked

The two robots.txt statuses in the Page indexing report
StatusIn the index?What happenedWhat to do
Blocked by robots.txtNoGoogle is not allowed to crawl the URL and did not index itUnblock it if it should rank; otherwise leave it
Indexed, though blocked by robots.txtYes, without contentLinks led Google to index the URL without reading itUnblock it if it should rank; if not, allow crawling and add noindex

robots.txt controls crawling, not indexing. To keep a page out of the results, Google has to be able to crawl it and see a noindex tag. Blocking and noindexing the same URL cancels the noindex.

Rules that block pages by accident

# Copied from staging: blocks the whole site
User-agent: *
Disallow: /

# Too broad: blocks every URL with a query string,
# including paginated categories and tracked landing pages
Disallow: /*?

# Blocks the files Google needs to render the page
Disallow: /wp-content/
Disallow: /assets/

How to fix "Blocked by robots.txt"

  1. Export the blocked URLs. Open the status in the Page indexing report and export the examples. Sort them into pages that should rank and pages that should stay out.
  2. Leave the right ones blocked. Cart, checkout, account, internal search and endless filter combinations are meant to be blocked. Nothing to fix there.
  3. Find the rule that matches. Run URL Inspection on a page that should rank. "Crawl allowed? No: blocked by robots.txt" confirms it; then find the Disallow line whose path matches the start of the URL.
  4. Narrow or remove the rule. Delete rules left from staging, and replace broad patterns like /*? with the exact parameters you want blocked.
  5. Check the live file. Open the robots.txt report in Search Console settings to see the version Google fetched and when. Google caches the file for up to a day, and you can ask for a recrawl there.
  6. Validate the fix. Click Validate fix in the Page indexing report and request indexing for the most important pages.

A safe starting point for most stores and service sites blocks only what has no search value:

User-agent: *
Disallow: /cart
Disallow: /checkout
Disallow: /account
Disallow: /search
Disallow: /*?sort=
Disallow: /*?filter=

Sitemap: https://example.com/sitemap.xml

When two rules match the same URL, Google follows the most specific one, the one with the longest path. If an Allow and a Disallow are equally specific, the Allow wins.

When robots.txt itself fails

If robots.txt returns 404, Google crawls everything. If it returns a server error or times out, Google stops crawling the whole site for a while and then falls back to the last copy it read. A firewall or CDN that blocks the file for Googlebot can keep an entire site out of the index, and in URL Inspection it shows up as "Not available due to a site-wide issue".

Large stores often block filters on purpose to save crawl budget; how to choose what to block is in ecommerce technical SEO and "Discovered - currently not indexed".

Questions about robots.txt

What does "Blocked by robots.txt" mean in Search Console?

It means a Disallow rule in your robots.txt file stops Googlebot from crawling the URL, so Google cannot read the page. It is correct for pages like cart, checkout and internal search, and a problem only when the blocked URL is one you want in search results.

What does "Indexed, though blocked by robots.txt" mean?

Google indexed the URL without crawling it, because other pages link to it. It can appear in results without a description. If the page should rank, remove the block. If it should not, allow crawling and add a noindex tag, because Google can only see noindex on pages it is allowed to crawl.

Does robots.txt remove a page from Google?

No. robots.txt controls crawling, not indexing. A blocked page that has links pointing to it can stay indexed. To remove a page, let Google crawl it and add noindex, return 404 or 410, or use the Removals tool for a fast temporary hide.

Where is the robots.txt Tester in Search Console?

Google retired the robots.txt Tester in 2023 and replaced it with the robots.txt report under Settings, which shows the file Google fetched, when, and any parsing problems. To test a single URL, use URL Inspection: it says whether crawling is allowed.

Why does Shopify show "Blocked by robots.txt"?

Shopify's default robots.txt blocks cart, checkout, account, internal search and some filtered collection URLs. Those entries are expected. Edit robots.txt.liquid only if a page you want indexed is blocked, and keep the default rules.

Not sure which rule is blocking you?

Send the site and one blocked URL that should rank. I reply with the rule that matches it and the safe change.

Your details are only used to reply to you.

Page updated on .