Seo
Noindex vs Disallow: Which Rule Solves Which Problem?
A decision table for robots.txt, noindex, X-Robots-Tag, and authentication.
On this page
Direct answer: Use Disallow when the immediate goal is to stop a compliant crawler requesting a path. Use noindex when a supported search engine should be able to crawl a resource but keep it out of its index. Use authentication or authorization when the resource is private. These controls solve different problems.
Choose by the job
| Goal | Control | Verification |
|---|---|---|
| Reduce crawler requests | robots.txt | Fetch the file and test the path against the intended group. |
| Keep a crawlable page out of an index | noindex meta or X-Robots-Tag |
Confirm the crawler can receive the directive. |
| Protect private information | Authentication and authorization | Test unauthenticated and authorized responses separately. |
Why blocking and noindex can conflict
If a page is disallowed in robots.txt, a crawler may not request the page and therefore may not see its noindex directive. A URL can still be discovered from links or other references even when its contents are not fetched. That combination is not a dependable index-removal workflow.
How to add noindex to HTML or a PDF
For an HTML page, place this directive in the page’s head through the site’s SEO controls or template:
<meta name="robots" content="noindex">
For a non-HTML resource such as a PDF, configure the HTTP response header instead:
X-Robots-Tag: noindex
Check the actual response after saving. Do not add a Noindex line to robots.txt: Google does not support it there. A PDF also cannot carry an HTML meta tag. Neither method protects confidential information from someone who can access the URL.
How to diagnose “indexed, though blocked by robots.txt”
- Decide whether the goal is removal from search or privacy. Put private content behind authentication immediately.
- For a non-sensitive page that should remain publicly accessible but leave Google’s index, make its noindex directive crawlable by removing the conflicting robots block.
- Inspect the URL in Search Console and confirm the live response contains the directive. Processing requires recrawling; a saved setting alone is not confirmation.
- For urgent search removal, review Google’s Removals tool and apply a lasting exclusion or access-control method as well.
What about staging and nofollow?
Keep a staging site authenticated. Its noindex and robots block are additional safeguards, not a way to make Google read a blocked page. Nofollow concerns link following; it is not a replacement for noindex or authentication.
Use the local robots tool for policy text and path reasoning. It cannot protect content, contact a crawler, or certify a production configuration.
If the intended public page is still missing after checking its directives, use the step-by-step indexing troubleshooting checklist to separate discovery, access, canonical and content issues.
Sources & further reading
This guide separates documented platform behavior from interpretation and identifies the source behind material claims.
