Recently Updated: 17 min read

nosnippet, max-snippet and data-nosnippet Explained

nosnippet, max-snippet and data-nosnippet Explained

If you publish content that is paid for, licensed or context-sensitive, you may not want every sentence of it shown in search results. Google gives you four robots directives for this: nosnippet, max-snippet, data-nosnippet and noindex. Three of them change how your page is previewed; only noindex removes it from results. Each carries a visibility cost, so the right question is not "how much can I hide" but "what is the least I need to limit, and what does it cost me".

This guide is written for publishers, owners of licensed material and SEO specialists. It begins with what each directive actually blocks, then looks at the situations where limiting a snippet makes business sense. After that come page-level and element-level code examples, ways to verify the effect, and an honest look at the cost. Measuring AI visibility is a different subject and is not covered here.

The Four Directives and What Each Really Blocks

It is easy to mix these up, because they all sit in the same robots vocabulary and they all affect how a result looks. The statements below follow Google's robots meta tag documentation (Opens in a new tab).

nosnippet

The documentation describes nosnippet as an instruction not to show a text snippet or video preview for the page in search results. A static image thumbnail may still appear. The directive also applies to AI Overviews and AI Mode, and according to the page it will also prevent the content from being used as a direct input for those features.

max-snippet

max-snippet:[number] caps the text snippet at a number of characters. A value of 0 is equivalent to nosnippet, and -1 lets Google choose the length. A value that cannot be parsed is ignored. The limit applies to AI Overviews and AI Mode as well, with one exception stated on the page: it does not apply where a publisher has separately granted permission for use of the content. The page does not explain the legal effect of such permission.

data-nosnippet

This is an HTML attribute rather than a robots value. It works on span, div and section elements only. Any value you give it is ignored, and the tags must be valid and properly closed. Because Google may extract content before or after rendering, the documentation says not to add or remove the attribute with JavaScript; it should be present when the element is first added to the DOM. One more detail from the page: structured data stays usable for search results even when it is declared inside a data-nosnippet element.

noindex

The documentation phrases noindex as "do not show this page, media, or resource in search results". It changes whether the page appears at all, not how it looks. We cover that tag and its HTTP header version in our noindex and X-Robots-Tag guide, so we will not repeat the details here.

Side-by-side comparison

DirectiveScopePage still listed?What changes
nosnippetWhole pageYesNo text snippet or video preview; AI Overviews and AI Mode affected
max-snippet:[n]Whole pageYesText snippet capped at n characters
data-nosnippetMarked span, div or sectionYesThe marked part is excluded from snippets
noindexWhole pageNoPage is removed from search results

When rules collide

You can separate rules with commas or spread them over several tags. If they conflict, the more restrictive rule applies; the documentation's own example is that nosnippet overrides max-snippet:50. When different crawlers receive different rules, Google combines the restrictive ones, so a general nofollow plus a Googlebot-specific noindex becomes noindex and nofollow for Googlebot. In practice this means you need to know every place that can emit a robots rule, such as the page template, an SEO plugin and a server header. A forgotten nosnippet in one of them can quietly strip snippets from a whole section.

Googlebot must be able to read the page

The page says these settings can be read and followed only if crawlers are allowed to access the page. If robots.txt blocks a URL, the meta tag on it is never read, so the rule does nothing. Do not block a page in robots.txt and expect its snippet rule to apply.

When Limiting Snippets Makes Business Sense

For most informational pages, a visible snippet is exactly what you want. A limit earns its place only when there is a concrete reason, and naming that reason first prevents both needless loss of visibility and a false sense of protection.

Premium research and paid reports

Imagine a firm that sells market reports. The title and a short abstract are public, and the full analysis sits behind a purchase. A long snippet that summarizes the conclusions could reduce the incentive to buy. A cap with max-snippet is a middle path: the page stays listed with a preview, but the preview is short. The directive works on the page that crawlers can read, so it fits pages where the abstract is crawlable. The documentation page does not cover paywall markup, so treat that as a separate topic.

Licensed text, images and data

Licensed material often comes with limits on redistribution or quotation. If one block on a page, such as a licensed caption or a partner's data table, is subject to such limits, wrapping that block in a div with data-nosnippet keeps it out of snippets while the rest of the page stays eligible. Google's documentation does not say which technical directive satisfies which licence term. This is not legal advice: that is a question for the licence text and your adviser.

Sections that lose meaning out of context

Some text misleads when shown alone: a sarcastic review quote, a temporary promotional banner, a warning that only makes sense next to the section that follows. Marking such a block with data-nosnippet makes the snippet more likely to represent the main content. Keep one limit in mind, though. data-nosnippet affects snippet display only. If information must not be public, it should not be on a public page.

User-generated blocks

Discussion threads, comment sections and Q&A areas put your editorial copy and visitor-written text on one URL. If you do not want visitor comments to represent the page, wrap the comment area in a div with data-nosnippet. This is not moderation. The text remains visible on the page to everyone; only its role in snippets changes.

Choosing a first option

SituationFirst choiceWhy
Paid report with a public abstractmax-snippet with a short capKeeps the page listed with a brief preview
Page whose text must never be previewednosnippetRemoves the text snippet and direct input to AI features
One licensed or partner block on a pagedata-nosnippetThe rest of the page stays in the snippet
Page that should not appear at allnoindexThe only directive that removes the page
Snippet is fine but the intro is too revealingRewrite the opening paragraphNo directive needed

Structured data and article descriptions

According to the documentation, robots meta limits do not apply to structured data, except for article.description and similar description values. For those, use max-snippet. If one team maintains structured data and another manages robots rules, make sure someone owns this overlap.

Taking an inventory before deciding

Decide per content type, not per URL. List the page types on your site, such as editorials, member-only analysis, product pages, forum threads and licensed galleries, and answer three questions for each. Does a visible snippet serve the business goal? Does a contract or internal policy restrict previews? Does the page contain a block that misleads out of context? If all three answers are no, add nothing. Record the chosen directive and its reason in a table, so that nobody has to guess later why a rule exists.

Code Examples for Page and Element Level

The examples below follow the syntax in Google's documentation. Check the current page before copying anything into production, because the details can change.

Page-level robots meta tags

GoalExample tag
Turn off the text snippet<meta name="robots" content="nosnippet">
Cap the snippet at 50 characters<meta name="robots" content="max-snippet:50">
Let Google choose the length<meta name="robots" content="max-snippet:-1">
Limit only for Googlebot<meta name="googlebot" content="max-snippet:120">
Combine snippet cap and image preview size<meta name="robots" content="max-snippet:160, max-image-preview:large">

Google supports the tokens googlebot and googlebot-news; other values are ignored. max-image-preview (none, standard, large) and max-video-preview (seconds) are separate directives for images and video. They are mentioned here so you do not mistake them for text snippet controls.

Files that are not HTML

PDFs, images and videos cannot hold a meta tag, so the X-Robots-Tag HTTP header is used instead. Any rule that works in a meta tag also works in the header, and you can set it in server configuration with a file pattern. A single rule can therefore cover every PDF on a site. A user agent name can precede the rule; without one, the rule applies to all crawlers.

Element-level data-nosnippet

CaseExample
Valid inline use<p>Public summary text. <span data-nosnippet>A sentence to keep out of snippets.</span></p>
Valid block use<div data-nosnippet>Licensed partner data</div>
Not validPutting the attribute on a paragraph or heading directly; it is defined for span, div and section only
RiskyAdding or removing the attribute with JavaScript after load

If you need to mark a single sentence inside a paragraph, wrap it in a span. A tag that is not closed, or nested incorrectly, makes the effect unpredictable, and the documentation states that the tags must be valid and properly closed.

Managing the directive at template level

Typing directives by hand does not scale and is easy to forget. A more durable pattern is a template field tied to the content type. An editor picks a snippet policy for the page, and the template outputs the matching meta tag. For data-nosnippet, the editor marks a block as "excluded from snippets", and the template wraps it in a div and writes the attribute into the initial HTML. That avoids the JavaScript pitfall the documentation warns about. After each theme or plugin update, check the page source for the expected tag, because an update can silently drop or duplicate a rule.

Implementation checklist

  1. Is the page blocked in robots.txt? If so, the rule is never read.
  2. Is the directive needed for the whole page or only for one block?
  3. Could a plugin or server header add a conflicting rule? The stricter one wins.
  4. Is data-nosnippet on a span, div or section with valid, closed tags?
  5. Is the attribute in the first HTML, not added by a script?
  6. Are non-HTML files handled with an X-Robots-Tag header?
  7. Have article description values been considered for max-snippet?
  8. Is the change date recorded?

Example scenario: a recipe publisher with a members-only section

Example scenario: a recipe site shows the ingredient list and a short intro to everyone, and keeps the step-by-step method for members. The editors worry that long snippets reveal the method. They start with a short max-snippet cap on member recipes only, leaving the free recipes alone. After a few weeks they compare clicks and sign-ups for the two groups. If the cap harms visits more than it protects sign-ups, they loosen it; if the method still leaks through, they move to nosnippet for that group. The pattern is gradual and reversible.

Example scenario: a stock photo caption with a restricted credit line

Example scenario: a travel blog uses a photograph under an agreement that restricts third-party quotation of the credit text. The blog wraps just the credit line in a span with data-nosnippet. The article keeps its normal snippet. Whether this satisfies the agreement is for the agreement's owner to decide; the technical step only controls snippet display.

Verifying the Effect in Search Results

Adding the directive does not prove it works. There are two separate checks: that Googlebot sees the rule, and that the change shows up in results once Google has reprocessed the page.

Confirm Googlebot can see the control

Google's AI features documentation (Opens in a new tab) says that if content still appears in AI features after you add preview controls, you should confirm the control is correct and visible to Googlebot, using the URL Inspection tool. If you use Search Console in another language, menu names may differ. Check these points:

  • Is the meta tag or header present in the version Googlebot fetched?
  • Is the page free of a robots.txt block?
  • Is any data-nosnippet attribute in the initial HTML?

Allow time for recrawling

The same documentation says crawling can take "several days to several months" and that you can request a recrawl. Expect a delay and do not judge the result after a day. No exact timeline is given for your site.

What to look for in results

  1. Pick a query that returns the page, and view the results without personalization where you can.
  2. For nosnippet, confirm there is no text preview. A static thumbnail may remain.
  3. For max-snippet, compare the displayed length with your cap. Google may show a shorter snippet than the maximum.
  4. For data-nosnippet, search for a phrase from the marked block and confirm it does not appear in the snippet.
  5. Save a screenshot, the query and the date.

AI features need their own reading

The documentation says there are no additional requirements to appear in AI Overviews or AI Mode, and no special optimizations are necessary; the page must be indexed and eligible to appear in Search with a snippet. To limit what Search shows from your pages you can use nosnippet, data-nosnippet, max-snippet or noindex. Googlebot directives in robots.txt are the crawl control for Search, since AI is built into Search. For limiting AI training and grounding in some other Google systems, the page points to Google-Extended; we explain that token in our guide to AI crawlers and robots.txt.

Reporting caveat

Per the same documentation, sites appearing in AI Overviews and AI Mode are included in overall Search traffic and reported under the Web search type in Search Console performance. A drop in total traffic therefore cannot be pinned on a snippet directive without further data.

A test record

FieldWhat to write
Page groupContent type and number of pages
Directive and valueFor example, the cap chosen for max-snippet
Applied onThe date confirmed in the page source
Recrawl requestedWhether and when
Before and afterScreenshot, query, impressions and clicks
DecisionKeep, loosen or roll back, with the reason

The Visibility Cost to Weigh

Every limit trades something away. The size of the trade differs by page, and Google's documentation does not quantify any effect on clicks. The decision must therefore rest on your own data and on staged testing.

What you may lose

  • A descriptive preview: a shorter snippet may fail to show that the page contains what the searcher wants. The documentation does not say whether this raises or lowers clicks.
  • Presence in AI features: nosnippet and max-snippet apply to AI Overviews and AI Mode, and nosnippet also blocks direct use of the content as input for them.
  • Clarity of your own data: a limit on part of the site and none on the rest muddies comparisons if you roll it out unevenly.
  • Your best sentence: a block marked with data-nosnippet might have been the most persuasive part of the preview.

A staged decision rule

  1. Is the reason clear, such as a licence, a paid model or a misleading context? If not, do not limit.
  2. Choose the least restrictive tool: data-nosnippet or a generous max-snippet first, a tighter cap next, nosnippet last.
  3. Test on a small group of pages before applying a template across the site.
  4. Write down the date and the metrics, such as impressions, clicks and sign-ups, before you change anything.
  5. Compare after several weeks. If the loss exceeds the reason for the limit, roll back.

Trade-offs compared

OptionWhat you keepWhat you give up
No limitFull descriptive snippetControl over the text
data-nosnippetSnippet from the rest of the pageThe marked block's presence in snippets
max-snippet capA snippet existsLength and detail
nosnippetPage listed in resultsText snippet and direct input to AI features
noindexFull controlAppearing in search results

Who should agree on the limit

A snippet limit touches legal, editorial and growth concerns. The person who owns the licence explains the reason, the editorial team decides which pages are affected, and the SEO or analytics team watches the effect. Capture the decision in a short record with the reason, scope, directive, owner and a review date. The review date matters because contracts end and business models change, and an old nosnippet rule can limit visibility for years after anyone remembers why it was added.

Sometimes the fix is the copy

If the worry is that the opening of the page gives away too much, rewriting the first paragraph may solve it without any directive. Write an opening that shows the value of the page without delivering the whole answer. Our article on writing SEO titles and meta descriptions covers how those fields work together with snippets, and how to win featured snippets covers the opposite goal of earning more prominent previews.

Frequent Mistakes

  • Treating nosnippet as noindex: nosnippet keeps the page listed and only removes the text preview.
  • Blocking the page in robots.txt: the tag is never read.
  • Using data-nosnippet on the wrong element: it is defined for span, div and section only.
  • Adding it with JavaScript: include it when the element is first created.
  • Rolling out a sitewide cap at once: you cannot tell what changed where.
  • Missing a conflicting rule: the stricter one wins, so a plugin's nosnippet can override your cap.
  • Judging too early: recrawling can take days to months.
  • Treating it as privacy: these directives govern previews, not whether public text is public.

Frequently Asked Questions

Does nosnippet remove my page from search results?

No. Google's robots meta tag documentation says nosnippet stops a text snippet or video preview from being shown, and a static image thumbnail may still appear. The page remains eligible to be listed. To remove a page from results you need noindex.

Is max-snippet:0 the same as nosnippet?

According to the documentation, max-snippet:0 is equivalent to nosnippet, while -1 lets Google choose the snippet length. A value that cannot be parsed as a number is ignored, so a typo means the rule is not applied.

Which elements can carry data-nosnippet?

Only span, div and section elements. The attribute value is ignored, and the tags must be valid and properly closed. Do not add or remove it with JavaScript; it should be present in the HTML when the element is first added to the DOM.

Do these directives affect AI Overviews and AI Mode?

Yes. The documentation says nosnippet and max-snippet apply to AI Overviews and AI Mode, and nosnippet also prevents the content from being used as a direct input for them. The max-snippet limit does not apply where a publisher has separately granted permission for use of the content.

How long before I see the effect?

Google's AI features documentation says crawling can take several days to several months, and that you can request a recrawl. First confirm with URL Inspection that Googlebot sees the control, then check results after the waiting period has passed.

Which directive should I start with?

None, unless you have a clear reason such as a licence, a paid model or misleading context. If you do, begin with the least restrictive tool: data-nosnippet for one block, a generous max-snippet for the page, a tighter cap next, nosnippet last. Test on a small group of pages first. For licence obligations, see the note in the licensed material section.

Related guides: How to Control Your Appearance in Google Results, Wrong Site Name or Favicon in Google Results: Fix Guide, Why Google Rewrites Your Title Link and What to Do.

Conclusion

nosnippet, max-snippet and data-nosnippet give you three levels of control over how your text appears, and noindex decides whether the page appears at all. Name the reason before you limit anything, start with the least restrictive directive, confirm with URL Inspection that Googlebot sees it, and allow time for recrawling. Then measure the outcome with your own data. Remember that the stricter rule wins in a conflict, that a page blocked in robots.txt never has its tag read, and that data-nosnippet belongs in the initial HTML on a span, div or section. Every limit costs some visibility and possibly clicks, so keep it only while its reason outweighs that cost.

If you want guides and descriptions that preview well without needing heavy limits, you can look at the content writing service at Akua Adforce; scope and terms are on the product page. Directives and behaviors in Google's documentation can change, so check the current pages before you apply anything.

0 Comments

No comments yet for this article.

Post a comment

Please log in to leave a comment. Login