What is max-snippet?

max-snippet tells search engines the longest piece of text they may quote from a page. It is written with a number: max-snippet:160 allows up to 160 characters, max-snippet:0 allows none, and max-snippet:-1 leaves the length to the search engine.

Publishers use it when they want a page listed but do not want long passages reproduced, for example on paywalled articles or reference content where the quoted answer would replace the visit.

How it works

The directive sits beside index or follow in the meta robots tag, or in an X-Robots-Tag header. Google describes three cases:

  • A positive number is a ceiling in characters for the text snippet.
  • 0 means no snippet, the same as nosnippet.
  • -1 means Google chooses the length it thinks works best.

With no max-snippet at all, Google also chooses the length. The limit covers text only; image and video previews have their own directives. Google states that it applies across result types that show a snippet, and lists AI Overviews and AI Mode among them, which is why the directive comes up in discussions of AI Overviews.

To keep one passage out of snippets while leaving the page unrestricted, the data-nosnippet attribute on a span, div or section is the narrower tool.

Example

Allow a short teaser only:

html
<meta name="robots" content="max-snippet:120" />

State that there is no limit, together with the other two preview directives:

html
<meta name="robots" content="max-snippet:-1, max-image-preview:large, max-video-preview:-1" />

Hide one paragraph and leave the page free:

html
<p>Public summary.</p>
<div data-nosnippet>Subscriber-only detail.</div>

In WordPress

WordPress core does not print max-snippet; it is left to SEO plugins or custom code on the wp_robots filter. Hydrogen SEO prints max-snippet:-1 on indexed pages from version 0.0.30. The number can be changed for the whole site under Robots → Snippets & Previews, or for one post, page or term in its SEO Settings sheet; see snippet and preview controls.

Common mistakes

  • Setting a low number site-wide to "protect" content. Short or missing snippets make every result less inviting, on every page.
  • Expecting it to shorten the title. It limits the snippet, not the title link.
  • Confusing it with meta description length. A description longer than the limit is cut at the limit.

Common questions

What does max-snippet:-1 mean?

That there is no limit: the search engine may choose how long a snippet to show. It is the most permissive value and has the same practical effect as leaving the directive out.

Does max-snippet affect featured snippets?

It can. A featured snippet is a text snippet, so a low limit can leave too little text for a page to be used as one. A page with nosnippet or max-snippet:0 cannot be quoted at all.