Snippet and Preview Controls
Set max-snippet, max-image-preview, max-video-preview, nosnippet and noimageindex site-wide, and override them for any post, page or term.
On this page
- What changes when you update
- The site-wide setting
- Override one post, page or term
- Where the directives appear
- What each directive does
- Check the tag
- Coming from another SEO plugin
- For developers
- Performance
- FAQ
- Did my site print max-image-preview:large before this version?
- Should I change the defaults?
- Does max-snippet change my meta description?
- Is nosnippet the way to stay out of AI answers in Google?
- Can I set a different default for one post type?
- Related reading
The robots meta tag does two jobs. One is indexing: whether a page may be listed at all, which robots meta settings covers. The other is presentation: how much of an indexed page a search engine may show. From version 0.0.30, Hydrogen SEO handles the second job too, with five directives:
| Directive | What it limits |
|---|---|
max-snippet:[number] | The longest text snippet, in characters |
max-image-preview:[none, standard or large] | The largest image preview |
max-video-preview:[number] | The longest video preview, in seconds |
nosnippet | No text snippet and no video preview at all |
noimageindex | The images on the page are not indexed |
There is one site-wide setting, and any post, page or term can override it. The feature is free and needs no account.
What changes when you update
Before 0.0.30, Hydrogen SEO printed only the indexing directives. From 0.0.30, every indexed page also carries the three limits at their most permissive values:
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1" />
-1 means no limit. These values tell search engines they may use a snippet of any length, a large image and a video preview of any length. Google's Discover guidance recommends images at least 1,200 pixels wide and lists max-image-preview:large (or AMP) as what enables large images there, which is the main practical reason to print it; see max-image-preview:large and Google Discover.
Pages that are noindex never get these directives, since a page that is not listed has no snippet to limit. If you want the tag to stay stricter than the defaults, change the site-wide setting described next.
The site-wide setting
Open Hydrogen SEO → Robots. Below the Post Types and Taxonomies tables is a third card, Snippets & Previews:
| Field | Values | Default |
|---|---|---|
| Max snippet length | Characters. -1 = no limit, 0 = no text snippet | -1 |
| Max image preview | None, Standard or Large | Large |
| Max video preview | Seconds. -1 = no limit, 0 = still image only | -1 |
| No snippet | Switch | Off |
| No image index | Switch | Off |
Under the fields, a line beginning Printed on indexed pages: shows the exact directives your choices produce, so you can read the result before it reaches a page. Like the rest of the Robots screen, the card saves by itself.
Two pairs of fields depend on each other:
- With No snippet on, the snippet length and video preview fields are disabled, and
max-snippetandmax-video-previeware left out of the tag.nosnippetalready rules both out. - With No image index on, the image preview field is disabled and
max-image-previewis left out.
Numbers below -1 are raised to -1, and anything that is not a whole number is ignored, so the tag cannot carry a malformed value.
Override one post, page or term
- Open the post, page or term and open the SEO Settings sheet.
- Open the Robots Meta section.
- Switch off Snippets & previews: use site default. The same five fields appear, filled with the site-wide values as a starting point.
- Change what this page needs and save.
Switching use site default back on removes the page's own values, and it follows the Robots screen again. While No Index is on for the page, the row reads Not printed while No Index is on: the values are kept, but nothing is printed until the page is indexable again.
A typical use: a recipe site keeps the permissive defaults everywhere, and sets Max snippet length to 160 on the handful of pages where the full method should be read on the site.
Where the directives appear
| Page | Values used |
|---|---|
| Posts, pages and custom post types | The page's override, otherwise the site-wide setting |
| Category, tag and custom taxonomy archives | The term's override, otherwise the site-wide setting |
| A static front page | Its own override as a page, otherwise the site-wide setting |
| A latest-posts homepage, post type archives, and author and date archives set to Index | The site-wide setting |
| Anything noindex: search results, the 404 page, noindexed posts and archives | None |
When Settings → Reading → Discourage search engines is checked in WordPress, the whole site is noindex, nofollow and none of this is printed.
What each directive does
These descriptions follow Google's robots meta documentation. Other search engines support most of the same directives, with their own details.
max-snippet. Caps the text snippet at that many characters. Google notes that it applies to every kind of result that shows a snippet, including AI Overviews and AI Mode, and that 0 is the same as nosnippet. It does not limit image or video previews.
max-image-preview. none shows no image preview, standard a default-size one, and large allows a preview up to the width of the viewport. Without the directive, Google may show an image preview of the default size.
max-video-preview. Caps a video preview at that many seconds. 0 allows at most a still image, subject to the image preview setting.
nosnippet. No text snippet or video preview is shown for the page, and Google does not use the page's content as direct input for AI Overviews and AI Mode. An image thumbnail may still be shown. To hide only one passage, leave the page alone and wrap the passage in an element with the data-nosnippet attribute in your content instead.
noimageindex. Asks search engines not to index the images on the page. Without it, those images may be indexed and shown in image results.
Restricting snippets has a cost. A result with a shorter snippet, or none, gives searchers less reason to choose it, and a page with nosnippet cannot appear in the features that quote pages. Use limits for a specific reason, such as paywalled text or licensing terms.
Check the tag
View the page source and search for name="robots", or run:
curl -s "https://yoursite.com/a-post/" | grep -i 'name="robots"'
If the tag still shows the old values, clear your page cache. In Search Console, the URL Inspection tool's live test shows the tag Google reads.
Coming from another SEO plugin
Tools → Import SEO Data carries snippet and preview settings across from version 0.0.30:
| Source plugin | Site-wide | Per post |
|---|---|---|
| Rank Math | Snippet, image and video limits, nosnippet and noimageindex | Yes |
| Yoast SEO | Nothing to bring: it has no site-wide value | nosnippet and noimageindex |
| All in One SEO | All five, when its global robots setting is not on "use default settings" | Yes, for posts with their own robots settings |
| SEOPress | nosnippet and noimageindex | nosnippet and noimageindex |
| The SEO Framework | Snippet, image and video limits, while its copyright directives option is on | No |
A post stores only what differs from the site-wide values being imported, so posts that merely repeated the old default keep following the Robots screen. Hydrogen SEO sets these directives site-wide and per page, not per post type, per taxonomy or for the homepage alone; values the old plugin held at those levels are listed in the import report and not copied. Where the old plugin had a limit switched off entirely, Hydrogen SEO prints its default for it, and the report says so. See switch from another SEO plugin.
For developers
The hydrogen_seo_advanced_robots filter receives the resolved values for the current page (max_snippet, max_image_preview, max_video_preview, nosnippet, noimageindex) and the page's stored override. The finished list of directives still passes through hydrogen_seo_robots_directives. Both are in the filters reference.
// No text snippets on a custom post type.
add_filter( 'hydrogen_seo_advanced_robots', function ( $values ) {
if ( is_singular( 'report' ) ) {
$values['nosnippet'] = true;
}
return $values;
} );
Performance
The site-wide values live in the robots settings Hydrogen SEO already loads on every request, and a page's override arrives with the rest of its SEO data. Printing the directives adds no database query.
FAQ
Did my site print max-image-preview:large before this version?
Not through Hydrogen SEO. WordPress adds max-image-preview:large to its own robots tag, but Hydrogen SEO replaces that tag with one of its own, and until 0.0.30 its tag held only the indexing directives. From 0.0.30 the directive is back on every indexed page.
Should I change the defaults?
Most sites should not. The defaults let search engines show as much as they choose to, which is what a page competing for clicks wants. Change them when you have a reason to show less.
Does max-snippet change my meta description?
No. It limits how much text a search engine may show, whether that text comes from your meta description or from the page. A limit shorter than your description cuts the description off at that length.
Is nosnippet the way to stay out of AI answers in Google?
For Google's AI Overviews and AI Mode, yes: Google's documentation names nosnippet, data-nosnippet and max-snippet as the controls. They also remove or shorten the ordinary snippet, so the cost is paid in normal results too. Crawlers that collect training data are a separate matter, handled in robots.txt.
Can I set a different default for one post type?
Not from the settings. Use a per-page override for individual pages, or the hydrogen_seo_advanced_robots filter for a whole post type.