Blocked by robots.txt

On this page 7

Blocked by robots.txt is a page indexing status in Google Search Console that marks URLs Googlebot did not crawl because a Disallow rule in the robots.txt file forbids access to them. In SEO and indexing work, the status is a report of crawl permission, not an index decision: Google knows the URL exists, usually from links or a sitemap, but it has not fetched the content.

The status is often intentional, for example on internal search results, faceted filters or staging paths. It becomes a problem when important pages are blocked by mistake, when a blocked page carries a noindex directive Google can never read, or when a blocked URL still appears in results with no snippet and no description.

How a robots.txt block stops crawling

A robots.txt block works by telling a compliant crawler which URL paths it may request from a host before it requests them. The file lives at the root of each host and protocol, such as https://www.example.com/robots.txt, and its rules apply only to that exact origin. A subdomain or an HTTP version of the same site needs its own file.

The format is standardized as the Robots Exclusion Protocol in RFC 9309. Each group starts with one or more User-agent lines followed by Allow and Disallow rules. Googlebot obeys the most specific user-agent group that matches it and, inside that group, the longest matching path rule wins; when an Allow and a Disallow rule have equal length, the less restrictive Allow rule applies.

The table below shows how common rule patterns are interpreted for a sample URL.

RuleExample URLResult
Disallow: //products/shoesBlocked (entire site)
Disallow: /search/search?q=bootsBlocked (prefix match)
Disallow: /*?sort=/shoes?sort=priceBlocked (wildcard match)
Disallow: /*.pdf$/guide.pdfBlocked (end anchor match)
Disallow: /private plus Allow: /private/press/private/press/2026Allowed (longer Allow rule wins)
Disallow: with an empty value/any-pageAllowed (nothing is blocked)
How Googlebot reads typical robots.txt rules

Google caches the file for up to about 24 hours, so edits do not take effect instantly. Server responses for the file itself also matter: a 404 is treated as no restrictions, while a persistent 5xx error can pause crawling of the whole site until the file becomes reachable again.

Crawling versus indexing for blocked URLs

Blocking a URL in robots.txt prevents Google from reading the page, but it does not reliably prevent Google from listing the URL. If enough external or internal links point to a blocked address, Google can index the bare URL using anchor text and other signals, which produces the separate status Indexed, though blocked by robots.txt.

This distinction is the most frequent source of confusion, so the table compares the main tools for controlling crawling and indexing.

MechanismControlsRequires crawlingTypical use
Robots.txt DisallowCrawlingNoSave crawl budget, hide low-value paths
Meta robots noindexIndexingYesKeep a crawlable page out of results
X-Robots-Tag headerIndexingYesNoindex for PDFs and other non-HTML files
Canonical URLConsolidationYesMerge signals from duplicate versions
Password protectionAccessNot applicableKeep private content fully hidden
Robots.txt compared with other indexing controls

The critical conflict is robots.txt combined with noindex. A noindex directive works only when Googlebot can fetch the page and see it, so a URL that is both disallowed and tagged noindex may remain indexed. To remove such a page, allow crawling first, let Google process the noindex, and only then consider blocking it again.

Diagnosing the status in Search Console

Diagnosis starts in the Page indexing report, where the status lists every known URL that robots.txt kept out of the crawl. Each affected URL can be examined with the URL Inspection tool, which names the blocking rule and shows whether the page is in the index.

  • Open the status and sort the sample URLs by directory to see which path patterns dominate.
  • Use the robots.txt report in Search Console to confirm which file version Google fetched and when.
  • Run URL Inspection on representative URLs and note the reported blocking rule.
  • Compare the list against the XML sitemap; a sitemap should never contain disallowed URLs.
  • After a fix, request a recrawl and use Validate fix to track the change.

Typical findings fall into a small number of patterns, summarized below with their usual remedies.

SymptomLikely causeFix
Whole site blocked after launchStaging file with Disallow: / deployed liveReplace with the production file
Product pages blockedOverly broad prefix such as Disallow: /pUse a precise path with a trailing slash
CSS and JavaScript blockedLegacy rules for asset foldersAllow assets needed for rendering
Sitemap URLs reported blockedSitemap not aligned with robots.txtRemove disallowed URLs from the sitemap
Parameter pages still indexedDisallow used instead of noindexAllow crawling and add noindex or a canonical URL
Common causes of unwanted blocking and their fixes

When blocking pages is the right choice

Blocking is appropriate when a URL space has no search value and consumes crawl capacity. Large sites with faceted navigation, calendar pages, session parameters or internal search results can generate millions of near-duplicate addresses, and robots.txt is the most efficient way to keep crawlers away from them.

The decision table summarizes common situations and the recommended approach.

SituationRecommended approachReason
Internal site search resultsDisallow in robots.txtInfinite, thin pages with no search value
Faceted filter combinationsDisallow selected parametersProtects crawl budget on large catalogs
Thin pages already indexedNoindex, keep crawlableGoogle must see the directive to drop them
Duplicate print versionsCanonical URLConsolidates signals instead of hiding them
Confidential documentsAuthenticationRobots.txt is public and not a security control
Choosing whether to block a URL type

Robots.txt is a publicly readable file, so listing sensitive paths in it can actually advertise them. It also binds only well-behaved crawlers; scrapers and malicious bots can ignore it entirely.

Risks and common mistakes

The most damaging mistakes are small syntax changes with site-wide consequences. A single misplaced slash, a forgotten staging rule or a wildcard that matches more than intended can remove large sections of a site from the crawl within a day.

  • Blocking rendering resources such as CSS and JavaScript, which prevents Google from seeing the page as users do.
  • Relying on Disallow to deindex pages, which leaves bare URLs in results instead of removing them.
  • Path matching is case sensitive, so Disallow: /Admin does not block /admin.
  • Forgetting other hosts, such as a CDN or subdomain that serves the same content with its own file.
  • Ignoring AI crawler groups, where separate user agents may need their own rules for AI search visibility.

A plain-language summary

Every website can post a short list of rules telling search engine robots which rooms they may not enter. Blocked by robots.txt simply means Google saw a door marked no entry and respected it, so it never looked inside those pages.

That is useful for rooms nobody needs to visit, such as endless search result pages. It becomes a problem when the sign is placed on the wrong door. Keeping a robot out is not the same as keeping a page out of search results, because Google can still list an address it has only heard about.

An example from practice

An online furniture retailer with about 40,000 product pages relaunched its store on a new platform. Two days later, organic traffic began falling, and the Page indexing report showed more than 35,000 URLs as Blocked by robots.txt. URL Inspection identified the rule Disallow: / copied from the staging environment.

The SEO team replaced the file with the production version, which blocked only /search and filter parameters such as ?color=, and resubmitted the XML sitemap. Within a week most product pages were recrawled, and after about three weeks traffic returned to its previous level. The team then added an automated deployment check that fails any release in which robots.txt contains a site-wide Disallow rule.