07887 423199me@richieaubin.com

Control search snippets and previews

Choose which material can appear in a result preview. If the content itself is private, protect access to it first.

Search preview controls example
Example image · CC0 1.0 licence

Choose a way to do this check

Read your preview directives

  1. Paste a public page source and review each robots tag by agent.
  2. Check data-nosnippet on the specific rendered element in DevTools, and use the header reader for X-Robots-Tag.

Google preview policy

  1. Choose between a page-level limit and excluding one visible section.
  2. Compare the live page with the search result after recrawling. Search results may not change immediately.

Crawler export

  1. Review directive coverage across the intended templates.
  2. Use the browser to check the exact element and confirm an unaffected page retained its existing policy.

1. Pick the narrowest control

For Google, nosnippet prevents a text snippet and video preview for a page. Max-snippet can set a text limit instead. Use data-nosnippet when a supported element contains text you want excluded from snippets while allowing other text to be used. Set max-image-preview when your requirement specifically concerns image preview size. These directives govern presentation and related uses. They do not make a public page private or request its removal from the index.

2. Implement the directive in the correct place

The example allows up to 120 characters of snippet text and sets the standard maximum image preview size for a public HTML page. Put the meta tag inside the head and merge with your existing policy. Do not add conflicting options and assume a later tag will override an earlier one.

HTML head · limit public previews
<meta name="robots" content="max-snippet:120, max-image-preview:standard">

For an on-page exclusion, Google documents data-nosnippet on span, div and section elements. Use a valid wrapper around the specific content. For an HTTP-served file, consider X-Robots-Tag with the applicable directive, scoped to the intended response.

HTML body · exclude one visible section from Google snippets
<section data-nosnippet>
  <h2>Terms for the current offer</h2>
  <p>See the full terms before making a decision.</p>
</section>

3. Check source, render and headers

Verify what the public request receives. If templates or scripts can change the head or section after load, inspect rendered HTML too. Test a second page that should keep its normal previews. Confirm that you have not simultaneously introduced noindex or a crawl block.

4. Allow for reprocessing and provider differences

Record when the policy was published and what the current result looks like. Search engines can reuse earlier information until they recrawl. Google documents how its preview controls apply to its AI features. For other engines and AI products, consult their own policy before assuming the same result.

Technical references

Frequently asked questions

Does nosnippet remove an indexed page?

No. It restricts previews. Use an appropriate indexing control if the page should be excluded.

Does max-snippet guarantee an exact length?

No. It supplies a limit rather than a promise of that length.

Can I use data-nosnippet on any tag?

Use an element supported by the platform. Google documents span, div and section.

How do I protect confidential content?

Remove it from public access or require authorisation.

Written by Richie Aubin

Published