Meta Tags (Part 3): Robots, Snippets and Search Preview Controls
Use robots meta tags, X-Robots-Tag, noindex, nosnippet, data-nosnippet and preview controls correctly without accidentally hiding pages from Google.

A robots meta tag is only a few characters long, but it can remove an otherwise healthy page from search results.
That makes this one of the areas of technical SEO where copying a snippet from an old blog post is a particularly bad idea.
The useful mental model is simple: robots.txt controls crawling; robots meta directives and X-Robots-Tag control indexing and how indexed content may be presented. They overlap operationally, but they are not interchangeable.
The normal page usually needs no robots tag
For an ordinary public page that should be indexed and whose links may be discovered, this is enough:
<head>
<title>VAT Calculator | SiteTidy</title>
<meta name="description" content="Calculate VAT from a net or gross amount.">
</head>
You do not need:
<meta name="robots" content="index, follow">
Those are already the normal defaults for Google. Explicitly adding them is harmless in a simple implementation, but it creates another configuration surface that can later become inconsistent.
noindex means what it says
To keep an HTML page out of supporting search engines:
<meta name="robots" content="noindex">
Once Google crawls the URL and processes that rule, the page is removed from Google Search even if other sites link to it.
That is appropriate for pages such as certain internal search results, account-specific utility pages, intentionally non-searchable workflows or temporary content that genuinely should not be indexed.
It is not a generic duplicate-content fix.
The classic robots.txt + noindex mistake
Suppose you have:
User-agent: *
Disallow: /private-results/
and pages inside that directory also contain:
<meta name="robots" content="noindex">
It is tempting to think this provides two layers of protection. For indexing control, it can do the opposite of what you intended.
A crawler needs to fetch the page to discover its meta robots rule. If robots.txt prevents Googlebot from crawling the URL, Google may never see the noindex instruction. A blocked URL can still be known from links and may under some circumstances appear in Search without a normal snippet.
If the objective is do not index this accessible page, allow Google to crawl it and expose noindex.
If the objective is protect private information, neither robots.txt nor noindex is an access-control mechanism. Require authentication or otherwise prevent unauthorized access.
nofollow is not the default you should sprinkle everywhere
This directive:
<meta name="robots" content="nofollow">
asks supporting crawlers not to follow links on that page.
That is a page-wide instruction. It is rarely what a normal content page needs.
If the concern is a particular sponsored, user-generated or otherwise qualified outbound link, use the appropriate link-level rel value instead of changing the crawling behaviour of every link on the page.
none is shorthand
For Google:
<meta name="robots" content="none">
is equivalent to:
<meta name="robots" content="noindex, nofollow">
The explicit form is often easier for humans reviewing a template to understand.
Robots controls are also presentation controls
Indexing is only half the story. Google supports directives that affect what may be shown from an indexed page.
nosnippet
<meta name="robots" content="nosnippet">
prevents a text snippet and video preview from being shown for the page in Google Search. A static image thumbnail can still be shown in some circumstances.
This is a strong restriction, not a cosmetic preference.
Google’s current documentation also states that nosnippet applies to its AI Overviews and AI Mode surfaces and prevents the restricted content being used as a direct input there.
max-snippet
You can limit the text snippet length:
<meta name="robots" content="max-snippet:160">
Do not confuse this with a meta-description length setting. It is a search presentation restriction. Google is still free to construct a snippet from eligible page content within the restriction.
max-image-preview
A common configuration for publishers that want to permit large image previews is:
<meta name="robots" content="max-image-preview:large">
You can combine supported rules:
<meta name="robots" content="max-snippet:200, max-image-preview:large">
The right value depends on what you actually want Search to display. Do not add it simply because an SEO checklist says every site needs it.
data-nosnippet gives you finer control
Sometimes the page should be indexed and should have a snippet, but a particular piece of visible content should not be used in that snippet.
For example:
<p>
Compare our current plans.
<span data-nosnippet>Customer-specific discount: £37.20</span>
</p>
Google supports data-nosnippet on certain HTML elements to exclude that section from snippets.
This is much more precise than suppressing the entire page’s snippet.
It can be useful around content that is volatile, awkward out of context or inappropriate for a search preview. It should not be treated as a security feature: the text is still on the public page.
Meta description and snippet are not the same thing
This is an important distinction.
<meta name="description" content="A concise description of this page.">
provides Google with a possible source for a search snippet. Google may instead use text from the page when that better matches the query.
So there are two separate jobs:
- the meta description supplies useful descriptive copy;
- robots snippet directives constrain what Google is allowed to show.
Trying to use robots directives to force Google to display your exact meta description misunderstands the system.
Use X-Robots-Tag when HTML is not the right layer
PDFs, images and other non-HTML resources cannot contain an HTML robots meta element.
For those, the HTTP response can carry the same class of directive:
HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindex
This is also useful when indexing policy is easier to enforce centrally at the server, reverse proxy or application response layer.
For example, an application that generates downloadable reports could deliberately return:
X-Robots-Tag: noindex, noarchive
where the relevant crawler supports those directives.
The important engineering point is to know which layer owns the rule. If templates, middleware, CDN configuration and origin headers can all emit robots controls independently, debugging becomes unnecessarily difficult.
Conflicting directives become dangerous quickly
Imagine your HTML says:
<meta name="robots" content="max-snippet:50">
but a shared layout injects:
<meta name="robots" content="nosnippet">
For Google, the more restrictive rule wins in this example.
Likewise, crawler-specific rules can combine with general rules. A page with a general nofollow and a Googlebot-specific noindex effectively gives Googlebot both restrictions.
This is why a production site should generate one intentional indexing policy from one source of truth rather than accumulating tags through plugins and components.
JavaScript-generated robots tags need particular care
Google can process robots meta tags added with JavaScript, but there is a dangerous asymmetry.
If the initial HTML contains:
<meta name="robots" content="noindex">
and client JavaScript later removes it, you should not assume Google will render the page and observe the change. Google may see noindex and skip later rendering work.
If a page is intended to be indexable, do not ship an initial noindex and rely on JavaScript to turn indexing back on.
For server-rendered, statically generated and hybrid applications, decide indexability before the response is sent whenever possible.
Staging environments need access control, not SEO hope
A staging site accidentally indexed by Google is a deployment failure.
A noindex header is useful defence in depth:
X-Robots-Tag: noindex, nofollow
but staging should normally also be protected from public access through authentication, network controls or another appropriate access boundary.
Why? Because noindex tells cooperative search engines what to do. It does not stop a person, scanner or other client from requesting the URL.
noindex and canonical solve different problems
If two public URLs are duplicates and one should represent the other in Search, the normal tool is canonicalization:
<link rel="canonical" href="https://example.com/products/widget">
Do not routinely noindex the duplicate simply to force canonical selection. Google’s current guidance explicitly prefers rel="canonical" for canonicalization within a site.
A canonical is a preference signal about representative URLs. noindex says the page should not appear in Search at all.
Part 4 goes deeper into canonical URLs, duplicate clusters, parameters and the situations where Google may choose a different canonical from yours.
A practical indexing-policy model
For a large site, define page types rather than hand-editing tags.
| Page type | Crawlable? | Indexable? | Typical control |
|---|---|---|---|
| Main article/product/tool | Yes | Yes | default |
| Duplicate URL variant | Yes | Usually represented by canonical | rel=canonical |
| Internal search page | Yes if Google must see rule | Usually no | noindex |
| Private account page | No unauthorized access | No | authentication; optionally noindex as defence in depth |
| Public PDF that should rank | Yes | Yes | default |
| Public PDF that should not rank | Yes | No | X-Robots-Tag: noindex |
| Staging environment | Restricted | No | access control + defensive robots controls |
That table is more useful than a universal “best robots meta tag” because the correct directive depends on the page’s purpose.
Debugging a page that disappeared from Google
Check the actual URL rather than staring at the source template.
- Fetch the production response and inspect
X-Robots-Tagheaders. - Inspect the rendered and server-delivered HTML for robots meta tags.
- Check crawler-specific tags such as
googlebotas well asrobots. - Check robots.txt. If Google cannot crawl the page, it cannot reliably discover a newly added
noindexor its removal. - Look for framework, CMS, plugin, CDN and middleware rules that may inject directives conditionally.
- Use Search Console URL Inspection to see what Google received and which indexing state it reports.
- After fixing the problem, allow time for recrawling and reprocessing.
A code deployment does not instantly change Google’s stored view of a URL.
Check the page Google can actually fetch
SiteTidy can help surface public-page metadata and technical issues before you dig into crawler-specific diagnostics.
Production checklist
Before releasing indexing-control changes, verify:
- indexable pages do not accidentally inherit
noindex; - pages that rely on
noindexare crawlable enough for crawlers to discover the directive; - private content is protected by access control rather than robots directives;
X-Robots-Tagheaders are included in the audit, not just HTML tags;- crawler-specific directives are intentional;
- duplicate pages use canonicalization where that matches the actual goal;
- JavaScript is not expected to rescue an initially
noindexpage; - snippet restrictions match the product/content requirement;
data-nosnippetis not mistaken for privacy protection;- staging is not publicly exposed;
- production responses are tested after deployment.
The principle to keep
Robots directives are policy, not decoration.
Every noindex, nofollow, nosnippet or preview restriction should exist because somebody can explain what that page is supposed to do in Search. Once you manage them that way, the tags become straightforward — and accidental de-indexing becomes much less likely.
