data-nosnippet is an HTML attribute that marks a section of text on a page as off limits for snippets in search results. The page stays indexed and can still rank. Only the marked text is kept out of the snippet.
How does data-nosnippet work?
Google supports the attribute on span, div and section elements. It is a boolean attribute, so any value you give it is ignored. Google requires valid HTML with all tags closed, so the section can be read by machines. Do not add or remove the attribute on existing nodes through JavaScript. Elements that JavaScript inserts should carry it from the start.
The attribute works at a finer level than the page-wide rules. The nosnippet robots rule removes the text snippet for the whole page, and max-snippet caps its length. With data-nosnippet you exclude single blocks such as a paywalled teaser, a price note or a user comment.
According to reports, Bing announced support for the attribute in October 2025, covering Bing Search and Copilot answers. For Google’s AI features, the AI features documentation lists nosnippet, data-nosnippet, max-snippet and noindex as the available controls.
| Rule | Where it's set | What it controls in Google Search | Effect on AI Overviews and AI Mode |
|---|---|---|---|
nosnippet | whole page (robots meta tag or X-Robots-Tag) | no text snippet or video preview; a static image thumbnail may still appear | content isn't used as direct input for AI Overviews and AI Mode |
max-snippet:[number] | whole page | caps the text snippet at that many characters; 0 equals nosnippet, -1 lets Google choose the length | limits how much content may be used as direct input for AI Overviews and AI Mode |
data-nosnippet (this term) | single text section (attribute on span, div or section) | the marked text isn't used in the snippet | listed by Google as a control for limiting content in AI features in Search |
max-image-preview:[none|standard|large] | whole page | maximum size of the image preview; without it, a default-size preview may be shown | Google only lists web search, Google Images, Discover and Assistant here, no AI features |
noimageindex | whole page | images on this page aren't indexed | no statement from Google |
unavailable_after: [date] | whole page | the page stops appearing in search results after that date; Googlebot then crawls the URL much less often | no separate statement from Google |
indexifembedded | whole page, only together with noindex | content may be indexed when embedded in another page through an iframe or similar tag | no statement from Google |
noindex (for comparison) | whole page | page doesn't appear in search results | listed by Google as a control for AI features; a link in AI Overviews or AI Mode requires an indexed page |
noarchive | whole page | no longer used by Google and ignored; the cached link it controlled no longer exists | none (Google ignores the rule) |
According to Google, a page can only be shown as a link in AI Overviews or AI Mode if it's indexed and eligible to be shown with a snippet. All rules only work if crawlers are allowed to fetch the page. When rules conflict, the more restrictive one applies. For AI training and grounding in some of Google's other systems, Google points to Google-Extended. Sources: Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (last updated 2026-03-24); Google Search Central: AI features and your website (last updated 2025-12-10). Last checked: .
Example
<p>This sentence can appear in a snippet.
<span data-nosnippet>This part stays out of it.</span>
</p>
Common mistakes
- Broken markup, such as an unclosed
div, can stop the attribute from working. - A page-wide
nosnippetalready prevents all snippets, which makes the attribute redundant.
Sources
- Robots meta tag and X-Robots-Tag specifications – Google Search Centraldevelopers.google.com
- Control your snippets in search results – Google Search Centraldevelopers.google.com
- AI features and your website – Google Search Centraldevelopers.google.com
- Bing adds data-nosnippet support for search and AI answers – Search Engine World (15 Oct 2025, secondary source)searchengineworld.com
Last updated: