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:

DirectiveWhere it goesWhat it controls
nosnippetRobots meta tag or HTTP headerSuppresses the page's text snippet and video preview
max-snippet:150Robots meta tag or HTTP headerLimits the text snippet to 150 characters
data-nosnippetSupported HTML elementExcludes 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.

  1. Open the correct Search Console property and enter the full URL in URL Inspection.
  2. Review the indexed information, including the last crawl date and any access or indexing issues.
  3. Select "Test live URL" and open the tested page details. For an HTML tag, look for the directive in the HTML Google receives.
  4. Inspect the response headers in your browser when you're using X-Robots-Tag.
  5. 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.

We use cookies so you can have a great experience on our website. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Our website address is: https://nkyseo.com.

Comments

When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Visitor comments may be checked through an automated spam detection service.
Save settings
Cookies settings