Find the robots.txt rule that blocks a page from Google

Blocked by robots.txt means a Disallow rule in your robots.txt file stopped Google from crawling the page, so the page isn't indexed. Google expects most of these URLs to be blocked on purpose. It's a problem only when a page you want in search matches a rule, and the fix is to narrow that rule and let Google crawl the page.

What does blocked by robots.txt mean in Search Console?

  • A rule in your site's robots.txt file blocked Google from crawling the page. Google's report guide lists this reason as URL blocked by robots.txt and says these URLs are probably blocked on purpose, so fixing and validating them doesn't always make sense. The Page indexing report guide covers it.

  • Blocking a crawl isn't the same as keeping a page out of search. Google says a very small chance remains that a blocked page gets indexed from information it finds elsewhere, and its URL can then appear with no description. The Page indexing report guide lists that as a separate status, Indexed, though blocked by robots.txt, and the robots.txt introduction explains the missing description.

Why a page you want indexed is blocked

  • A short Disallow path matches more

    Rules match the start of the path, so Disallow: /p blocks /pricing and /products as well as /p/.

  • A wildcard catches clean URLs

    An asterisk matches any run of characters, so a pattern written for one parameter can match far more addresses than you meant.

  • Google follows its own group

    A crawler follows only the most specific group that matches it. A group for Googlebot replaces the asterisk group for Google, so check the rules under it.

  • Another host has its own file

    Rules apply only to the host, protocol and port that serve the file, so a subdomain or the www version can block pages the main file allows.

  • A whole-site rule survived a launch

    Disallow: / under the asterisk group blocks every page. Google's guide says a drop in indexed pages without new errors can mean robots.txt is blocking existing pages.

Google's robots.txt specification explains how its crawlers match paths and choose a group, and the Page indexing report guide covers drops in indexed pages.

How to fix blocked by robots.txt

  1. Confirm the block in URL InspectionInspect the URL. Crawl allowed shows whether your site let Google crawl the page or blocked it with a robots.txt rule.
  2. Decide whether the block is intendedAdmin pages, carts and endless filter combinations are often blocked on purpose. Leave those alone.
  3. Find the rule that matchesOpen the robots.txt file on the URL's exact host. In the group Google follows, find the longest Disallow path that matches the URL.
  4. Narrow or remove the ruleDelete the rule or add an Allow rule for the path you want crawled. When both match, Google follows the longer path, and the less restrictive rule on a tie.
  5. Validate the fixOnce the important URLs are unblocked, start validation in the Page indexing report. Google says it typically takes up to about two weeks.

How fast Google sees a robots.txt change

Google generally caches robots.txt for up to 24 hours, as its robots.txt specification says, so a narrowed rule may not apply right away. After you unblock important URLs, its robots.txt report lets you request a recrawl of the file, though Google notes that doesn't guarantee an immediate recrawl of the unblocked URLs.

Don't use robots.txt to keep a page out of search

  • To make sure a page stays out of Google, its report guide says to remove the robots.txt block and use a noindex rule. A blocked page hides that rule, because Google reads robots meta tags and headers only when it crawls, as its robots meta tag reference explains. Putting the page behind a login works too.

  • Take care with CSS and JavaScript as well. Google's robots.txt introduction says you can block unimportant scripts and style files, but not ones Google needs to understand the page.

Frequently asked questions

Should I fix every URL blocked by robots.txt?

No. Google's report guide says URLs blocked by robots.txt are probably blocked on purpose and that fixing and validating them doesn't always make sense. Unblock only the pages you want in search.

Why did my blocked by robots.txt count jump?

A new rule is likely blocking a large section of the site. Google's report guide names that as one of the most common reasons for many unindexed pages and says to unblock the pages if they're the wrong ones. Check what changed in the file, and check your sitemap, since a sitemap that lists blocked URLs can also cause a spike.

Will unblocking a page get it indexed?

Not by itself. Google still has to crawl the page and decide to index it, and Google's URL Inspection help says a request to index a page doesn't guarantee it'll appear in the index.