Skip to content
Application notes · 8 min read

Part of Page Indexing Report in Google Search Console: Every Status Explained

Blocked by robots.txt in Search Console: Meaning and Fix

Blocked by robots.txt means a rule stops Googlebot from crawling the URL. How to find and test the rule, fix it, and why it never deindexes a page.

Blocked by robots.txt in Google Search Console means a rule in your site's robots.txt file stops Googlebot from crawling the URL, so Google can't read the page. Google's Page indexing report help lists it under the heading URL blocked by robots.txt. It's expected for carts, internal search and admin paths, and a mistake on pages you want in search. Either way, a robots.txt rule controls crawling only: it never removes a page from Google's index.

It's one of the reasons in the page indexing report. This guide covers how to test the rule, fix it and confirm Google read the new file.

What Blocked by robots.txt means

The help page adds that the block doesn't guarantee the page won't be indexed some other way, and Google's robots.txt introduction says the file “is not a mechanism for keeping a web page out of Google.” It manages crawler traffic.

In URL Inspection, Crawl allowed? reads No and Page fetch shows a failure. Indexing allowed? reads Yes, which isn't a contradiction: the URL Inspection help says that field always shows Yes on a blocked page, because Google can't see a noindex it isn't allowed to fetch. The URL Inspection API returns robotsTxtState: DISALLOWED and pageFetchState: BLOCKED_ROBOTS_TXT (UrlInspectionResult reference).

Three neighbors are easy to confuse with it:

Submitted URL blocked by robots.txt

Older guides use this name: the former Index Coverage report counted a blocked URL you had submitted as an error, which Google's January 2021 post about that report calls “submitted but blocked.” The Page indexing report now uses one reason for submitted and unsubmitted URLs alike. To see only the blocked URLs your sitemaps list, set the filter above the chart to All submitted pages. A sitemap that lists blocked URLs asks Google to crawl pages it may not fetch, and Google's help names it as a cause of error spikes. Give each URL one answer: unblock it, or drop it from the sitemap.

Decide whether the block is intended

Many blocks are deliberate. Leave the rule for carts, checkout and account pages, internal search, sort and filter parameters, and admin paths. Shopify's default file blocks cart and checkout pages, and Shopify says it works for most stores. Fix it when it blocks a page you want in search, a whole section, or CSS and JavaScript a page needs: Google's robots.txt introduction says not to block resource files when that makes the page harder for Google to understand.

How to test the rule that blocks the URL

  1. Confirm it in URL Inspection. Inspect the URL with the URL inspection tool. Google's guide to unblocking a page says the Page indexing section will read Blocked by robots.txt.
  2. Open the file Google reads. A robots.txt file covers only its own host, protocol and port: https://example.com/robots.txt doesn't apply to http://example.com/, and a subdomain needs its own file (How Google interprets the robots.txt specification). Fetch the live file, not the one in your repository: a CDN can change it on the way out, as Cloudflare's managed robots.txt does, when it's turned on, by prepending its own rules.
  3. Check what Google has cached. The robots.txt report, in Search Console's settings, shows the files Google found for the top 20 hosts on your site, when each was last checked and its fetch status. Versions lists the last 30 days of fetches whose result changed, so you can see when a rule appeared. It's available only for domain-level properties: a Domain property, or a URL-prefix property without a path.
  4. Test it locally. Google publishes its robots.txt parser as open source: the C++ library Googlebot uses, slightly modified. It prints ALLOWED or DISALLOWED and exits 0 or 1, so it also works as a CI check before a deploy.
# live file, and the status code it returns
curl -sS https://example.com/robots.txt
curl -sS -o /dev/null -w "%{http_code}\n" https://example.com/robots.txt

# Google's parser, built with Bazel from github.com/google/robotstxt
bazel run robots_main -- ~/robots.txt Googlebot https://example.com/pricing

As of November 2026, the Page indexing help still tells you to use a robots.txt tester. In Search Console that job now falls to URL Inspection and the robots.txt report, and Google's 2014 post on the old tester points readers to the newer report.

How Google matches a rule

Google's specification, which follows RFC 9309, works in two steps. First the group: a crawler obeys the group with the most specific matching user agent and ignores the rest, so Googlebot reads a User-agent: Googlebot group instead of *, never both. Then the rule: the longest matching path wins, and on a tie between Allow and Disallow, Google uses the less restrictive one. Paths are case-sensitive and match from the start; * matches any characters and $ marks the end of the URL.

User-agent: *
Disallow: /cart/
Disallow: /p
Disallow: /*?

User-agent: Googlebot
Disallow: /drafts/

Googlebot follows only the last group, so for it only /drafts/ is blocked: to keep it out of /cart/, repeat that rule in its group. Crawlers that match only *, such as Bingbot, get the first group, where Disallow: /p also blocks /pricing and /products/ (Google's own example: /fish matches /fishheads), and Disallow: /*? blocks every URL with a query string, pagination like ?page=2 included.

Rules that block pages by mistake

  • A leftover Disallow: /. Staging and pre-launch files get deployed. When a framework generates the file, read the condition as your production server will evaluate it.
  • A prefix or wildcard broader than intended. End directories with a slash (/p/), anchor exact paths with $, and give Googlebot's group every shared rule it needs.
  • Rules meant for AI crawlers. A group for GPTBot or Google-Extended doesn't touch Googlebot, and Google says Google-Extended doesn't affect inclusion in Google Search. A Disallow added under * to stop them does. More in GPTBot and AI crawlers in robots.txt.

In Next.js, app/robots.ts returns the file as an object (Next.js robots.txt docs). A common pattern blocks everything outside production:

import type { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
  if (process.env.VERCEL_ENV !== "production") {
    return { rules: { userAgent: "*", disallow: "/" } };
  }
  return {
    rules: { userAgent: "*", allow: "/" },
    sitemap: "https://example.com/sitemap.xml",
  };
}

On Vercel, VERCEL_ENV is production, preview or development (system environment variables). Deploy the same code to a host that doesn't set it and production serves Disallow: /. And since Next.js caches robots.ts by default, the condition usually runs at build time.

How to fix Blocked by robots.txt

  1. Edit or remove the rule. To open one path inside a blocked directory, add a longer Allow, which wins because it's more specific:
    User-agent: *
    Disallow: /docs/
    Allow: /docs/public/
    Edit it where your platform generates it. On Shopify that means a robots.txt.liquid theme template, which Shopify calls an unsupported customization. For hosts such as Wix, Joomla or Drupal, Google's unblocking guide points to the provider's documentation.
  2. Deploy and check the live file. Run the curl commands again: a 200 and the new rule.
  3. Refresh Google's copy. Google generally caches robots.txt for up to 24 hours. In the robots.txt report, open the file's menu and choose Request a recrawl (Updating your robots.txt file).
  4. Run the live test. In URL Inspection, Test live URL should now show Crawl allowed? Yes; Google won't take an indexing request for a page the live test finds non-indexable. Then request indexing for the few URLs that matter. Crawling can take a few days to a few weeks, and requesting the same URL again won't speed it up.
  5. Validate the fix, if it fits. Validate fix typically takes up to about two weeks, per the Page indexing help. Search Console first checks a few URLs under the reason and ends validation if any still has the issue, so it's unlikely to pass while URLs you block on purpose remain there. In that case, follow the unblocked URLs in URL Inspection instead. More in validate fix in Search Console.

When robots.txt itself fails

A robots.txt file Google can't fetch is a different problem from a rule that blocks a URL, and it changes crawling for the whole host. Per Google's specification, a 4xx other than 429 counts as no robots.txt, so nothing is blocked. A 5xx or network error stops Google crawling the site for 12 hours while it retries, then it uses the last good copy for up to 30 days. Google also reads only the first 500 KiB of the file. The robots.txt report's fetch status shows these problems.

Why robots.txt never removes a page from the index

Disallow stops Googlebot from fetching a page, not from indexing the URL: Google's introduction says a disallowed page can still be indexed if other sites link to it, shown without a description. A blocked page also hides its own noindex: per Google's page on blocking indexing, the crawler “will never see the noindex rule.”

To keep a page out of Google, let it be crawled and use one of these:

  • a noindex robots meta tag, or an X-Robots-Tag: noindex header for non-HTML files;
  • a 404 or 410 status, or a password, for content that should be gone or private;
  • the Removals tool to hide a URL for about six months while one of the above takes effect. The same help page says not to use robots.txt as a blocking mechanism.

Keep the page crawlable for as long as you rely on its noindex: add a Disallow later and Google can no longer see the noindex, so links can bring the URL back. A noindex line inside robots.txt doesn't work either: Google stopped supporting it on September 1, 2019 (see robots.txt noindex). WordPress drew the same conclusion in 5.3: its option to discourage search engines replaced Disallow: / with a noindex meta tag, because a site doesn't have to be crawled to be listed.

How IndexCyborg flags blocked URLs

IndexCyborg builds its URL list from your sitemaps, so a blocked URL it flags is usually a submitted URL blocked by robots.txt. Its technical checks fetch your live robots.txt, apply the Googlebot rules to each URL's path (longest match, Allow on a tie) and raise a Blocked by robots.txt issue with the blocked path as evidence, which resolves itself once a later check finds the URL allowed. After a deploy, the MCP tool check_technical_seo with queue_fresh_check runs the check again. With Search Console connected, Google's coverageState is stored word for word alongside it, and GET /v1/sites/{id}/urls?status=blocked_robots lists the pages Google reports as blocked.

When the Chrome extension picks pages to request on its own, it skips URLs Google reports as blocked by robots.txt: a request can't help while the rule is there. Once it's gone, queue the URLs by name with the MCP tool request_google_indexing or POST /v1/sites/{id}/google-indexing, which skips that filter, within 10 requests per property per rolling 24 hours. A request asks Google to crawl the page, not to index it. More on the features page.

Frequently asked questions

Is Blocked by robots.txt bad for SEO?

Not on its own. It means Google respected a rule in your robots.txt file. It only costs you when the rule covers pages you want in search, or CSS and JavaScript files those pages need to render. For carts, internal search and admin paths it is the expected outcome.

How long does Google take to notice a robots.txt change?

Google says it generally caches robots.txt for up to 24 hours. You can ask for a fresh fetch with Request a recrawl in Search Console's robots.txt report. The unblocked pages still have to be crawled again before their status changes, which Google says can take a few days to a few weeks.

Why does Search Console say a page is blocked when my robots.txt allows it?

Usually Google is reading a different file than you are: an older cached copy, the robots.txt of another host or protocol, or a version your CDN changed on the way out. Also check for a User-agent: Googlebot group, which Googlebot follows instead of the User-agent: * group, not in addition to it.

Does blocking AI crawlers in robots.txt affect Google Search?

Not if the rules name only AI crawlers. Google says the Google-Extended token doesn't affect a site's inclusion in Google Search. A Disallow under User-agent: * is different: it applies to Googlebot too unless Googlebot has its own group.

Should I block CSS and JavaScript files in robots.txt?

Not the ones your pages need. Google says you can block unimportant resource files, but not when their absence makes the page harder for Google to understand. If Googlebot can't load the scripts and styles that build the page, it may not see the content you want indexed.