Part of our guide: canonical tags and indexing, every Search Console status explained →
The X-Robots-Tag is an HTTP response header that gives search engines the same indexing instructions as a robots meta tag — noindex, nofollow, nosnippet and more — but works on any file type, including PDFs, images, XML and plain text, where a meta tag can’t be placed.
- Google: “Any rule that can be used in a robots meta tag can also be specified as an X-Robots-Tag” (Google Search Central).
- Use it for non-HTML files (PDFs, images, feeds, text files) and for applying rules to whole folders or file types at server level.
- It only works if the URL can be crawled. Block the URL in robots.txt and Google never sees the header.
- When rules conflict, Google uses “the sum of the negative rules” — the most restrictive combination wins.
- noarchive and nocache are no longer used by Google Search, but Bing still uses them to limit use in Copilot.
What is the X-Robots-Tag?
X-Robots-Tag vs meta robots vs robots.txt
Which values can you use?
When should you use it?
How do you set it?
How do you check it?
Example: our own headers
What goes wrong?
FAQ
What is the X-Robots-Tag?
Every time a browser or crawler requests a URL, the server replies with HTTP headers before the content itself: the status code, the content type, caching rules. The X-Robots-Tag is one of those headers. It tells search engines whether they may index the URL and how they may show it.
HTTP/2 200 content-type: application/pdf x-robots-tag: noindex
That response says: this PDF may be fetched, but don’t show it in search results. It does the same job as <meta name=”robots” content=”noindex”> in an HTML page — which a PDF simply can’t contain. The header name, the user-agent names and the values are all case-insensitive, according to Google.
How is it different from a meta robots tag and robots.txt?
| X-Robots-Tag | Meta robots tag | robots.txt | |
|---|---|---|---|
| Where it lives | HTTP response header | HTML of the page | One file at the site root |
| Controls | Indexing and display | Indexing and display | Crawling (fetching) |
| Works on PDFs, images, XML, text | Yes | No | Yes |
| Rules per folder or file type | Yes, via server config | No, page by page | Yes, via paths |
| Removes a URL from the index | Yes (noindex) | Yes (noindex) | No — can leave it indexed without a snippet |
| Visible in page source | No — only in headers | Yes | Yes, at /robots.txt |
The last row is why X-Robots-Tag problems are hard to spot: you can view a page’s source and see nothing wrong, while the server quietly sends noindex. The difference between blocking and noindexing is covered in blocked by robots.txt and excluded by noindex tag.
Which values can you use?
Google supports these rules in both the meta tag and the header:
| Value | What it does in Google |
|---|---|
| noindex | Don’t show the URL in search results |
| nofollow | Don’t follow the links on the page |
| none | Same as noindex, nofollow |
| nosnippet | No text snippet or video preview |
| max-snippet:[n] | Snippet of at most n characters |
| max-image-preview:[setting] | Maximum image preview size (none, standard, large) |
| max-video-preview:[n] | Video preview of at most n seconds |
| noimageindex | Don’t index images on the page |
| notranslate | Don’t offer a translation in results |
| unavailable_after:[date] | Stop showing the URL after a date |
| indexifembedded | Allow indexing when embedded via iframe despite noindex |
| noarchive, nocache | No longer used by Google Search |
Bing is different on the last row. Bing supports the X-Robots-Tag too, and for Bing noarchive means “do not link in Chat and Copilot”, while nocache limits Copilot to URL, title and snippet. If you want to control how Microsoft’s AI uses your content, these are the values that do it — see AI crawlers and robots.txt.
You can also target one crawler by name and combine several headers:
X-Robots-Tag: googlebot: nofollow X-Robots-Tag: otherbot: noindex, nofollow X-Robots-Tag: unavailable_after: 31 Dec 2026 23:59:59 CET
When should you use the X-Robots-Tag?
- PDFs and documents you want downloadable but not ranking — price lists, internal manuals, duplicate PDF versions of HTML pages.
- Images you don’t want in Google Images.
- Machine files such as XML sitemaps, feeds, API responses and llms.txt, which are meant for bots and look odd as search results.
- Whole sections, such as a staging folder or a directory of print pages, where editing every template is impractical.
- Temporary content with unavailable_after, like event or offer pages.
For normal HTML pages, a meta robots tag set by your SEO plugin is usually simpler and easier for your team to see.
How do you set the X-Robots-Tag?
Apache (.htaccess)
This is Google’s own example for all PDFs:
<Files ~ "\.pdf$"> Header set X-Robots-Tag "noindex, nofollow" </Files>
NGINX
location ~* \.pdf$ {
add_header X-Robots-Tag "noindex, nofollow";
}
WordPress and PHP
Yoast SEO already sends noindex, follow on its XML sitemaps. For your own output, send the header before any content, for example in a small plugin:
header( 'X-Robots-Tag: noindex', true );
That’s how our site plugin marks /llms.txt as noindex. On a CDN such as Cloudflare you can add the header with a response-header transform rule instead of touching the server.
How do you check a URL’s X-Robots-Tag?
- Command line: curl -I https://example.com/file.pdf shows all response headers.
- Browser: DevTools → Network → click the request → Response Headers.
- Search Console: URL Inspection reports “Indexing allowed? No: ‘noindex’ detected in ‘X-Robots-Tag’ http header” when the header blocks indexing. The live test shows the current state; see how to check if a page is indexed.
Example: the headers on this site
On 25 September 2026 we requested eight URL types on indexurepoint.com and recorded the X-Robots-Tag:
| URL | X-Robots-Tag | Set by |
|---|---|---|
| /sitemap_index.xml | noindex, follow | Yoast SEO |
| /post-sitemap.xml | noindex, follow | Yoast SEO |
| /robots.txt | noindex, follow | Yoast SEO |
| /llms.txt | noindex | Our site plugin |
| /wp-json/ | noindex | WordPress REST API response |
| /feed/ | none | — |
| /?s=test (search) | none — uses meta robots noindex, follow instead | Yoast SEO |
| Article pages | none — meta robots index, follow | Yoast SEO |
The pattern is exactly what you want: machine files carry a header noindex, human pages are controlled by the meta tag, and nothing a visitor should find is blocked. Note that the sitemaps are noindexed but not blocked in robots.txt — Google still has to crawl them to read the URLs inside.
What goes wrong with the X-Robots-Tag?
- An invisible noindex. A server rule, CDN setting or security plugin adds noindex to every response, and nobody notices because the page source looks clean. A r/TechSEO thread titled “Hidden X-Robots-Tag: noindex reported by GSC – can’t find source” is a typical example. Check the live headers, not the HTML.
- Staging rules going live. A site-wide noindex header on the staging server gets copied to production during launch.
- Blocked and noindexed at once. If robots.txt disallows the URL, Google can’t read the header, so the URL may stay indexed. Remove the Disallow until the noindex has been processed.
- Conflicting rules. Header says noindex, meta tag says index: Google applies the most restrictive combination, so the page stays out.
- Relying on noarchive for Google. Google no longer uses it. It still matters for Bing and Copilot.
- Expecting instant removal. The header takes effect when Google recrawls the URL. For a fast temporary hide, see how to remove a URL from Google.
Use the meta robots tag for pages and the X-Robots-Tag for everything else. And whenever a page drops out of Google for no visible reason, check the response headers before anything else — a stray header noindex is one of the quickest problems to fix and one of the easiest to miss.
FAQ
What is an X-Robots-Tag?
An HTTP response header that tells search engines whether a URL may be indexed and how it may be shown. It supports the same rules as the robots meta tag, such as noindex and nosnippet.
What is the difference between X-Robots-Tag and robots.txt?
robots.txt controls whether a URL may be crawled. X-Robots-Tag controls whether a crawled URL may be indexed and shown. A URL blocked in robots.txt can’t have its X-Robots-Tag read.
What does “noindex detected in X-Robots-Tag http header” mean?
Search Console found a noindex rule in the URL’s HTTP response headers, so Google won’t index it. Remove the rule in your server, CDN or plugin configuration if the page should be indexed, then request indexing.
Can I use X-Robots-Tag on HTML pages?
Yes. It works on any URL. For HTML pages a meta robots tag is usually easier to manage, but the header is useful for applying rules to many pages at once.
Does Google still support noarchive?
No. Google’s documentation lists noarchive and nocache as no longer used by Google Search. Bing still uses them to limit how content appears in Copilot.
Which wins if the header and meta tag disagree?
Google combines them and applies the sum of the negative rules, so the most restrictive result applies.
Should XML sitemaps have a noindex X-Robots-Tag?
It’s common and harmless: Yoast SEO does it by default. Google still reads the sitemap, it just won’t show the XML file itself in search results. Don’t block sitemaps in robots.txt.
How do I check the X-Robots-Tag of a URL?
Run curl -I on the URL, open the Network tab in your browser’s developer tools, or use URL Inspection in Search Console.









