Why it hides
The header is set by the web server, a CDN or an application, not by the page’s HTML. Viewing the source shows nothing. A server rule that adds X-Robots-Tag: noindex to every response for a staging host can stay in place after the site is moved to production, and the pages look perfect while search engines drop them.
How to see it
Request the headers: curl -sI https://example.com/page, or read the response headers in the browser’s network panel, or inspect the URL in Search Console. Check pages and file types separately.
An example
Google’s documentation shows how to keep PDF files out of search with an Apache rule: <Files ~ "\.pdf$"> Header set X-Robots-Tag "noindex, nofollow" </Files>. To address one crawler, put its name in front of the directive: X-Robots-Tag: googlebot: noindex. Because the header lives in server or CDN configuration, search for it in both places when a page is unexpectedly missing from search, and test it with curl -sI.
The header can also carry other rules, such as nosnippet or unavailable_after. For page-level control in HTML the meta tag is usually simpler; the header is the right tool when the resource is not HTML or when one server rule must cover many files.
What to check
That no response from a production host carries noindex, apart from pages that are meant to carry it, and that a CDN or server rule has not added it everywhere.
Sources
Read on . Standards and vendor pages change; confirm the current text before you rely on it.
- Google Search Central, Block Search indexing with noindex (developers.google.com)