What is data-nosnippet?
data-nosnippet is an HTML attribute you put on a span, div or section. It tells Google: index this page, rank this page, but do not quote this part of it in the snippet under the blue link. Google introduced it in 2019 alongside the max-snippet, max-image-preview and max-video-preview directives, as part of giving publishers finer control over what appears on the results page. Where the nosnippet meta tag silences the whole page, data-nosnippet silences a paragraph.
It is a Google-only control. Other search engines may ignore it, and it does nothing to stop the content being crawled, indexed or ranked. It is a presentation instruction, not a privacy one.
Why it matters
Why data-nosnippet matters
The snippet is the pitch. For most queries it is the only thing a searcher reads before deciding whether to click, and Google writes it by pulling whatever passage best matches the query. That passage is not always the one you would choose: a cookie notice, a legal disclaimer, a spoiler, a price you have since changed, the one sour line on an otherwise glowing review page.
data-nosnippet lets you take those passages off the table so the snippet is built from the content you actually want in front of a stranger. It is also the honest tool for pages where a fragment shown out of context misleads: medical caveats, terms and conditions, details that belong on the page for people who scroll but should not headline a search result.
In practice
How data-nosnippet works in practice
- 01
Wrap the passage in a span, div or section element and add the attribute with no value: <span data-nosnippet>. Nothing else changes. Google renders the page, sees the attribute, and excludes the marked text when it assembles the snippet and any featured snippet. It works only on those three elements, so putting the attribute on a paragraph tag directly does nothing; wrap the paragraph in a div, or the sentence in a span.
- 02
Use it sparingly and check it. URL Inspection in Search Console shows the rendered HTML Google sees; if the attribute is added by JavaScript after load, make sure it lands before Google renders. And remember what it does not do: the text is still in the index, still searchable and still visible to anyone who opens the page. If the content should not be found at all, that is a job for noindex or for taking it down.
Watch out
What people get wrong about data-nosnippet
Treating it as a hiding tool. We have seen teams mark up prices, staff names or an entire page body with data-nosnippet and assume the information is now private. It is not. It is only out of the snippet. The opposite mistake is wrapping too much: a page with half its text excluded gives Google little to build a snippet from, and the result is a vaguer, less clickable listing than if you had left it alone. Mark the handful of passages that genuinely mislead in isolation and let the rest do its job.





