For the complete documentation index, see llms.txt. Every page on this site is also served as Markdown: append `.md` to any URL, or send `Accept: text/markdown`.
Skip to content

Glossary term

X-Robots-Tag

X-Robots-Tag is an HTTP response header that tells search crawlers how to index and show a URL, with the same rules as the robots meta tag, such as noindex and nosnippet. Sent in the header, it works on PDFs, images and feeds that have no HTML. Google applies nosnippet to AI Overviews and AI Mode too.

7 days free · card required

Response headers of a PDF price list
  • Content-Type

    Value
    application/pdf
    What it does
    No HTML head, so no meta tag is possible
  • X-Robots-Tag

    Value
    nosnippet
    What it does
    No text snippet in Google, and no direct input to AI Overviews or AI Mode
  • Link

    Value
    <https://example.com/pricing>; rel="canonical"
    What it does
    Points search at the HTML page instead
Example · example response headers, not a reading
Karl-Gustav KallasmaaKarl-Gustav Kallasmaa, Founder & CEO

Last updated

Key facts

Robots.txt decides whether a crawler may fetch a URL. Once it has fetched it, a second set of rules decides what a search engine may do with it: index it or not, show a snippet or not, how long a snippet. Those rules can sit in the page's HTML, as a robots meta tag, or in the HTTP response, as an X-Robots-Tag header. The header is the one that works for everything.

How does the X-Robots-Tag header work?

The server sends it with the response, like any other header:

HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindex, nosnippet

The rules are the same as the meta tag's. Google documents all, noindex, nofollow, none, nosnippet, indexifembedded, max-snippet, max-image-preview, max-video-preview, notranslate, noimageindex and unavailable_after. A rule can name one crawler, as in X-Robots-Tag: googlebot: nofollow; without a name it applies to every crawler that reads it.

When should you use the header instead of the meta tag?

SituationUse
An HTML page you can editEither; the meta tag is easier to see
A PDF, image, video file or feedThe header: there is no HTML head
A Markdown or JSON copy of a pageThe header
Every file under one pathThe header, set once in the server or CDN

A common case today is the plain-text copy. Many sites, ours included, publish a Markdown twin of each page for machines. A Markdown file has nowhere to put a meta tag, so any rule for it has to travel in a header: either X-Robots-Tag: noindex, which drops the twin from search entirely, or a Link: rel="canonical" header, which Google accepts for non-HTML files and which points search at the HTML page while leaving the twin readable.

Which rules reach AI answers?

For Google, the answer is documented. Google says nosnippet applies to every form of its search results, including AI Overviews and AI Mode, and also stops the content being used as a direct input for them. Its AI features page lists nosnippet, data-nosnippet, max-snippet and noindex as the controls for how content appears there.

That makes them blunt instruments. nosnippet keeps a page out of AI Overviews, and also removes its snippet from ordinary results. There is no Google rule that means "show me in search but not in AI answers".

Other AI engines do not document reading X-Robots-Tag for their answers. For ChatGPT, Claude and Perplexity the documented control is robots.txt, per crawler. Treat the header as a search-engine control, and robots.txt as the one every AI operator names.

Do AI answers ever bring the header up?

Not once in our own workspace. A search of the 4,524 ChatGPT and Perplexity answers to our 61 tracked questions in the 30 days to 4 October 2026 found no answer mentioning X-Robots-Tag. The crawler control the engines talk about is robots.txt.

ChatGPT answers mentioning X-Robots-Tag
0
n=2,349 answers
Perplexity answers mentioning X-Robots-Tag
0
n=2,175 answers
Analyst agentAnalyst · reads this workspace's answersattensira.com workspace, 61 tracked questions, Attensira MCP · n=4,524 answers · to

What does it look like on a real site?

Here are the headers the Markdown twin of this site's RAG glossary page returned when we fetched https://attensira.com/glossary/rag.md on 4 October 2026:

http
HTTP/2 200
content-type: text/markdown; charset=utf-8
link: <https://attensira.com/glossary/rag>; rel="canonical", <https://attensira.com/license.xml>; rel="license"; type="application/rsl+xml"

There is no X-Robots-Tag on it, and that is a choice. A noindex header would keep the twin out of search, but it is the stricter rule, and the HTML page already carries the same words. The canonical header does the narrower job: it tells search engines which URL is the real one, so the HTML page is the one that ranks, and AI agents that ask for Markdown still get a clean copy. The HTML page sends no X-Robots-Tag either, so its rules live in the meta tag.

Check yours the same way: request a non-HTML URL with curl -I and read what comes back. If there is neither a noindex nor a canonical header, search engines decide on their own which copy to show.

What do people get wrong about it?

  • Blocking the URL in robots.txt as well. Google says rules on a page that is disallowed from crawling are never found. If you want noindex to work, the crawler must be allowed to fetch the page.
  • Sending it on the wrong responses. A header set for a whole path can catch pages you meant to keep. Check the response headers of a sample of URLs, not the config.
  • Using nosnippet to hide from AI and losing search snippets. It does both at once.
  • Assuming every AI engine reads it. Only some operators document it.
  • Conflicting rules. If the header and the meta tag disagree, Google applies the more restrictive one.

How does Attensira help?

The free AI crawler URL inspector fetches a URL the way an AI crawler would and reports what blocks it. In a workspace, Attensira re-reads your pages and records a new version whenever the robots meta tag, the canonical link or the structured data types change, so a change that removed a page from answers can be traced to the day it happened. The robots rule it records is the meta tag, so check an X-Robots-Tag header with curl -I as above. When a rule is the cause, the crew's web engineer proposes the fix as a pull request for your approval.

Questions about X-Robots-Tag

What is the X-Robots-Tag?
An HTTP response header that carries indexing and serving rules for the URL it is sent with, such as X-Robots-Tag: noindex. Google documents it alongside the robots meta tag: any rule that works in the meta tag also works in the header.
When should I use the header instead of the meta tag?
When the file is not HTML, so there is no head to put a meta tag in: PDFs, images, video files, feeds, Markdown or JSON. Also when you want one server rule to cover a whole path or file type instead of editing every page.
Does X-Robots-Tag affect AI Overviews?
Some rules do. Google says nosnippet applies to all forms of its search results, including AI Overviews and AI Mode, and also stops the content being used as a direct input for them. Google lists nosnippet, data-nosnippet, max-snippet and noindex as the controls for its AI features.
Can X-Robots-Tag target one crawler?
Yes. Put the user agent before the rules, for example X-Robots-Tag: googlebot: nofollow. A rule without a named crawler applies to every crawler that reads it.
Why is my noindex header being ignored?
Usually because robots.txt blocks the URL. Google says that if a page is disallowed from crawling, any indexing or serving rules on it will not be found and are ignored. The crawler has to fetch the URL to see the header.

Where do these facts come from?

5 sources, 6 statements: each statement with the page it came from and the day it was checked.

  1. Google's robots meta tag and X-Robots-Tag specification states that the nosnippet rule applies to all forms of search results at Google, including web search, Google Images, Discover, AI Overviews and AI Mode, and will also prevent the content from being used as a direct input for AI Overviews and AI Mode.

    developers.google.com · retrieved

  2. Google states that if a page is disallowed from crawling through robots.txt, any information about indexing or serving rules will not be found and will therefore be ignored.

    developers.google.com · retrieved

  3. Google states that site owners can limit how their content appears in its AI features with nosnippet, data-nosnippet, max-snippet or noindex.

    developers.google.com · retrieved

  4. On 4 October 2026, https://attensira.com/glossary/rag.md returned HTTP 200 with content-type text/markdown, a Link header with rel="canonical" pointing at https://attensira.com/glossary/rag, and no X-Robots-Tag header.

    attensira.com · retrieved

  5. In Attensira's own workspace, read over the Attensira MCP on 4 October 2026, none of the 4,524 ChatGPT (2,349) and Perplexity (2,175) answers to 61 tracked questions in the 30 days from 5 September to 4 October 2026 mentioned X-Robots-Tag.

    attensira.com workspace, read over the Attensira MCP on

  6. Attensira records a new version of a page when its canonical link or robots meta tag changes, among other fields.

    docs.attensira.com · retrieved

Want whatever it takes to win the answer?

7 days free · card required