Keep part of a page out of Search snippets
data-nosnippet is an HTML attribute that tells Google not to use selected text in a Search snippet.
Google says text marked with data-nosnippet is also not used as direct input for AI Overview and AI Mode answers. Direct input means text Google can take from a page as material for generating an answer. The page itself can remain in Google Search while the selected text is limited. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
For example, a public service page can keep its main description searchable while excluding a time-limited promotion, a note for existing customers, or a temporary pricing qualification.
| Goal | What data-nosnippet does |
|---|---|
| Keep the page in Google Search | It can remain indexed |
| Exclude selected text from snippets | It can be specified on an HTML element |
| Keep selected text out of AI Overview answer generation | It can be specified on an HTML element |
| Remove the whole page from Google Search | Use noindex |
| Stop text snippets for the whole page | Use nosnippet |
Use data-nosnippet when only selected public text needs a narrower display scope.
How data-nosnippet differs from nosnippet and max-snippet
The important distinction is scope.
| Control | Scope | Primary Search effect | AI Overview and AI Mode effect |
|---|---|---|---|
data-nosnippet |
Selected HTML element | Removes that text from snippets | Removes that text from direct answer input |
nosnippet |
Entire page | Removes text snippets and video previews | Removes page text from direct answer input |
max-snippet:number |
Entire page | Caps snippet length | Caps the amount of page content used as direct answer input |
noindex |
Entire page | Removes the page from Google Search results | The page is not eligible as a supporting Search link |
nosnippet applies across Google web search, Google Images, Discover, AI Overviews, and AI Mode. max-snippet:0 has the same effect as nosnippet. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
Use data-nosnippet when the page should remain searchable but one section needs to stay out of snippets. Use nosnippet when text previews across the full page need to be limited.
When data-nosnippet is useful
Use the attribute when the main answer should remain public but a specific part of the page needs to stay out of Google Search snippets and generative AI answer inputs.
| Example | Reason to consider it |
|---|---|
| A temporary campaign qualification | Prevent an expired condition from being extracted on its own |
| A short-term note in a pricing table | Separate it from the standard published price |
| A note for existing customers | Keep a public explanation distinct from a customer-specific qualification |
| A provisional value in an ongoing research page | Avoid presenting an unconfirmed number with the final result |
Avoid applying it broadly to prices, specifications, or comparison criteria that a reader needs to make a decision. Those details will no longer be eligible as material for Google Search snippets or AI Overview answers.
Sensitive internal or personal information needs an access-control or publishing decision. data-nosnippet is a display control for public content, not a protection mechanism.
Google notes that its generative AI features can show product and local business details. Review the information supplied through Merchant Center and Google Business Profile alongside the page itself. (Google Search Central: Optimizing your website for generative AI features)
How to use data-nosnippet
Google supports data-nosnippet on span, div, and section elements. It is a Boolean attribute, so its assigned value does not change the result. (Google Search Central: Using the data-nosnippet HTML attribute)
Use span for part of a sentence.
<p>
The standard price is $30 per month.
<span data-nosnippet>The first-month price differs during the campaign.</span>
</p>
Use div or section when the targeted content covers several elements.
<section data-nosnippet>
<h2>Note for customers on a legacy plan</h2>
<p>This condition applies only to existing contracts.</p>
</section>
Custom HTML elements are not supported for this attribute. Wrap the target text in a div, span, or section. (Google Search Central: Using the data-nosnippet HTML attribute)
Three checks before implementation
1. The content and publishing policy
Decide whether the information belongs on the public page at all, or whether only its snippet eligibility needs to change.
Correct inaccurate prices and remove content that should not be public. Use data-nosnippet for public information whose display scope needs adjustment.
2. The opening and closing tags
An overly broad data-nosnippet element can include later page text by mistake.
Google recommends valid HTML with every tag properly closed. An unclosed element can cause following content to fall inside the limited area. (Google Search Central: Using the data-nosnippet HTML attribute)
3. Do not add or remove the attribute later with JavaScript
Google may render a page for indexing, but the attribute can be extracted before or after rendering. Do not add or remove data-nosnippet on an existing node with JavaScript.
When JavaScript creates an element, include the attribute when that element is first added to the DOM. (Google Search Central: Using the data-nosnippet HTML attribute)
Structured data and robots.txt considerations
Structured data inside an element marked with data-nosnippet can still be used in Google Search. If that information needs a narrower scope, revise the structured-data type or value itself. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
Googlebot must be allowed to crawl a URL before it can discover data-nosnippet or robots meta controls on that page. Keep the URL crawlable when relying on those controls. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
Treat page access, structured data, and selected-text display controls as separate changes. Record each one so their effects remain clear.
What to review after publishing
Check the HTML Google can retrieve as well as the rendered page.
| Check | What to confirm |
|---|---|
| HTML | The attribute is output on a span, div, or section |
| Scope | The limited area does not include unrelated headings or body text |
| Tags | Opening and closing tags match |
| JavaScript | Client code does not change the attribute later |
| Structured data | The limited information is not still supplied in structured data |
| robots.txt | Googlebot can retrieve the URL |
Do not judge the effect from one AI Overview or AI Mode result immediately after publishing. Review crawl access, indexing, the page content, and Search Console data separately.
For a full eligibility, content, and measurement workflow, read our Google AI Overviews troubleshooting checklist.
Review the technical settings and page content
data-nosnippet adjusts the scope of text used in Google Search previews and generative AI answers. A page that remains available as a source also needs a clear answer, applicable conditions, and supporting evidence.
Please Cite Me! audits a public URL for technical access and content gaps that matter in AI search.
After adding the setting, audit the technical state and content of the page.
About the author

Yuma Okamoto
Developer of Please Cite Me! and CEO of Abeam Tech Inc.
University of Tokyo graduate focused on web product development, SEO, and information architecture for AI search, with a particular interest in how web content is understood and cited by search engines and AI.
X / @okamoto_yuma_Frequently asked questions
Does data-nosnippet remove a page from Google Search?
No. data-nosnippet removes text inside the selected HTML element from snippets. Use noindex when the goal is to remove a page from Google Search results. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
Can text marked with data-nosnippet be used in an AI Overview answer?
Google says that marked text is not used as direct input for AI Overview and AI Mode answers. This control applies to Google Search; it does not control how other AI services use a public page. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag)
Where can I add data-nosnippet in HTML?
Add it to a span, div, or section. Use span for a short part of a sentence, and use div or section for a note, a table qualification, or several paragraphs. Custom elements are not supported. (Google Search Central: Using the data-nosnippet HTML attribute)
Do I need nosnippet if the page already has noindex?
No. noindex is sufficient when the goal is to remove the page from Google Search. A page must be indexed and eligible for a Search snippet to appear as a supporting link in AI Overviews or AI Mode. Use nosnippet when the page should remain in Google Search while limiting text previews and the page text used in AI Overview or AI Mode answers. (Google Search Central: Robots meta tags, data-nosnippet, and X-Robots-Tag, Google Search Central: AI features and your website)
Sources
Please Cite Me!
Audit your page for AI search
Please Cite Me! reviews a public page's technical access and editorial clarity, then turns the evidence into a prioritized report.
Audit a page