How do I exclude one page section from Google snippets?

The Citead team, updated

In short. Add data-nosnippet to a span, div, or section containing the text to exclude, and close the element correctly.

Definition: As of 17 October 2026, Google's robots meta tag specification supports data-nosnippet on span, div, and section elements to exclude their text from search snippets. A snippet is the description or summary displayed within a search result.

Key facts

Where does the attribute go?

Google's placement rules put the attribute on the HTML element containing the text to exclude. A span can enclose part of a paragraph. A div or section can enclose a larger region, including paragraphs and lists.

This example adapts Google's documented markup to a section:

<p>This text can be shown in a snippet.</p>
<section data-nosnippet>
  <p>However, this is not in snippet.</p>
</section>

The excluded region ends at the matching closing tag. Google requires valid HTML and appropriately closed tags; its example warns that an unclosed div includes all content afterwards. For a custom HTML element, the same documentation instructs publishers to wrap or render it with a supported div, span, or section element.

Does setting the value to false disable it?

No. Google's boolean-attribute examples show that all these forms exclude their contents:

<div data-nosnippet>not in snippet</div>
<div data-nosnippet="true">also not in snippet</div>
<div data-nosnippet="false">also not in snippet</div>

Any supplied value is ignored. Removing the attribute removes this particular restriction, subject to Google's guidance on JavaScript changes below.

How should JavaScript handle the attribute?

Rendering is the processing of a page, including its JavaScript, to produce its displayed content. Google's implementation guidance says extraction of data-nosnippet can happen before or after rendering. It advises against adding or removing the attribute on existing elements through JavaScript.

When JavaScript creates a new element, the attribute belongs on that element when it is first added to the page's document structure. This also applies when a custom component produces a supported wrapper element.

How can the implementation be checked?

The URL Inspection tool documentation describes inspecting a URL and selecting Test live URL. For the live test, View tested page > More info exposes page code and resource information. Inspecting that code for the supported wrapper, attribute and closing tag provides an implementation check.

Google's robots specification also requires crawler access to the page for these settings to be read. The HTML check therefore accompanies a check that the page is accessible to Google.

FAQ

Can I put data-nosnippet directly on a custom element?

Google's specification supports span, div, and section. If you use a custom element, wrap or render it with one of those supported elements.

Does this exclude structured data inside the section?

Structured data is markup that supplies specific information for search presentation. The same specification says it remains usable for search results inside a data-nosnippet element; you must edit the structured-data types and values themselves to control the information supplied.

Can I choose the exact remaining snippet?

Google's snippet documentation says snippets are created automatically and can differ between searches. Google primarily uses page content and sometimes uses the meta description, an HTML element describing the page.

Sources

  1. Google Search Central, "Robots meta tag, data-nosnippet, and X-Robots-Tag specifications", updated 24 March 2026
  2. Google Search Central, "Control your snippets in search results", updated 20 April 2026
  3. Google Search Console Help, "URL Inspection tool", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark