What snippet rules do
Snippet rules decide how much of your page search engines may show as a preview. Google applies the same rules to AI Overviews, so a single directive can take your page out of AI answers.
How it works
A snippet is the short excerpt a search engine shows below a result. You control its length with robots directives, either in the robots meta tag in the HTML or in the HTTP header X-Robots-Tag:
<meta name="robots" content="max-snippet:-1">
X-Robots-Tag: max-snippet:-1
Google uses these rules for AI Overviews and AI Mode as well: whatever may not appear in a snippet, Google does not use as the basis for an AI answer either.
nosnippetforbids any snippet.max-snippet:[number]limits the snippet to that many characters;0acts likenosnippet,-1means no limit.- The attribute
data-nosnippeton an element (<div data-nosnippet>) removes just that part.
What matters
- No
nosnippetand nomax-snippet:0. Either keeps the page out of AI Overviews. bytereport rates this as a failure. - No limit that is too tight. Below 50 characters there is almost nothing left to quote; bytereport then warns. Without a reason,
max-snippet:-1is the best choice, or leave the rule out altogether. - Use
data-nosnippetsparingly. Parts with the attribute are left out of snippets and AI Overviews. That makes sense for cookie notices or legal text, not for your actual content. bytereport counts the marked parts of the start page and warns as soon as there are any. noaiandnoimageaiare not a standard. Some plugins set them, but the large services do not reliably follow them. If you want to rule out AI training, do it in robots.txt; see AI crawlers.- Don't forget the header. A rule in
X-Robots-Tagworks just like one in the meta tag, but you can't see it in the page source.
How to set it up
The robots meta tag is usually set by the content management system or an SEO plugin; look there for settings on snippets or search previews. The X-Robots-Tag header comes from the web server configuration or your hosting provider. Remove nosnippet in both places if the page should appear in AI answers, and check templates and themes for data-nosnippet on content areas.
Snippet rules only matter if the page may be indexed in the first place; see indexability.