Deutsch
robots.txt & robots directives

data-nosnippet

Also known as: data-nosnippet attribute

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.

Snippet and preview rules compared
RuleWhere it's setWhat it controls in Google SearchEffect on AI Overviews and AI Mode
nosnippetwhole page (robots meta tag or X-Robots-Tag)no text snippet or video preview; a static image thumbnail may still appearcontent isn't used as direct input for AI Overviews and AI Mode
max-snippet:[number]whole pagecaps the text snippet at that many characters; 0 equals nosnippet, -1 lets Google choose the lengthlimits 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 snippetlisted by Google as a control for limiting content in AI features in Search
max-image-preview:[none|standard|large]whole pagemaximum size of the image preview; without it, a default-size preview may be shownGoogle only lists web search, Google Images, Discover and Assistant here, no AI features
noimageindexwhole pageimages on this page aren't indexedno statement from Google
unavailable_after: [date]whole pagethe page stops appearing in search results after that date; Googlebot then crawls the URL much less oftenno separate statement from Google
indexifembeddedwhole page, only together with noindexcontent may be indexed when embedded in another page through an iframe or similar tagno statement from Google
noindex (for comparison)whole pagepage doesn't appear in search resultslisted by Google as a control for AI features; a link in AI Overviews or AI Mode requires an indexed page
noarchivewhole pageno longer used by Google and ignored; the cached link it controlled no longer existsnone (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

HTML
<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 nosnippet already prevents all snippets, which makes the attribute redundant.

Sources

  1. Robots meta tag and X-Robots-Tag specifications – Google Search Centraldevelopers.google.com
  2. Control your snippets in search results – Google Search Centraldevelopers.google.com
  3. AI features and your website – Google Search Centraldevelopers.google.com
  4. Bing adds data-nosnippet support for search and AI answers – Search Engine World (15 Oct 2025, secondary source)searchengineworld.com

Last updated: