Google Introduces New Robots Attributes For Snippets

Anyone who uses Google regularly will have become aware that they have started including content from websites in their search results. For example if you search for "lasagne recipe" you will be presented with actual recipe information (something that is called a "Rich Snippet") instead of links to pages that contain recipes. Google takes this information directly from websites in the search results, usually because those web pages contain "Structured Data", which is a way of helping Google understand the content of your web pages.

Previously, it was not possible to control if or how Google used content from your web pages to create rich snippets. In September Google announced that it would now support a range of new "robots tag" attributes for controlling whether any content on your web pages can be used for rich snippets, and if so which content should be used. The following attributes can be added to your "robots tag" at the page-level:

  • nosnippet: Used to specify that you don't want any snippet shown for this page.
  • max-snippet:[number]: Used to specify a maximum text-length, in characters, of a snippet for your page.
  • max-video-preview:[number]: Used to specify a maximum duration in seconds of an animated video preview.
  • max-image-preview:[setting]: Used to specify a maximum size of image preview to be shown for images on this page, using either "none", "standard", or "large".

And, if you want to have more granular control over which parts of a web page can be used for rich snippets, you can also use the "data-nosnippet" HTML attribute on span, div, and section elements to prevent that content from being shown within snippets.