New options to preview your content on Google Search
Google is giving site owners new ability to customize snippet and content preview is previewed in search results. Previously, it was only possible to allow a textual snippet or to not allow one. Now Google introducing a set of methods that allow more fine-grained configuration of the preview content shown for your pages. This is done through two types of new settings: a set of robots meta tags and an HTML attribute.
Using robots meta tags
The robots meta tag is added to an HTML site’s <head> or specified via the x-robots-tag HTTP header. The robots meta tags addressing the preview content for a site are:
“max-snippet:[number]
"
Specify a maximum text-length, in characters, of a snippet for your page.“max-video-preview:[number]
"
Specify a maximum duration in seconds of an animated video preview.“max-image-preview:[setting]
"
Specify a maximum size of image preview to be shown for images on this page, using either "none", "standard", or "large".
They can be combined like this:
<meta name="robots" content="max-snippet:50, max-image-preview:large">
Preview settings from these meta tags will become effective in mid-to-late October 2019 and may take about a week for the global rollout to complete.
Using the new data-nosnippet HTML attribute
A new way to help limit which part of a page is eligible to be shown as a snippet is the “data-nosnippet
" HTML attribute on span
, div
, and section
elements.
For example like this:
<p><span data-nosnippet>John Doe</span> is most famous actor in Detroit.</p>