---
title: "Choose what search and AI answers may · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/seo/snippet-controls
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Choose what search and AI answers may quote

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [SEO](https://agentwranglers.se/playbook/website/seo.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- Level: Optional
- Chapter: [SEO](https://agentwranglers.se/playbook/website/seo)
- Rule: 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: 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](https://agentwranglers.se/playbook/website/ready-for-ai-agents/robots-for-ai-crawlers) says.
- 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`.

## 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

```html
<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

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

### Python example

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

## Sources

- [Google Search Central – Robots meta tag, data-nosnippet and X-Robots-Tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag)

## Related rules

- [Decide what each AI crawler may do](https://agentwranglers.se/playbook/website/ready-for-ai-agents/robots-for-ai-crawlers) in Website

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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.

- Previous: [Show the same date to people and machines](https://agentwranglers.se/playbook/website/seo/publication-dates)
- [SEO](https://agentwranglers.se/playbook/website/seo)
