Obtenga AI SEO GRATIS.

¡Aprende más!

What is Data-Nosnippet?

Data-nosnippet is an HTML attribute instructing search engines, notably Google, not to display certain content as featured snippets o rich results. It is applied to the <div>, <span>, or <section> HTML elements.

For example, the data-nosnippet attribute below instructs search engines not to use any text within the section as a rich or featured snippet. 

<section data-nosnippet>
The text in this section will not be used as a snippet on search result pages.
</section>

Google obeys the data-nosnippet attribute, and any div, span, or section containing it will not be displayed as featured snippets or rich results on its results pages. Google will also not display video previews or meta descriptions for such pages.

Why the Data-Nosnippet Attribute is Important

The data-nosnippet attribute gives bloggers greater control over how their content is displayed on search engine results pages (SERPs). Specifically, it allows bloggers to prevent search engines from displaying specific content from appearing as featured results, rich results, meta descriptions, and video reviews.

Bloggers can use it to prevent search engines from displaying sensitive, incomplete, and inaccurate information on search results pages. This is handy when search engines display the wrong snippet, inaccurate meta description, or boilerplate text instead of unique snippets and meta descriptions for the webpage. 

Some countries and industries may also have legal or regulatory restrictions on what information can be displayed publicly. In this case, the data-nosnippet attribute helps websites comply with these requirements by preventing restricted content from appearing in search results.

Take note that while Google supports the data-nosnippet attribute, other search engines may not. Google can only read and follow the data-nosnippet attribute when it can access the page. So, make sure not to block Google from accessing the page using your robots.txt file.

Nosnippet or Data-Nosnippet: Differences and Similarities

The data-nosnippet attribute has a role similar to the nosnippet tag. Both are used to block search engines from displaying content from a webpage as snippets.

However, while the nosnippet is a meta tag that is applied to the entire webpage, the data-nosnippet is applied to specific content on the webpage. Specifically, the data-nosnippet tag is applied text embedded within the <div>, <span>, y <section> HTML attributes. 

Overall, when you want to prevent search engines from using specific areas of the webpage as snippets, you use the data-nosnippet attribute. Sin embargo, if you do not want Google to display any part of a webpage as a snippet, you use the nosnippet tag below. 

<meta name="robots" content="nosnippet">

The nosnippet meta tag has a higher priority than the data-nosnippet attribute. So, when you use both on a webpage, Google will apply the nosnippet meta tag and will not display any content as snippets. 

🇪🇸 Español