Crawling, robots & indexing directives

data-nosnippet HTML Attribute

An inline HTML boolean attribute that excludes individual <span>, <div> or <section> blocks from Google Search text snippets, featured snippets and AI Overviews while keeping the rest of the page eligible.

Verified

Syntax / Example

<section data-nosnippet>
  <p>Cookie preferences and footer notices hidden from SERP snippets.</p>
</section>

Verify On A Live URL

curl -sL https://example.com/page | grep -i "data-nosnippet"

Documented Facts For data-nosnippet HTML Attribute

Metric or RuleDocumented ValueSource
Supported HTML elements<span>, <div> and <section>Google: Robots Meta Tag & X-Robots-TagChecked November 25, 2026
Page-level indexing impactNone — page stays indexed with normal snippets elsewhereGoogle: Robots Meta Tag & X-Robots-TagChecked November 25, 2026
AI Overviews applicabilityExcludes marked text from Google AI OverviewsGoogle: Robots Meta Tag & X-Robots-TagChecked November 25, 2026

Official Specification & Google Behavior

Google Search Central documents data-nosnippet for excluding specific DOM elements (span, div, section) from snippet generation without applying a page-wide nosnippet meta tag.

SEO & Indexing Impact

Preserves full organic CTR and AI Overview eligibility for your main article while keeping legal boilerplate, cookie banners, promo boxes or paywalled teasers out of search descriptions and AI summaries.

Backlink Monitoring Verdict
Does not block crawling, indexing or outbound link equity—it strictly hides the marked text block from search snippet extraction.

Common Pitfalls

  • Placing data-nosnippet on a parent <main> wrapper by mistake and blanking out the entire page's snippet.
  • Applying data-nosnippet only via client-side JavaScript after initial load instead of server-rendered HTML.

Frequently Asked Questions

How is data-nosnippet different from meta robots nosnippet?
Meta robots nosnippet removes the entire page's text snippet and AI Overview eligibility, whereas data-nosnippet excludes only specific span, div or section blocks.
Does data-nosnippet stop Google from indexing or ranking the page?
No, Google still crawls and indexes the URL normally while omitting the tagged element's text from displayed snippets.
Can data-nosnippet hide cookie banners or pricing disclaimers from Google snippets?
Yes, wrapping cookie notices, modal boilerplate or sidebars in a div or section with data-nosnippet prevents them from polluting SERP descriptions.

Primary Sources

Verified

Related Research Guides