Skip to main content

Fix Indexed, Though Blocked by robots.txt: Disallow Isn't noindex

Fix Indexed, though blocked by robots.txt: unblock the URL, then serve noindex. Disallow stops crawling, not indexing, and Googlebot may skip your * rules.

• • 9 min read
Dashboard cover for a post on fixing Indexed, though blocked by robots.txt: a Disallow rule stopping Googlebot before it can read a noindex tag, and the unblock-then-noindex fix

TL;DR — To fix Indexed, though blocked by robots.txt, decide whether you want the page in Google. If yes, delete the Disallow that matches it. If no, delete the Disallow anyway and serve noindex, because robots.txt blocks crawling, not indexing, and a blocked page can never show Google its noindex. Then check which group Googlebot actually reads: on this site’s live robots.txt, a Disallow added under User-agent: * would bind 1 of 28 crawlers, and Googlebot is not that one.

Indexed, though blocked by robots.txt is the Search Console status for a URL that Google put in its index without ever fetching it. Google learned the address from links, robots.txt told it not to crawl, and it indexed the bare URL anyway.

What Does Indexed, Though Blocked by robots.txt Mean?

It means the URL is in Google’s index, but Google hasn’t read the page. Google’s Page indexing report documentation is blunt about it: “Google always respects robots.txt, but this doesn’t necessarily prevent indexing if someone else links to your page.”

Google’s robots.txt introduction says the same thing from the other side. A robots.txt file “is not a mechanism for keeping a web page out of Google.” A disallowed URL can still appear in results, and when it does, “the search result won’t have a description.” That’s the tell. If your result shows a title built from anchor text and no snippet, you’re looking at this status.

The two robots.txt labels in Search Console mean opposite things, and a third is usually the one you wanted:

StatusCrawled?Indexed?What Google knowsUsually means
Blocked by robots.txtNoNoThe URL onlyWorking as intended, if you meant to block it
Indexed, though blocked by robots.txtNoYesThe URL plus inbound anchor textEither a page you wanted indexed got blocked, or Disallow was used to hide a page
Excluded by ‘noindex’ tagYesNoThe page, and its noindexThe correct way to keep a page out

The third row is the outcome most people with this status actually wanted. They got the second row because they reached for the wrong tool.

Why Doesn’t Disallow Keep a Page Out of Google?

Because Disallow is an instruction about fetching, and indexing doesn’t require a fetch. Google can index a URL from what other pages say about it: links, anchor text, sitemap entries.

The real trap is the combination. Teams often add both a Disallow and a noindex to be extra safe. That combination guarantees the noindex is never read. Google’s noindex documentation spells it out: “If the page is blocked by a robots.txt file or the crawler can’t access the page, the crawler will never see the noindex rule.”

Flow diagram: an external link leads Googlebot to a URL, robots.txt Disallow stops the fetch, so the noindex tag on the page is never read and Google indexes the bare URL without a snippet; the fix path removes the Disallow, Googlebot fetches the page, reads noindex, and drops the URL

So the belt-and-braces approach is what keeps the URL in the index. Removing the Disallow is the step that gets it out.

How to Fix Indexed, Though Blocked by robots.txt in 5 Steps

  1. Export the rows. In Search Console, open Indexing → Pages, click Indexed, though blocked by robots.txt, and export the list.

  2. Sort by intent. For each URL, answer one question: should this be in Google? Product pages, posts and docs: yes. Carts, internal search, staging paths and admin: no.

  3. Find the rule that blocks each URL. Run the URLs through a Google-compatible matcher such as the one below, or the robots.txt report in Search Console. Don’t eyeball it. Prefix matching, wildcards and group selection all surprise people (see the next two sections).

  4. Want it indexed? Delete or narrow the rule. Add a longer Allow for the path or remove the Disallow. Google’s robots.txt spec says it “generally caches the contents of robots.txt file for up to 24 hours,” so give it a day.

  5. Want it gone? Unblock it, then serve noindex. Remove the Disallow, add <meta name="robots" content="noindex"> or an X-Robots-Tag: noindex header, and keep the URL crawlable. Once Google recrawls it, the row moves to Excluded by ‘noindex’ tag. For anything sensitive, put it behind authentication, since noindex only controls what Google shows.

Then click Validate fix in the report and use URL Inspection → Request Indexing on the few URLs that matter most.

How Does Google Decide Which robots.txt Rule Wins?

Two rules, both from Google’s robots.txt spec, and both get misread.

Rule 1: one group, never merged. Google’s crawlers use “the group with the most specific user agent that matches the crawler’s user agent,” and “user agent specific groups and global groups (*) are not combined.” If a User-agent: Googlebot group exists, Googlebot reads only that group. Every line under User-agent: * stops applying to it.

Rule 2: longest path wins, ties go to Allow. Within the chosen group, Google picks “the most specific rule based on the length of the rule path,” and on a conflict “Google uses the least restrictive rule.” Order in the file doesn’t matter.

Rule 1 is the one that bit this site, on paper at least. I ran the matcher below against the live umesh-malik.com/robots.txt on November 16, 2026. It has 28 user-agent groups: one * group and 27 named groups (Googlebot, Bingbot, GPTBot, ClaudeBot and others), each with Allow: /. All 638 URLs in sitemap.xml and blog-sitemap.xml came back allowed for Googlebot. Then I simulated the edit everyone makes, adding Disallow: /clean/ under User-agent: *:

CrawlerGroup it readsObeys the new Disallow?
GooglebotGooglebot (named)No
Bingbot, GPTBot, ClaudeBot + 24 moretheir named groupNo
Any crawler not listed by name*Yes

One of 28. The edit looks correct, and it passes review because the * group sits at the top of the file. Every named crawler skips it. The fix is to put shared rules into every named group, or drop the named groups that just repeat Allow: /.

Grid of 28 robots.txt user-agent groups on umesh-malik.com: 27 named crawlers including Googlebot ignore a Disallow added under User-agent star, and only the catch-all group for unnamed crawlers obeys it

This matters for Indexed, though blocked by robots.txt in both directions. A Disallow you think applies to Googlebot may not. And a Disallow in a named Googlebot group can block a page you’re sure the * group allows.

Here’s the matcher. It implements both rules plus the * and $ wildcards:

JavaScript
// robots-check.mjs — Google-style (RFC 9309) robots.txt matcher.
// usage: node robots-check.mjs <robots.txt> <user-agent> <path>...
import fs from 'node:fs';

export function parse(txt) {
  const groups = []; let cur = null, lastWasUA = false;
  for (const raw of txt.split(/\r?\n/)) {
    const line = raw.replace(/#.*/, '').trim();
    const m = line.match(/^([A-Za-z-]+)s*:s*(.*)$/);
    if (!m) continue;
    const key = m[1].toLowerCase(), val = m[2].trim();
    if (key === 'user-agent') {
      if (!lastWasUA) groups.push((cur = { agents: [], rules: [] }));
      cur.agents.push(val.toLowerCase()); lastWasUA = true;
    } else if ((key === 'allow' || key === 'disallow') && cur) {
      if (val) cur.rules.push({ allow: key === 'allow', path: val });
      lastWasUA = false;
    } else lastWasUA = false;
  }
  return groups;
}

// One group set wins: the most specific matching product token. Never merged with '*'.
export function rulesFor(groups, ua) {
  const token = ua.toLowerCase();
  const named = groups.filter((g) => g.agents.includes(token));
  const pick = named.length ? named : groups.filter((g) => g.agents.includes('*'));
  return pick.flatMap((g) => g.rules);
}

const toRe = (p) => new RegExp('^' + p.replace(/[.+?^{}()|[]\]/g, '\$&')
  .replace(/*/g, '.*').replace(/\$$|$$/, '$'));

// Longest matching path wins; on a tie, allow wins (least restrictive).
export function allowed(groups, ua, path) {
  let best = null;
  for (const r of rulesFor(groups, ua)) {
    if (!toRe(r.path).test(path)) continue;
    const len = r.path.length;
    if (!best || len > best.len || (len === best.len && r.allow)) best = { ...r, len };
  }
  return { allowed: best ? best.allow : true, rule: best };
}

if (process.argv[1].endsWith('robots-check.mjs')) {
  const [file, ua, ...paths] = process.argv.slice(2);
  const groups = parse(fs.readFileSync(file, 'utf8'));
  for (const p of paths) {
    const { allowed: ok, rule } = allowed(groups, ua, p);
    console.log(`${ok ? 'ALLOW' : 'BLOCK'}  ${p}  ${rule ? `(${rule.allow ? 'Allow' : 'Disallow'}: ${rule.path})` : '(no rule)'}`);
  }
}

Run it as node robots-check.mjs robots.txt googlebot /admin/login /shop?sort=price. It prints the verdict and the exact rule that decided it, which is the question Search Console asks you to answer. It matches on the product token (googlebot), not the full user-agent string, which is how Google matches too.

Why Did a Python robots.txt Checker Disagree With Google?

Because Python’s built-in urllib.robotparser doesn’t follow Google’s rules. A lot of SEO scripts and crawl audits are built on it, so this is worth knowing before you trust one.

I ran seven common robots.txt patterns through both the matcher above and Python 3.11’s urllib.robotparser.can_fetch(), all for Googlebot:

PatternGoogle’s rulesPython stdlibWhy
Disallow: /blog/ + Allow: /blog/public/ on /blog/public/postAllowBlockstdlib takes the first matching line, not the longest
Same rules, Allow listed firstAllowAllowOrder changed the stdlib answer; Google ignores order
Disallow: /page + Allow: /page on /pageAllowBlockGoogle breaks ties toward Allow
Disallow: /*?sort= on /shop?sort=priceBlockAllowstdlib treats * as a literal character
Disallow: /*.pdf$ on /files/report.pdfBlockAllowstdlib doesn’t support $
* group disallows /admin/, Googlebot group allows /AllowAllowBoth pick the named group
Disallow: /private on /private-offersBlockBlockBoth prefix-match; add a trailing slash

Four of seven verdicts differ, and they fail in both directions. Two cases report blocked URLs as crawlable, so a “nothing is blocked” audit can be wrong about exactly the URLs Search Console is flagging. The other two report crawlable URLs as blocked.

Comparison of seven robots.txt test cases: Google's rules and Python's urllib.robotparser agree on three and disagree on four, two where stdlib wrongly says allowed because it ignores wildcards and two where it wrongly says blocked because it uses first-match instead of longest-match

The last row is the sneakiest real-world cause of Indexed, though blocked by robots.txt. Disallow: /private is a prefix, so it also blocks /private-offers and /private-sale-2026. Use Disallow: /private/ when you mean a directory.

What Else Can Block Googlebot Without a Disallow?

Server errors on robots.txt itself. Google’s spec says that on a 5xx, “for the first 12 hours, Google stops crawling the site,” then uses the last good copy for up to 30 days. A flaky robots.txt can freeze crawling site-wide. A 4xx is the opposite: Google treats it “as if a valid robots.txt file didn’t exist,” which unblocks everything.

Watch for a bot-protection layer too. If a WAF challenges Googlebot, Search Console shows crawl errors rather than this status, but the symptom (pages stuck out of the index) looks the same. That’s covered in stop Cloudflare blocking Googlebot. And if you’re editing robots.txt to manage AI crawlers, syncing AI bot blocks into robots.txt is where named groups usually multiply, and the 1-of-28 problem above comes from.

What to Check After You Fix It

Once the Disallow is gone, the URL follows the normal crawl path. If you served noindex, the label becomes Excluded by noindex tag, and that post covers making Google recrawl a page it last saw blocked. If you wanted the page indexed and it lands in Crawled – currently not indexed, Google read it and passed on the content, which is a different fix. If it sits in Discovered – currently not indexed, it’s queued but not fetched yet. If the same rule is also keeping pages you want crawled out of Google, that’s the plain Blocked by robots.txt row, which shows which robots.txt checkers disagree with Google’s parser. The AI search hub collects the rest of this technical SEO series.

FAQ

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

It means Google indexed the URL even though your robots.txt disallows crawling it. Google found the URL through links, could not fetch the page, and indexed the address anyway. Such results usually appear without a description because Google never read the content.

How do I remove a page that is indexed though blocked by robots.txt?

Remove the Disallow rule that blocks the URL, then serve a noindex robots meta tag or X-Robots-Tag header on the page. Google has to crawl the page to see the noindex, which robots.txt prevents. Once the URL drops out of the index you can leave it unblocked with noindex in place.

Is Indexed, though blocked by robots.txt bad for SEO?

Only when the label disagrees with your intent. If you wanted the page in search, the Disallow is a bug that hides its content and snippet. If you wanted it out, robots.txt is the wrong tool and the URL can keep surfacing as a bare link.

Why does Googlebot ignore my Disallow rule under User-agent: *?

Because your robots.txt also has a group named for Googlebot. Google follows only the most specific matching group and does not combine it with the * group. Any rule you want Googlebot to obey has to be repeated inside its named group.

How long does it take for Google to see a robots.txt change?

Google generally caches robots.txt for up to 24 hours, so a change can take a day to apply. After that, each URL changes status only when Googlebot recrawls it. Use URL Inspection on the most important URLs and Validate fix in the Page indexing report for the rest.

Sources

Frequently asked questions

Share this article:
X LinkedIn

Google Search · Preferred sources

Prefer this site on Google

If you already read this writing, add umesh-malik.com as a Preferred Source. Google can then highlight it with a preferred badge in Top Stories, AI Overviews, and AI Mode — for you, not as a site-wide ranking boost.

Keep reading

Get new posts on AI, Claude Code & LLMs

New deep-dives on AI engineering, Claude Code, and developer tooling — follow along however you prefer.