Creative agency glossarySEO and Analytics

Data-Nosnippet

Data-nosnippet is an HTML attribute that tells Google not to show a marked section of a page's text in its search result snippets.

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

  1. 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.

  2. 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.

Questions

People also ask

Does data-nosnippet stop Google indexing the content?

No. The marked text is still crawled, indexed and used for ranking; it is only left out of the snippet shown on the results page. To keep content out of the index you need a noindex directive or to remove the page.

What is the difference between data-nosnippet and the nosnippet meta tag?

The nosnippet meta tag (or the X-Robots-Tag header) removes the snippet for the entire page. data-nosnippet is surgical: it excludes only the elements you mark and leaves Google free to build a snippet from everything else.

Which HTML elements support data-nosnippet?

Only span, div and section. Google ignores the attribute on any other element, so to exclude a single paragraph, wrap it in a div or a span rather than putting the attribute on the paragraph tag itself.

Next to it in the glossary

  1. Cumulative Layout Shift (CLS)Cumulative Layout Shift (CLS) is a Core Web Vitals metric that measures how much the visible content of a page moves around unexpectedly while it loads and while someone uses it.
  2. Dashboard SoftwareDashboard software is a tool that pulls data from several sources into one live screen of charts and figures, so the people running a business or a campaign can see how it is doing without opening every platform.
  3. Data VisualizationData visualization is the practice of turning numbers into charts, maps, diagrams and graphics so that a pattern, a comparison or a result can be seen at a glance instead of read from a table.
  4. DeindexingDeindexing is the removal of a page or a whole site from a search engine's index so that it no longer appears in results.
  5. Direct TrafficDirect traffic is the share of website visits that arrive with no referrer, typically from a typed URL, a bookmark or an untagged link.
  6. Directory SubmissionDirectory submission is the practice of listing a website in online directories to earn citations, referral visits and backlinks.

Every SEO and Analytics term →

In the work

Where it shows up

All our creations →

From the journal

Read around it

The journal →

Talking the talk is one thing

We make the work.

RIOT is a creative agency and production studio in New York. Strategy, brand, film, photography, design and the campaigns that carry them, made by one team. A few lines is enough to start: we read every brief the same day.

    Footage