Skip to content
WP Visibility

AI visibility guide

Limit Google AI Answer Previews Without Removing the Whole Page

Choose between noindex, nosnippet, max-snippet, and data-nosnippet to limit what Google shows from a page in AI Overviews and AI Mode, and check the directives after deployment.

Published

On this page

To limit what Google shows from a page in AI Overviews and AI Mode while keeping the page in search, use snippet controls rather than noindex. Wrap specific passages in data-nosnippet to keep them out of previews, set max-snippet to cap the length of text Google may show, or use nosnippet to stop text previews from the page entirely. Each of the controls Google documents for AI features also applies to how the page appears in ordinary search results, so choose the narrowest one that meets your goal.

Choose what must remain searchable

Start from what you want to keep, not from the directive.

Goal Control Effect on the page in Search
The page should not appear in Google at all noindex Removed from results after Google recrawls it
The page should appear, but no text from it should be quoted nosnippet Listed without a text snippet; not used as direct input for AI features
The page should appear with only short quotes max-snippet:[number] Text previews capped at that many characters
Most of the page can be quoted, but certain passages should not data-nosnippet on those elements The marked passages are excluded from snippets

Google’s AI features documentation, checked September 27, 2026, says that to be eligible as a supporting link in AI Overviews or AI Mode, “a page must be indexed and eligible to be shown in Google Search with a snippet.” It lists nosnippet, data-nosnippet, max-snippet, and noindex as the controls for limiting what is shown. It also says there are no special files or schema needed to appear in these features.

That eligibility rule is the trade-off. A page with nosnippet (or max-snippet:0) cannot be shown with a snippet, so by that rule it does not qualify as a supporting link in those features. data-nosnippet and a max-snippet above 0 leave the page able to show a snippet while limiting what text can be used.

Google-Extended is not one of these controls. Google’s crawler documentation, checked September 27, 2026, describes it as governing Gemini training and grounding and says it “does not impact a site’s inclusion in Google Search”; the AI crawler policy guide covers that decision.

Narrow controls before removal. data-nosnippet: Excludes marked passages; the rest can still be quoted. max-snippet: Caps preview length across Google formats. nosnippet or noindex: No previews, or no listing at all.
Google documents these controls for AI Overviews and AI Mode. The snippet controls also shape ordinary search snippets, noindex removes the listing, and none takes effect until Google recrawls the page.

Compare supported preview controls

Google’s robots meta tag documentation, checked September 27, 2026, defines each control:

  • nosnippet: “Do not show a text snippet or video preview in the search results for this page.” Google adds that it “will also prevent the content from being used as a direct input for AI Overviews and AI Mode.”
  • max-snippet:[number]: limits the length of a text snippet across Google’s formats, including AI Overviews and AI Mode. 0 means no snippet, equivalent to nosnippet. -1 means Google chooses the length.
  • data-nosnippet: an HTML attribute allowed on span, div, and section elements. The marked section “must be valid HTML and all appropriate tags must be closed accordingly.”
  • Conflicts: “In the case of conflicting robots rules, the more restrictive rule applies.”

nosnippet and max-snippet can be sent in a <meta name="robots"> tag or in an X-Robots-Tag HTTP header. data-nosnippet is an attribute in the page’s HTML, not a robots rule.

A small public HTML example of each, for an illustrative page:

<!-- The whole page: no text previews -->
<meta name="robots" content="nosnippet">

<!-- The whole page: previews of up to 50 characters -->
<meta name="robots" content="max-snippet:50">

<!-- One passage excluded, the rest previewable -->
<p>Our garden design service covers planting plans and layout.</p>
<div data-nosnippet>
  <p>Member rates and the full price table are available after sign-in.</p>
</div>

One rule applies to all of them: Google has to crawl the page to read it. The robots meta documentation says that if a page is disallowed in robots.txt, “any information about indexing or serving rules will not be found and will therefore be ignored.” Do not block a page in robots.txt and expect its snippet rules to work.

Apply the controls in WordPress

Site-wide length. If you use WP Visibility, the Indexing section of WP Visibility → Settings has a Max snippet length field. It defaults to -1, which lets search engines choose the length; leaving it empty also saves -1, and 0 shows none. Every indexable page then sends that value as max-snippet, alongside the image and video preview settings. A site-wide limit affects every page, which is rarely what you want for one sensitive page.

One page out of search entirely. Setting Noindex on the page is described in keep a page out of search. Use it when the page should not appear at all.

One page without previews. WP Visibility 2.10.3 has no per-page nosnippet or max-snippet field. A developer can add a directive for specific pages with the plugin’s wpvis_robots filter, for example in a small site plugin:

add_filter( 'wpvis_robots', function ( $robots ) {
	if ( is_page( 'member-rates' ) ) {
		$robots['nosnippet'] = true;
	}
	return $robots;
} );

The page slug is illustrative. The filter runs on indexable pages only, which is what you want: a noindexed page does not need snippet rules.

Passages within a page. data-nosnippet is part of the content, so it belongs in the editor or the theme, not in SEO settings. In the block editor, a Custom HTML block can hold a <div data-nosnippet> wrapper around the passage. For text that repeats across pages, such as a pricing table in a template, add the attribute in the theme template. After saving, check the rendered page source; depending on the user’s unfiltered_html capability (checked September 27, 2026) and filters, WordPress can remove markup a user is not permitted to post, so confirm the attribute survived.

Verify directives after deployment

Check what the page sends, logged out, from outside:

curl -s https://example.com/member-rates/ | grep -i "name=.robots"
curl -sI https://example.com/member-rates/ | grep -i '^x-robots-tag'
curl -s https://example.com/member-rates/ | grep -c 'data-nosnippet'

Use your own URL. Then:

  1. Read the combined result. WordPress, WP Visibility, a theme, and other plugins can all contribute to the robots meta tag or the header. Because the most restrictive rule wins, a stray nosnippet from another source overrides a max-snippet you set.
  2. Check data-nosnippet sections are closed. View the source around each marked element. Google requires the marked section to be valid HTML with its tags closed; an unclosed element leaves the end of the section unclear.
  3. Confirm the page is crawlable. Check robots.txt does not disallow the URL.
  4. Use URL Inspection in Search Console (checked September 27, 2026) to run a live test, then open View tested page to see the raw HTML and HTTP headers Google fetched, including the directives.

Know what to expect afterward

Directives take effect when Google recrawls the page and processes it. Google gives no fixed timetable; its noindex documentation, checked September 27, 2026, says that depending on a page’s importance, it may take months for Googlebot to revisit it. A change to your markup is not a promise that a particular AI answer changes on a particular day. Record the date of the change and the directives the page sends.

When you check results later, compare like with like: the same queries, recorded with the date and mode, as described in what AI visibility means. A preview that still shows old text a day after the change is expected; one that persists long after Google has recrawled the page (the URL Inspection tool shows the last crawl) is worth investigating.

Google’s AI features documentation says traffic from these features is included in the overall search traffic in Search Console, in the Performance report under the “Web” search type; it does not describe a separate AI Overviews report.

Checklist

  • Goal chosen: remove the page, remove all previews, shorten previews, or exclude passages.
  • noindex used only when the page should leave search entirely.
  • Per-page directives added by filter or template, not by a site-wide setting.
  • data-nosnippet on span, div, or section, closed and present in the rendered source.
  • The URL is not blocked in robots.txt.
  • Directives checked with curl and URL Inspection, and the change date recorded.

Read next

WordPress SEO with your own assistant.

WP Visibility is $99 a year for unlimited sites, client sites included, with a 30-day refund. Use its SEO tools in WordPress or connect a supported assistant. Read how proposal review and permissions work.