{
    "title": "X-Robots-Tag",
    "description": "An HTTP header that carries robots rules such as noindex. Unlike a meta tag, it also works on PDFs, images and other files.",
    "url": "https://ursy.com/wiki/x-robots-tag/",
    "canonical": "https://ursy.com/wiki/x-robots-tag/",
    "markdown": "https://ursy.com/wiki/x-robots-tag/index.md",
    "json": "https://ursy.com/wiki/x-robots-tag/index.json",
    "published": "2026-11-22T17:38:10+00:00",
    "updated": "2026-11-26T15:41:51+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY and link https://ursy.com/wiki/x-robots-tag/",
    "headings": [
        {
            "level": 2,
            "text": "What is X-Robots-Tag?",
            "id": "what-is-x-robots-tag",
            "url": "https://ursy.com/wiki/x-robots-tag/#what-is-x-robots-tag"
        },
        {
            "level": 2,
            "text": "Header or meta tag?",
            "id": "header-or-meta-tag",
            "url": "https://ursy.com/wiki/x-robots-tag/#header-or-meta-tag"
        },
        {
            "level": 2,
            "text": "Why does it matter for search?",
            "id": "why-does-it-matter-for-search",
            "url": "https://ursy.com/wiki/x-robots-tag/#why-does-it-matter-for-search"
        },
        {
            "level": 2,
            "text": "Why does it matter for AI answers?",
            "id": "why-does-it-matter-for-ai-answers",
            "url": "https://ursy.com/wiki/x-robots-tag/#why-does-it-matter-for-ai-answers"
        },
        {
            "level": 2,
            "text": "Which rules can it carry?",
            "id": "which-rules-can-it-carry",
            "url": "https://ursy.com/wiki/x-robots-tag/#which-rules-can-it-carry"
        },
        {
            "level": 2,
            "text": "How does it work?",
            "id": "how-does-it-work",
            "url": "https://ursy.com/wiki/x-robots-tag/#how-does-it-work"
        },
        {
            "level": 2,
            "text": "What if two crawlers get different rules?",
            "id": "what-if-two-crawlers-get-different-rules",
            "url": "https://ursy.com/wiki/x-robots-tag/#what-if-two-crawlers-get-different-rules"
        },
        {
            "level": 2,
            "text": "Where does the header come from?",
            "id": "where-does-the-header-come-from",
            "url": "https://ursy.com/wiki/x-robots-tag/#where-does-the-header-come-from"
        },
        {
            "level": 2,
            "text": "How do snippet rules fit in?",
            "id": "how-do-snippet-rules-fit-in",
            "url": "https://ursy.com/wiki/x-robots-tag/#how-do-snippet-rules-fit-in"
        },
        {
            "level": 2,
            "text": "How does it work with robots.txt?",
            "id": "how-does-it-work-with-robots-txt",
            "url": "https://ursy.com/wiki/x-robots-tag/#how-does-it-work-with-robots-txt"
        },
        {
            "level": 2,
            "text": "A worked example: fee sheets as PDFs",
            "id": "a-worked-example-fee-sheets-as-pdfs",
            "url": "https://ursy.com/wiki/x-robots-tag/#a-worked-example-fee-sheets-as-pdfs"
        },
        {
            "level": 2,
            "text": "A second example: an offer that ends",
            "id": "a-second-example-an-offer-that-ends",
            "url": "https://ursy.com/wiki/x-robots-tag/#a-second-example-an-offer-that-ends"
        },
        {
            "level": 2,
            "text": "How long until it works?",
            "id": "how-long-until-it-works",
            "url": "https://ursy.com/wiki/x-robots-tag/#how-long-until-it-works"
        },
        {
            "level": 2,
            "text": "Common mistakes",
            "id": "common-mistakes",
            "url": "https://ursy.com/wiki/x-robots-tag/#common-mistakes"
        },
        {
            "level": 2,
            "text": "How to check it",
            "id": "how-to-check-it",
            "url": "https://ursy.com/wiki/x-robots-tag/#how-to-check-it"
        },
        {
            "level": 2,
            "text": "What URSY.com counts",
            "id": "what-ursy-counts",
            "url": "https://ursy.com/wiki/x-robots-tag/#what-ursy-counts"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/wiki/x-robots-tag/#questions"
        },
        {
            "level": 3,
            "text": "Does X-Robots-Tag stop AI training?",
            "id": "does-x-robots-tag-stop-ai-training",
            "url": "https://ursy.com/wiki/x-robots-tag/#does-x-robots-tag-stop-ai-training"
        },
        {
            "level": 3,
            "text": "Can I use it on one bot only?",
            "id": "can-i-use-it-on-one-bot-only",
            "url": "https://ursy.com/wiki/x-robots-tag/#can-i-use-it-on-one-bot-only"
        },
        {
            "level": 3,
            "text": "Is it case sensitive?",
            "id": "is-it-case-sensitive",
            "url": "https://ursy.com/wiki/x-robots-tag/#is-it-case-sensitive"
        },
        {
            "level": 3,
            "text": "Which wins, header or meta tag?",
            "id": "which-wins-header-or-meta-tag",
            "url": "https://ursy.com/wiki/x-robots-tag/#which-wins-header-or-meta-tag"
        },
        {
            "level": 2,
            "text": "Related words",
            "id": "related-words",
            "url": "https://ursy.com/wiki/x-robots-tag/#related-words"
        },
        {
            "level": 2,
            "text": "Sources",
            "id": "sources",
            "url": "https://ursy.com/wiki/x-robots-tag/#sources"
        }
    ],
    "links": [
        {
            "text": "HTML",
            "url": "https://ursy.com/wiki/html/",
            "internal": true
        },
        {
            "text": "MDN says",
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Robots-Tag",
            "internal": false
        },
        {
            "text": "bots",
            "url": "https://ursy.com/wiki/bot-web-robot/",
            "internal": true
        },
        {
            "text": "meta tag",
            "url": "https://ursy.com/wiki/meta-tag/",
            "internal": true
        },
        {
            "text": "noindex",
            "url": "https://ursy.com/wiki/noindex/",
            "internal": true
        },
        {
            "text": "nofollow",
            "url": "https://ursy.com/wiki/nofollow/",
            "internal": true
        },
        {
            "text": "HTML head",
            "url": "https://ursy.com/wiki/html-head/",
            "internal": true
        },
        {
            "text": "Google says",
            "url": "https://developers.google.com/search/docs/crawling-indexing/block-indexing",
            "internal": false
        },
        {
            "text": "Google says",
            "url": "https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag",
            "internal": false
        },
        {
            "text": "search engine index",
            "url": "https://ursy.com/wiki/search-engine-index/",
            "internal": true
        },
        {
            "text": "Google",
            "url": "https://ursy.com/wiki/google/",
            "internal": true
        },
        {
            "text": "Google says",
            "url": "https://developers.google.com/search/docs/appearance/ai-features",
            "internal": false
        },
        {
            "text": "AI Overview",
            "url": "https://ursy.com/wiki/ai-overview/",
            "internal": true
        },
        {
            "text": "AI Mode",
            "url": "https://ursy.com/wiki/google-ai-mode/",
            "internal": true
        },
        {
            "text": "data-nosnippet",
            "url": "https://ursy.com/wiki/data-nosnippet/",
            "internal": true
        },
        {
            "text": "Bing says",
            "url": "https://blogs.bing.com/webmaster/February-2026/Introducing-AI-Performance-in-Bing-Webmaster-Tools-Public-Preview",
            "internal": false
        },
        {
            "text": "user agent",
            "url": "https://ursy.com/wiki/user-agent/",
            "internal": true
        },
        {
            "text": "search engine",
            "url": "https://ursy.com/wiki/search-engine/",
            "internal": true
        },
        {
            "text": "Googlebot",
            "url": "https://ursy.com/wiki/googlebot/",
            "internal": true
        },
        {
            "text": "CDN",
            "url": "https://ursy.com/wiki/cdn/",
            "internal": true
        },
        {
            "text": "origin server",
            "url": "https://ursy.com/wiki/origin-server/",
            "internal": true
        },
        {
            "text": "SEO",
            "url": "https://ursy.com/wiki/seo-search-engine-optimisation/",
            "internal": true
        },
        {
            "text": "WordPress SEO",
            "url": "https://ursy.com/wiki/wordpress-seo/",
            "internal": true
        },
        {
            "text": "featured snippets",
            "url": "https://ursy.com/wiki/featured-snippet/",
            "internal": true
        },
        {
            "text": "robots.txt",
            "url": "https://ursy.com/wiki/robots-txt/",
            "internal": true
        },
        {
            "text": "noindex, nofollow or robots.txt",
            "url": "https://ursy.com/wiki/noindex-nofollow-or-robots-txt/",
            "internal": true
        },
        {
            "text": "410",
            "url": "https://ursy.com/wiki/404-and-410/",
            "internal": true
        },
        {
            "text": "URL Inspection",
            "url": "https://ursy.com/wiki/url-inspection/",
            "internal": true
        },
        {
            "text": "edge cache",
            "url": "https://ursy.com/wiki/edge-cache/",
            "internal": true
        },
        {
            "text": "purge",
            "url": "https://ursy.com/wiki/cache-purge/",
            "internal": true
        },
        {
            "text": "HTTP Header Checker",
            "url": "https://ursy.com/http-header-checker/",
            "internal": true
        },
        {
            "text": "status code",
            "url": "https://ursy.com/wiki/http-status-code/",
            "internal": true
        },
        {
            "text": "Meta Tag Checker",
            "url": "https://ursy.com/meta-tag-checker/",
            "internal": true
        },
        {
            "text": "Robots.txt Checker",
            "url": "https://ursy.com/robots-txt-checker/",
            "internal": true
        },
        {
            "text": "AI Bot Checker",
            "url": "https://ursy.com/ai-bot-checker/",
            "internal": true
        },
        {
            "text": "redirects",
            "url": "https://ursy.com/wiki/redirect/",
            "internal": true
        },
        {
            "text": "Redirect Checker",
            "url": "https://ursy.com/redirect-checker/",
            "internal": true
        },
        {
            "text": "XML sitemap",
            "url": "https://ursy.com/wiki/xml-sitemap/",
            "internal": true
        },
        {
            "text": "XML Sitemap Checker",
            "url": "https://ursy.com/sitemap-checker/",
            "internal": true
        },
        {
            "text": "canonical",
            "url": "https://ursy.com/wiki/canonical-tag/",
            "internal": true
        },
        {
            "text": "Indexability Checker",
            "url": "https://ursy.com/indexability-checker/",
            "internal": true
        },
        {
            "text": "AI Training Opt-Out Checker",
            "url": "https://ursy.com/ai-training-opt-out-checker/",
            "internal": true
        },
        {
            "text": "AI Readiness Checker",
            "url": "https://ursy.com/ai-readiness-checker/",
            "internal": true
        },
        {
            "text": "Google Search Console",
            "url": "https://ursy.com/wiki/google-search-console/",
            "internal": true
        },
        {
            "text": "URL",
            "url": "https://ursy.com/wiki/url/",
            "internal": true
        },
        {
            "text": "Page indexing report",
            "url": "https://ursy.com/wiki/page-indexing-report-index-coverage/",
            "internal": true
        },
        {
            "text": "index coverage monitor",
            "url": "https://ursy.com/pro/index-coverage-monitor/",
            "internal": true
        },
        {
            "text": "site audit",
            "url": "https://ursy.com/pro/site-audit/",
            "internal": true
        },
        {
            "text": "methodology",
            "url": "https://ursy.com/methodology/",
            "internal": true
        },
        {
            "text": "training crawler",
            "url": "https://ursy.com/wiki/training-crawler/",
            "internal": true
        },
        {
            "text": "Google-Extended",
            "url": "https://ursy.com/wiki/google-extended/",
            "internal": true
        },
        {
            "text": "HTTP",
            "url": "https://ursy.com/wiki/http/",
            "internal": true
        },
        {
            "text": "Indexed, though blocked by robots.txt",
            "url": "https://ursy.com/wiki/indexed-though-blocked-by-robots/",
            "internal": true
        },
        {
            "text": "Technical SEO",
            "url": "https://ursy.com/wiki/technical-seo/",
            "internal": true
        }
    ],
    "words": 1583,
    "text": "X-Robots-Tag is an HTTP response header that carries robots rules, such as X-Robots-Tag: noindex. It does the same job as the robots meta tag, but it sits in the server’s reply instead of the page. So it also works on PDFs, images, videos and other files that have no HTML. What is X-Robots-Tag? It is a line the server sends with a file, before the content. MDN says it is not part of any formal specification, but it is a de facto standard way to talk to search bots and crawlers. It holds the same rules as the robots meta tag: noindex, nofollow, nosnippet and others. Crawlers find it when they fetch the address. Header or meta tag? Robots meta tag X-Robots-Tag header Where it lives In the page’s HTML head In the server’s HTTP reply Works on PDFs, images, video No Yes Set by Page editor or CMS Server, CDN or plugin settings Can cover many files at once One page at a time Yes, by file type or folder Same rules Yes: Google says both ways of setting noindex have the same effect Why does it matter for search? A price list PDF or a folder of images cannot carry a meta tag. Google says to use the X-Robots-Tag header to block indexing of non-HTML files. The flip side is risk. A header can be switched on for a whole site in one server or plugin setting. Nobody sees it on the page, so pages can drop out of the search engine index without anyone noticing. Why does it matter for AI answers? Google’s AI features use the same controls. Google says a page must be indexed and eligible to show with a snippet to appear as a link in an AI Overview or AI Mode. It names nosnippet, data-nosnippet, max-snippet and noindex as the ways to limit what is shown. So a header with noindex or nosnippet also takes that page out of those AI answers. Bing says it respects robots.txt and other supported control mechanisms in its AI experiences. Which rules can it carry? Rule What it asks noindex Do not show this page, file or media in search results nofollow Do not follow the links on this page none Same as noindex, nofollow nosnippet Do not show a text snippet or video preview max-snippet: 50 Use at most 50 characters as a text snippet max-image-preview: large Image preview size: none, standard or large noimageindex Do not index images on this page indexifembedded Allow indexing when embedded in another page, despite noindex notranslate Do not offer a translation in results unavailable_after: date Stop showing the page after this date From Google’s and MDN’s lists, checked 24 November 2026. Google says the rules are not case sensitive. How does it work? The crawler requests the file, reads the headers, then applies the rules. You can send several X-Robots-Tag lines, or one line with rules split by commas. A rule can also name one crawler by its user agent, such as X-Robots-Tag: googlebot: nofollow. Rules without a name apply to all crawlers. Google says that when rules conflict, the more restrictive one applies: nosnippet beats max-snippet:50. What if two crawlers get different rules? MDN’s example shows how they add up: X-Robots-Tag: nofollow X-Robots-Tag: googlebot: noindex MDN says the search engine uses the sum of the negative rules. Googlebot reads this as noindex, nofollow. Other crawlers read only nofollow. Where does the header come from? Usually from one of three places: the web server’s settings, a rule at the CDN, or a plugin in your CMS. Each can add the line without changing the page itself. When a header appears that nobody expected, check all three, and compare the reply from the CDN with the reply from the origin server. On WordPress, an SEO plugin often sets robots rules; see WordPress SEO. How do snippet rules fit in? Not every rule removes a page. nosnippet and max-snippet only limit how much text is shown. That affects featured snippets and the text Google may show in AI features. For one part of a page, MDN points to the data-nosnippet HTML attribute instead of a header. Use snippet rules with care: limit too much and there is little left to quote. How does it work with robots.txt? This is the catch most people miss. If robots.txt blocks an address, the crawler never fetches it, so it never sees the header. Google says such a page can still appear in results if other pages link to it. To remove a file, let it be crawled and send noindex. MDN adds the other side: if you only want to save bandwidth, robots.txt is the better tool, because indexing rules do not stop the fetch. See noindex, nofollow or robots.txt. A worked example: fee sheets as PDFs A law firm keeps its fee sheets as PDFs and wants them out of Google, while the matching web pages stay in. Google’s documentation shows how to add the header to every PDF. On an Apache web server: <Files ~ \"\\.pdf$\"> Header set X-Robots-Tag \"noindex, nofollow\" </Files> On NGINX: location ~* \\.pdf$ { add_header X-Robots-Tag \"noindex, nofollow\"; } For images, Google’s example matches \\.(png|jpe?g|gif)$ and sends noindex. A PDF’s reply then includes a line like this, in the format Google shows: HTTP/1.1 200 OK Date: Tue, 25 May 2010 21:42:43 GMT (...) X-Robots-Tag: noindex (...) The PDFs must stay crawlable in robots.txt, or Google never reads the header. A second example: an offer that ends A shop runs a winter sale page. It can ask search engines to stop showing it after a date: X-Robots-Tag: unavailable_after: Wed, 03 Dec 2025 13:09:53 GMT The date is MDN’s example. Google says the date must use a widely adopted format such as RFC 822, RFC 850 or ISO 8601. MDN says crawlers are expected to visit that address much less after the date. Once the page is gone for good, a 410 says so plainly. How long until it works? Not until the crawler comes back. Google says it may take months for Googlebot to revisit a page, and you can ask for a recrawl in URL Inspection. The same applies when you remove a header by mistake: the page returns only after a recrawl. Common mistakes A site-wide noindex left on after launch. Staging settings copied to the live site. Check the header, not only the page. Blocking the file in robots.txt as well. The header is then never read. Different rules in header and meta tag. The stricter one wins. Expecting it to stop scrapers. MDN says only cooperative robots follow these rules. Using it instead of a sign-in. Anyone with the address can still open the file. Forgetting the edge cache. An edge cache may keep serving old headers until you purge it. How to check it Fetch the page or file with the HTTP Header Checker. It shows the status code and any X-Robots-Tag line. Check a PDF and an image as well as a page. Check the page’s own robots tag with the Meta Tag Checker, so you can see both signals together. Make sure robots.txt does not block files whose header you want read. Test the address with the Robots.txt Checker, and check AI bot rules with the AI Bot Checker. If the address redirects, check the headers on the final hop. The Redirect Checker shows each one. Make sure your XML sitemap does not list files you have set to noindex. Use the XML Sitemap Checker. Get one view of noindex, robots, canonical and status: the Indexability Checker is live. So is the AI Training Opt-Out Checker, which reads robots lines, noai tags and headers. For a whole-site view of AI access, run the AI Readiness Checker. In Google Search Console, use URL Inspection to see whether Google may index the page and what blocks it. Then watch the Page indexing report for pages that drop out. Over time, the index coverage monitor and site audit are in URSY Pro, opening in stages. What URSY.com counts We count requests and their status codes from the edge log and the website, including pages the cache answers. A header does not stop a crawler fetching a file, so a noindexed PDF still shows in our counts when a bot reads it. That tells you which bots still spend visits on files you have kept out of search. The full rules are on our methodology page. Questions Does X-Robots-Tag stop AI training? Not by itself. Google, OpenAI, Anthropic and Apple document robots.txt names for training. See training crawler and Google-Extended. Can I use it on one bot only? Yes. Put the bot’s name before the rule: X-Robots-Tag: googlebot: noindex. Is it case sensitive? No. Google says the header, the user agent name and the values are not case sensitive. Which wins, header or meta tag? Neither by place. When they conflict, the more restrictive rule applies. Related words Noindex robots.txt Noindex, nofollow or robots.txt: which one to use Meta tag HTTP HTTP status code Indexed, though blocked by robots.txt Technical SEO Sources Google Search Central: Robots meta tag, data-nosnippet and X-Robots-Tag specifications, checked 24 November 2026 Google Search Central: Block search indexing with noindex, checked 24 November 2026 Google Search Central: AI features and your website, checked 24 November 2026 MDN: X-Robots-Tag, checked 24 November 2026 Bing Webmaster Blog: Introducing AI Performance in Bing Webmaster Tools (10 February 2026), checked 24 November 2026 Updated 24 November 2026 by URSY.com.",
    "source": "https://ursy.com/wiki/x-robots-tag/"
}