
Explainers
robots.txt vs noindex: which one actually keeps a page out of Google
The two directives control different things, and using the wrong one is why blocked pages keep appearing in search results.
By Remi Okafor, Editor, Toolspea · Published 2026-07-15 · Updated 2026-08-06 · 5 min read
Two different controls
robots.txt is a request not to fetch a URL. noindex is an instruction, delivered in the page's HTML or an HTTP header, not to include the page in results. They operate at different stages, which is why combining them incorrectly produces the outcome nobody wants.
The classic mistake
Disallowing a URL in robots.txt and adding a noindex tag to it means the crawler never fetches the page, never sees the tag, and can still list the URL based on external links — usually with no description. The fix is to remove the disallow so the directive can be read.
Choosing the right tool
Match the directive to the goal:
- Keep a page out of search results: allow crawling, serve noindex.
- Save crawl budget on infinite or worthless URL space (faceted filters, session parameters): disallow in robots.txt.
- Protect private data: authentication. Neither directive is a security control.
- Consolidate duplicates that should still be reachable: a canonical tag, not a block.
After the page is already indexed
Removal takes a re-crawl. Serve the noindex, confirm the page is crawlable, and request the URL through Search Console's removal tool if the delay matters. Deleting the page instead and returning a 410 also works and is often faster to communicate.
Frequently asked questions
Tools mentioned
- Robots.txt Generator — Build a valid robots.txt with crawl rules and a sitemap reference.
- Meta Tag Generator — Produce title, description, Open Graph and Twitter tags for any page.
- SERP Snippet Preview — See how a title and description will truncate in search results.
Keep reading
Related tools and guides
Everything referenced in this article, plus the hubs and guides that go with it.