Free auditStart free
GuideAI search · Guide

data-nosnippet

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.

3 min
read
2
sources
Oct 23, 2026
updated
Scaplet Editorial Team
author
In one line

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.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
span, div, section
Allowed elements
Boolean (value ignored)
Attribute type
Part of a page
Scope
nosnippet, max-snippet, noindex
Related controls
01Check it

What data-nosnippet does

Google's documentation says: "You can designate textual parts of an HTML page not to be used as a snippet." You do that by adding the 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.

Google's example
<p>This text can be shown in a snippet
<span data-nosnippet>and this part would not be shown</span>.</p>
02At a glance

Rules that make it work

Rule

Elements

What Google documents
span, div and section
Rule

Attribute type

What Google documents
Boolean; as with all boolean attributes, any value specified is ignored, so data-nosnippet="false" still applies
Rule

HTML

What Google documents
The section must be valid HTML and all appropriate tags must be closed. Google's example shows an unclosed div including all content after it. Wrap custom elements in a div, span or section
Rule

JavaScript

What Google documents
Don't add or remove data-nosnippet on existing nodes with JavaScript; include it when you first add a new DOM element
Rule

Rendering

What Google documents
Extraction may happen both before and after rendering, because rendering is not guaranteed
04How it works

Check it in two minutes

  1. 1

    View rendered HTML

    Open DevTools, inspect the element and confirm data-nosnippet is present on a span, div or section with its tags closed.

  2. 2

    Confirm it is in the first HTML

    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.

  3. 3

    Inspect with Google

    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.

Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01Which elements support data-nosnippet?

Google documents span, div and section elements. It is a boolean attribute, so any value is ignored.

02Does data-nosnippet remove a page from search?

No. It only marks part of the page as not usable in a snippet. To keep a page out of results, use noindex.

03Does data-nosnippet stop AI Overviews using my text?

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.

04Can I add data-nosnippet with JavaScript?

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.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  1. 01Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (Google Search Central)developers.google.com · checked 2026-10-25
  2. 02AI features and your website (Google Search Central)developers.google.com · checked 2026-10-25
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane