You can use Google’s nosnippet directive to stop Google from showing a text snippet or video preview for a page while allowing the page to remain indexed. Add the directive to a robots meta tag or an HTTP response header, then make sure Google can crawl the URL.
Full suppression isn't the only choice. If you want more control without losing the entire preview, you can limit snippet length or exclude selected text. Let's start with what each option does.
What Google nosnippet controls
A search snippet is the text that may appear beneath a page title in Google Search. Google can create it from page content or use a meta description when that description better matches a search.
The nosnippet directive tells Google not to show a text snippet or video preview for the URL. A static image thumbnail may still appear when Google considers it useful.
Google also applies snippet controls to features such as Discover, AI Overviews, and AI Mode. According to Google's robots directive documentation, nosnippet prevents page content from being used as direct input for AI Overviews and AI Mode.
The distinction is search appearance versus indexing. A page with nosnippet can still appear in search results. If your goal is to remove a page from Google's index, the relevant directive is noindex.
Also, snippet controls aren't a privacy system. Visitors can still access content on a public page, and other websites or search engines may handle instructions differently.
Choose the right snippet directive
The best choice depends on how much content you want Google to display. Here's a comparison:
| Directive | Where it goes | What it controls |
|---|---|---|
nosnippet | Robots meta tag or HTTP header | Suppresses the page's text snippet and video preview |
max-snippet:150 | Robots meta tag or HTTP header | Limits the text snippet to 150 characters |
data-nosnippet | Supported HTML element | Excludes the marked text from snippets |
We recommend nosnippet when you don't want a text preview at all. For a shorter preview, use max-snippet. When only one section needs to stay out of snippets, data-nosnippet gives you more precise control.
Keep in mind that Google chooses snippets based on the search query. A limit sets a maximum; it doesn't guarantee that Google will use every available character.
Add nosnippet with a robots meta tag
A robots meta tag is an HTML instruction placed inside a page's <head>. It's a practical option when you can edit the page template or control SEO settings in your website platform.
Apply the rule to search engines
Add this tag inside the HTML head:
<meta name="robots" content="nosnippet">
The robots name addresses crawlers generally, although each search engine decides which instructions it supports. For Google, this rule applies to the page containing the tag.
First, locate the page's head settings in your content management system or template. Add the tag, publish the change, and inspect the output that visitors and crawlers receive. Avoid putting the tag in the visible page body.
Target Google with googlebot
If you want the instruction to target Google, use:
<meta name="googlebot" content="nosnippet">
Choose the version that matches your goal. A Googlebot-specific tag doesn't instruct other search engines to suppress their snippets.
You don't need to add index, follow to keep normal indexing and link-following behavior. Those are Google's defaults when no more restrictive instruction applies. Google's supported meta tags and attributes cover the available syntax.
Add nosnippet with an X-Robots-Tag header
The X-Robots-Tag is an HTTP response header. It travels with the server response instead of appearing in the page's HTML.
This option works for HTML pages and is useful for PDFs or other files that don't have an HTML head.
Set the header for a file
The header itself looks like this:
X-Robots-Tag: nosnippet
Add it through a server configuration, hosting control, or application setting that can set response headers for the target URL. For a PDF, apply the header to the PDF response itself, not only to the page that links to the file.
Our guide to X-Robots-Tag for non-HTML files covers the header's role for assets such as PDFs, images, and videos.
Inspect the response
Open the target URL in your browser, then use the browser's developer tools and select the Network panel. Reload the page or file, select its request, and look under response headers for X-Robots-Tag.
If the URL redirects, inspect the final response too. The important instruction is the one Google receives for the resource it crawls.
A header set on one URL doesn't automatically apply to every related file. Review the exact responses affected by the configuration before rolling it out across a larger section of your site.
Limit snippet length with max-snippet
Want to keep a preview while giving Google less text to work with? Use max-snippet and a character limit.
For example, this meta tag sets a maximum of 150 characters:
<meta name="robots" content="max-snippet:150">
The equivalent response header is:
X-Robots-Tag: max-snippet:150
The number counts characters, not words. A value of -1 lets Google choose the length, while max-snippet:0 is equivalent to nosnippet. Use a valid number, since Google ignores an unparseable value.
For positive limits, max-snippet controls textual snippets rather than setting limits for image or video previews. Google also documents exceptions where separately granted permissions can affect permitted uses of content.
There isn't one ideal character limit for every website. Choose a limit that supports your goal, then review how your pages appear. If you want to improve the available description instead of restricting it, our meta description SEO guide is a useful next step.
Exclude selected text with data-nosnippet
Sometimes the page deserves a normal snippet, but one passage doesn't. That's where data-nosnippet helps. It marks a portion of HTML that Google shouldn't use in a text snippet.
Mark the text you want excluded
Add the attribute to a supported span, div, or section element. For example:
<span data-nosnippet>Contact us for a quote.</span>
Google can still use eligible text elsewhere on the page. This makes the attribute useful for repeated page elements or passages that don't make sense outside their surrounding content.
Use valid HTML and close the element correctly. The attribute is Boolean, so you don't need to assign it a value. Google's supported HTML attribute reference lists where it can be used.
Keep the rest of the page useful
Place the attribute around the smallest passage that meets your goal. If you mark a large section, Google has less text available to create a relevant preview.
Also, remember that excluding text from snippets doesn't hide it from visitors. If information shouldn't be public, restrict access to the content itself instead of relying on a search directive.
We recommend putting the attribute in the delivered HTML rather than depending on a late JavaScript change. Then inspect the rendered page to see what Google receives.
Verify the change in Search Console
After publishing a directive, use Google Search Console to compare the live page with Google's recorded information. This helps you separate an implementation problem from a change that hasn't been processed yet.
- Open the correct Search Console property and enter the full URL in URL Inspection.
- Review the indexed information, including the last crawl date and any access or indexing issues.
- Select "Test live URL" and open the tested page details. For an HTML tag, look for the directive in the HTML Google receives.
- Inspect the response headers in your browser when you're using
X-Robots-Tag. - Request indexing after the fix, then allow time for Google to revisit the URL.
A successful live test describes the page as it exists at test time. It doesn't mean Google's indexed version or search result has already updated. An indexing request also doesn't guarantee an immediate refresh.
Compare the URL you changed with Google's selected canonical, where Search Console provides it. If Google treats another URL as the main version, inspecting the duplicate alone may not explain the result you see.
Our search indexing guide explains how to interpret indexing and crawl information when the page itself is difficult to find.
Troubleshoot common snippet problems
If the directive isn't having the expected effect, start with access and conflicts. A small configuration issue can affect a whole group of pages.
Check crawl access and conflicting rules
Google must be able to fetch a URL to read its meta tag or response header. A robots.txt rule that blocks the crawl can prevent Google from seeing the instruction. Our guide to robots.txt crawl control explains how those rules work.
Next, look for multiple robots tags and headers. Google applies the more restrictive instruction when rules conflict. For example, nosnippet takes precedence over max-snippet:50, so the shorter-preview setting won't restore a text snippet.
Shared templates, SEO plugins, server settings, and caching systems can all affect the final response. Review the output rather than relying only on a setting in the editor.
Check the URL and the timing
Make sure the directive is on the URL that appears in search, including the correct protocol and path. If a redirect leads elsewhere, inspect the destination.
Then compare the live change with Google's last crawl. Search results can reflect an earlier version until Google processes the update. A site: search can provide a rough view, but it isn't a complete indexing report.
If you've removed nosnippet and want a preview again, remove conflicting restrictions as well. Google still chooses whether and how to create a snippet for each query.
Keep snippet control aligned with your goal
The right directive depends on the result you want. Use nosnippet to suppress the text preview, max-snippet to set a limit, or data-nosnippet to exclude selected text.
Start with one page or file, inspect the delivered tag or header, and review it in Search Console. That gives you a practical way to control search previews without confusing snippet settings with indexing.





