I blocked a page in robots.txt. Why is it still in Google?
robots.txt controls crawling, not indexing. A blocked page can't be fetched, so Google can't see a noindex on it — and if other sites link to it, it can still appear in results as a bare URL with no description. To remove a page from the index, it must be crawlable and carry a noindex.
Why it matters
This one file quietly decides where Googlebot spends its time on your site. Used well, it keeps the crawler out of infinite filter combinations and internal search pages, so your real pages get crawled more often. Used carelessly — one wrong line — it can block your CSS, your images, or your entire site.
And because the file is public, it's also a small honesty test: anything listed in it is a path you've announced to the whole internet.
The checkout page that wouldn't go away
A shop owner adds Disallow: /checkout/ to robots.txt, expecting the checkout to vanish from Google. It doesn't. A review site linked to it once, so Google keeps the URL in the index — as a bare link with 'No information is available for this page', which looks worse than the page ever did.
Meanwhile the same file is doing its real job two lines down: blocking /*?sort= stops Googlebot wandering through thousands of sort-and-filter combinations of the same 200 products. Right tool, two very different jobs — crawling is the one it's for.
User-agent: *
Disallow: /search/
Disallow: /*?sort=
Sitemap: https://example.com/sitemap.xml
What is it for, then?
Crawl budget and crawl traps: faceted-navigation combinations, internal search results, calendar pages that generate infinite URLs, staging areas. Blocking those keeps Googlebot spending its time on pages you actually want indexed.
The two rules that prevent disasters
Never block CSS or JavaScript files — Google renders pages to judge them, and a page it can't render properly can drop. And test every change: one stray Disallow: / at the top of the file takes the whole site out of crawling. It has happened to very large companies. It can happen to you.
How to check it
- Test the live file in Search Console's robots.txt tester before and after changes
- No Disallow on /wp-content/, theme, CSS or JS paths
- Sitemap line present at the bottom of the file
- Sensitive pages use noindex or login protection — not robots.txt (the file is public)
Using robots.txt to hide admin, checkout or private pages. Anyone can read your robots.txt — it's a public list of the exact paths you'd rather people didn't find.