How do noindex, nosnippet, data-nosnippet, max-snippet and X-Robots-Tag control what Google shows?
Google documents page-level rules (the robots meta tag and the X-Robots-Tag header) and a text-level attribute (data-nosnippet) to control how content is shown in Search. These rules only work if Google can crawl the URL.
Verified against the sources on 2026-10-23. Labels: Proven means the primary source we opened states it. Practice means widely used practice or secondary reporting that the primary source does not confirm. Experimental means a proposal or draft.
Which controls exist?
- Proven Google’s control page lists removing content, password protection, a
noindexrule, robots.txt disallow (images and video only), the robots meta tag withdata-nosnippetandX-Robots-Tag, a site-wide Search generative AI control in Search Console, and opting out of specific Google properties. - Proven The page gives three reasons to use them: restricting data, hiding low-value content, and helping Google focus crawling on important pages of very large sites.
What do the main rules do?
- Proven
noindexmeans do not show the page, media or resource in results. - Proven
nosnippetmeans no text snippet or video preview; a static image thumbnail may still appear. Google says it also prevents use as direct input for AI Overviews and AI Mode. - Proven
max-snippet:[number]caps the text snippet in characters;0equalsnosnippetand-1lets Google choose. It does not affect image or video previews. - Proven
max-image-previewtakesnone,standardorlarge;max-video-previewtakes a number of seconds. - Proven
unavailable_afterhides a page after a given date;noarchive,nocacheandnositelinkssearchboxare ignored by Google Search.
How do the tag, header and attribute differ?
- Proven The robots meta tag goes in the page
head;name="robots"applies to all crawlers;googlebotapplies to all text results (googlebot-newsto news results). - Proven
X-Robots-Tagis an HTTP header that accepts the same rules and is the option for non-HTML files such as PDFs, images and video. A user agent can prefix the rules. - Proven
data-nosnippetworks onspan,divandsectionelements, is a boolean attribute, and needs valid, closed tags. Do not add or remove it with JavaScript on existing nodes. - Proven When rules conflict, the more restrictive applies; for example
nosnippetoverridesmax-snippet:50.
What can stop these rules from working?
- Proven A rule is discovered only when the URL is crawled. If robots.txt blocks a URL, its indexing and serving rules are ignored.
- Proven
max-snippetdoes not limit rich results powered by structured data, except for structured datadescriptionvalues, whichmax-snippetcan limit; to control those, edit the structured data.
What this page does not cover
- Removal of content already in results is covered on a separate Google page not summarised here.
- How quickly a changed rule takes effect varies; the AI features page says recrawling can take days to months.
- The documentation can change; check the primary pages for current directive lists.