A code-led guide to using data-nosnippet for element-level preview boundaries around volatile claims while keeping pages indexable and useful.
Documented fact: Google documents data-nosnippet as an HTML attribute for preventing selected page sections from appearing in Search snippets, while nosnippet controls the whole page snippet.
CDM inference: CDM’s Preview Boundary DOM Map and release checklist are implementation governance, not a guarantee that every AI surface will treat content identically.
Understand what data-nosnippet controls
Google’s snippet-control documentation says snippets are primarily created from page content and may vary by query. It distinguishes three controls: nosnippet to prevent a page snippet, max-snippet to limit length and data-nosnippet to prevent selected parts of a page from appearing in a snippet.
data-nosnippet is an element-level preview boundary. It does not remove the page from the index, correct the underlying statement, revoke a third party’s copy, secure private information or guarantee behaviour in every AI product.
Use it only when the page remains useful and eligible for discovery but a specific block is unsuitable for preview. Examples include a rapidly changing stock statement, a personalised estimate, an embargoed summary already visible to authorised users, or an old claim retained inside a correction record. Sensitive or unauthorised information should not be published in public HTML merely because the attribute exists.
Implement the smallest meaningful boundary
The attribute belongs on a supported HTML element in the rendered document. Wrap the complete claim—including qualifiers that would become misleading if separated—inside one boundary.
<p>The service is available in selected markets.</p> <div data-nosnippet> <p>Current promotional price: £49 until 31 October.</p> <p>Eligibility and stock vary by location.</p> </div> <p>Check the checkout for the final total and availability.</p>Do not hide the qualifier while leaving the headline claim eligible for preview. “From £49” without the eligibility conditions could create a worse snippet. Keep the semantic unit together.
Apply the attribute in the server-rendered or reliably rendered output. A component prop that never reaches the DOM provides no boundary. Inspect the page source and rendered DOM after the production build.
| Situation | Likely control | Reason |
|---|---|---|
| One volatile public block; page remains useful | data-nosnippet | Element-level preview boundary |
| No snippet should be shown for the page | nosnippet | Page-level snippet control |
| Page must not appear in Search | noindex under current Google rules | Indexing control, not merely preview |
| Information must be private | Authentication and access control | Public markup is not security |
| Claim is wrong | Correct or remove the claim | Preview suppression does not repair truth |
Build a Preview Boundary DOM Map
CDM asset: Preview Boundary DOM Map
- Page template and canonical URL
- Claim text and business owner
- Reason for boundary and approved duration
- Containing DOM selector and rendered element
- Qualifiers included inside the same boundary
- Structured data, meta description, feed and API duplicates
- Cache layers and deployment path
- Test query, screenshot and next review date
The duplicate inventory matters. A price inside data-nosnippet may still exist in Product structured data, a merchant feed, an Open Graph description, client-side state or a separate page. The attribute does not reconcile those surfaces.
Mark stable and volatile zones in the content model. Editors should know which fields carry preview restrictions and why. Avoid letting writers paste the same claim into an ungoverned summary.
Test the release from source to visible result
- Inspect the final HTML response and rendered DOM.
- Confirm the attribute is spelled correctly and on the intended container.
- Check that structured data and meta descriptions do not repeat the restricted claim.
- Test responsive and alternative templates.
- Purge or document application, CDN and page caches.
- Request re-crawl only through supported processes where appropriate.
- Observe snippets across representative queries over time.
- Store evidence and the product/documentation version used.
A manual query immediately after deployment is not proof of failure or success. Google chooses snippets by query, and recrawl or propagation can take time. Preserve the before/after HTML and use a review window appropriate to crawl frequency.
If the restricted text continues to appear, verify the canonical, duplicate URLs and cached versions before adding more controls. The visible result may come from another source.
Treat volatile claims as a lifecycle problem
Every volatile claim needs an owner, evidence, activation time, expiry and fallback. The best outcome is often to update the claim quickly rather than suppress it indefinitely. A boundary can reduce preview risk while the public page remains accurate and useful.
Create a release rule: content that changes faster than the organisation can verify, publish and propagate should not be framed as a durable promise. For price, stock, availability and eligibility, connect the page to a governed source of truth where feasible.
Log why the attribute was added and when it can be removed. Permanent, unexplained preview suppression can reduce useful visibility and hide editorial debt.
Limits and risks
The control is documented for Google snippets. Other search engines, AI assistants, browser agents, feeds and private retrieval systems may have different controls. Test each provider separately.
Public content can be copied, cached or quoted elsewhere. Never rely on snippet controls for confidentiality, legal deletion or access restriction. Involve counsel for removal obligations and high-risk claims.
CDM verdict
data-nosnippet is a precise preview boundary, not an eraser. Use it on the smallest complete claim unit, inspect the rendered DOM and every duplicate surface, and give the boundary an owner and expiry. Accuracy, access control and source-of-truth operations still do the real work.
Related guides
Frequently asked questions
Does data-nosnippet remove text from Google’s index?This article is editorial guidance. Apply the principles in proportion to your market, evidence, and responsibilities.



