Choose whether a blocked page should be in Google
Indexed, though blocked by robots.txt means Google put the URL in its index without crawling it: a robots.txt rule stops Googlebot from fetching the page, but links from other pages told Google it exists. The search result shows little or no description. To get a proper listing, unblock the page. To keep it out of Google, remove the block and add noindex, because Google never sees a noindex rule on a page it isn't allowed to fetch.
Why Google indexes a page it was told not to crawl
robots.txt controls crawling, not indexing. Google obeys the rule and doesn't request the page, but it can still index the address from what points to it, such as the anchor text of links on other sites. Since it never read the page, it has no page text to build a description from. Google's robots.txt introduction explains this limit of the file.
The Page indexing report guide lists this status as a warning in the Improve page experience table, not among the reasons pages aren't indexed. The URL is in Google's index; the listing is just one Google assembled without seeing the content.
What to change for each outcome
| You want the page | In robots.txt | On the page itself |
|---|---|---|
| In Google with a full result | Remove the Disallow rule that matches it, or narrow it so this path is allowed. | Nothing, as long as the page answers 200 and has no noindex rule. |
| Out of Google search results | Remove the rule for this URL so Googlebot can fetch the page again. | Add a robots meta tag with noindex, or send an X-Robots-Tag: noindex header for PDFs and other files. |
| Visible only to signed-in people | No rule is needed, since a login already keeps crawlers out. | Require a login, so Googlebot gets a 401 or 403 instead of the content. |
How to fix indexed though blocked by robots.txt
- Inspect one of the reported URLsURL Inspection shows that the page is indexed and that crawling isn't allowed. Note the exact host, because a subdomain or the www version has its own robots.txt.
- Find the rule that blocks itOpen the robots.txt report under Settings to see the file Google last fetched for that host, then find the Disallow path in Googlebot's group that matches the URL.
- Unblock pages that belong in searchDelete or narrow that rule. Google refreshes the listing the next time it crawls the page and reads its content.
- Let Google crawl pages that should drop outRemove the rule for those URLs and serve noindex on them. Keep them crawlable afterward, since a page blocked again hides its noindex rule from Google.
How long the listing takes to go away
Google has to crawl the page again before it sees the noindex rule, and its noindex guide says that can take months for a page that isn't important on the web. For a handful of URLs, a recrawl request in URL Inspection can move things along.
When a page has to disappear sooner, the Removals tool hides a URL from Google's results for about six months. It's temporary, so the noindex rule still has to be in place, and crawlable, by the time the removal runs out.
Frequently asked questions
Can I put noindex in robots.txt instead?
No. Google retired its handling of noindex and other unpublished rules in robots.txt on September 1, 2019, so a noindex line there does nothing in Google. Put the rule on the page as a meta tag or an X-Robots-Tag header. Google's announcement has the background.
Why did Google index URLs that nothing on my site links to?
Something else does. Google can find a URL in many ways, including a link from another site, as its Page indexing report guide points out, and a sitemap is another. A robots.txt rule doesn't stop that discovery; it only stops the crawl.
I removed the rule. Why is the old listing still there?
Google generally caches robots.txt for up to 24 hours, according to its robots.txt specification, and after that it still has to recrawl the page itself. Until it does, the listing it built from links stays.
Check robots.txt and noindex rules next
- SEOFind what's keeping your pages out of search results.
- Blocked by robots.txtFind the robots.txt rule blocking a page and unblock only the pages that belong in search.
- robots.txtRead crawler rules without mistaking a crawl block for removal from search.
- Excluded by noindex tagFind where a noindex rule comes from and remove it from pages that belong in search.