Elements
- What Google documents
span,divandsection
How the data-nosnippet attribute works: allowed elements, the HTML rules, the JavaScript gotcha, and how it relates to nosnippet, max-snippet and AI Overviews.
data-nosnippet is an HTML attribute that marks part of a page so Google won't use that text in a snippet. It works on span, div and section elements, and any value is ignored. Google's AI features page lists it among the controls for limiting the information shown from your pages in Search.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
data-nosnippet attribute to the element that wraps the text. The rest of the page can still appear in a snippet.It is a robots meta tag family control, but at section level. The page-level nosnippet rule tells Google not to "show a text snippet or video preview in the search results for this page." Use data-nosnippet when you only want to keep one block out of snippets, such as a price table, a members-only teaser or a quoted passage you license.
<p>This text can be shown in a snippet
<span data-nosnippet>and this part would not be shown</span>.</p>span, div and sectiondata-nosnippet="false" still appliesdiv including all content after it. Wrap custom elements in a div, span or sectiondata-nosnippet on existing nodes with JavaScript; include it when you first add a new DOM elementnosnippet, data-nosnippet, max-snippet or noindex controls to limit the information shown from your pages in Search, which includes AI features. The robots meta documentation adds that nosnippet also prevents the content from being used as a direct input for AI Overviews and AI Mode.data-nosnippetnosnippetmax-snippetnoindexBe precise about scope. These are Google Search controls, and Google's documentation doesn't mention other AI assistants. For ChatGPT, Claude or Perplexity, use the robots.txt tokens in the guide to blocking AI training while staying in AI search.
Structured data is treated differently: Google says it remains usable for search results when declared within a data-nosnippet element.
Open DevTools, inspect the element and confirm data-nosnippet is present on a span, div or section with its tags closed.
Run curl -s https://example.com/page | grep data-nosnippet. If JavaScript adds it to an element that already exists, put it in the server HTML instead.
Run the URL through the URL Inspection tool in Search Console. Google says to verify implementation there and allow time for recrawling.
A change doesn't take effect until Google recrawls the page, and Google says that can take anywhere from several days to several months. Tracking the effect on AI Overviews is a matter of re-checking after the recrawl.
4 questions people ask next, answered from the sources on this page.
Google documents span, div and section elements. It is a boolean attribute, so any value is ignored.
No. It only marks part of the page as not usable in a snippet. To keep a page out of results, use noindex.
Google lists data-nosnippet among the controls for limiting the information shown from your pages in Search. Only the page-level nosnippet rule is documented to also stop content being used as a direct input for AI Overviews and AI Mode.
Google says not to add or remove it on existing nodes with JavaScript. If you create a new element with JavaScript, include the attribute when you first add it to the DOM.
Run the free audit, then approve the fixes. Every change can be undone.