Agent Wranglers

Optional

Choose what search and AI answers may quote

Keep text out of search snippets with data-nosnippet, and limit whole pages with nosnippet or max-snippet. At Google, these also limit what AI Overviews and AI Mode use.

How to do it

Put data-nosnippet on a span, div or section, the only elements Google reads it on. Cap a page with <meta name="robots" content="max-snippet:160"> or the same value in X-Robots-Tag. A page with nosnippet stays in the index but shows no text. Rules for AI crawlers are a separate choice, as Decide what each AI crawler may do says.

Examples

Using these examples: they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

HTML example

<meta name="robots" content="max-snippet:160">
<p>Our oak oil costs less than most. <span data-nosnippet>Member price this week only.</span></p>

JavaScript example

app.get('/members/*', (req, res, next) => {
  res.set('X-Robots-Tag', 'nosnippet');
  next();
});

Python example

@app.after_request
def limit_member_snippets(response):
    if request.path.startswith("/members/"):
        response.headers["X-Robots-Tag"] = "nosnippet"
    return response

How to check

A test fetches each page on the list of limited pages. Its robots meta tag or X-Robots-Tag carries the chosen directive, and every data-nosnippet sits on a span, div or section.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/seo/snippet-controls">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.