The meta robots tag is a head element that sets indexing, link following and snippets per page; X-Robots-Tag sends the same rules as an HTTP header.

Generate a meta robots tag or X-Robots-Tag

Rules
Snippet, preview and expiry rules

Tick the rules you need and press Generate: the result gives the meta tag, the X-Robots-Tag line, Apache and Nginx snippets and a note on what each rule does in Google.

With no rule ticked you need no tag at all: Google treats every page as index, follow unless told otherwise. Pick a crawler only when one search engine should behave differently; Google reads two names in the meta tag, googlebot and googlebot-news, and ignores other values (Google Search Central, Robots meta tag, data-nosnippet and X-Robots-Tag specifications).

A rule only takes effect after Google crawls the page again, which matters most when you switch pages from noindex back to index. If you track those URLs in bulk, our reporting and indexing features show per-URL status after submission.

What the meta robots tag is

The robots meta tag is a <meta> element with name="robots" and a content attribute that holds one or more rules separated by commas. MDN describes it as a de facto standard rather than part of any specification: it works because search engines agree to read it. Only cooperative crawlers follow it.

<head>
  <meta name="robots" content="noindex, nofollow">
</head>

Three details trip people up. Both the name and the content are case-insensitive, so NOINDEX works. Google also reads robots meta tags placed in the body, although the head is where they belong. And Google reads the tag only on a URL it may crawl, so a robots.txt block hides every rule in it.

Valid directives and what they do

Google lists the rules below as valid for both the meta tag and the X-Robots-Tag header. Rules with a value use a colon, such as max-snippet:50. Bing and Yandex publish their own, shorter lists, covered after the table.

Robots meta directives and their effect in Google
RuleEffect in GoogleNotes
allNo restrictionsThe default; listing it has no effect
noindexDo not show the page, media or resource in resultsThe page must stay crawlable
nofollowDo not follow the links on the pageApplies to every link on the page
noneSame as noindex, nofollow
nosnippetNo text snippet or video previewGoogle also keeps the text from being direct input to AI Overviews or AI Mode
indexifembeddedIndex the content when embedded through an iframeOnly works with noindex
max-snippet:[n]Snippet of at most n characters0 = no snippet, -1 = no limit
max-image-preview:[setting]Largest image preview: none, standard or large
max-video-preview:[n]Video preview of at most n seconds0 = static image at most, -1 = no limit
notranslateNo translation offered in results
noimageindexDo not index images on the page
unavailable_after:[date]Drop the page from results after the dateISO 8601, RFC 822 or RFC 850 dates

What Bing and Yandex support

Bing documents noindex, noarchive, nocache, nosnippet, max-snippet, max-image-preview, max-video-preview and the data-nosnippet attribute, each valid in the meta tag and in the X-Robots-Tag header, with name="bingbot" to address Bing alone (Bing Webmaster Tools, Robots meta tags and attributes that Bing supports). Two of them reach into Copilot: noarchive keeps a page from being linked in Chat and Copilot, and nocache limits Chat and Copilot to the URL, title and snippet. If both are present, Bing applies nocache.

Microsoft is replacing both for AI uses. From February 1, 2027, as Bingbot crawls, it honours AI preferences set per page through a bingbot meta tag or the matching X-Robots-Tag line: ai-training:disallow keeps a page out of model training, and ai-grounding:disallow keeps it out of AI-generated answers, while ai-grounding:disallowextended allows grounding only in Microsoft’s own products such as Copilot. Training can also be set for a whole site or path in robots.txt; grounding is page-level only. Once March 1, 2027 has passed, Bing stops treating noarchive and nocache as AI preferences, and for classic Bing search results the new settings change nothing (Bing Webmaster Blog, “Your content, your choice: clearer preferences for training and grounding”).

Yandex reads noindex, nofollow, none and noarchive, accepts name="yandex", and resolves conflicts the opposite way from Google: an allowing value such as index, follow or all takes priority over a prohibiting one in the same set of tags (Yandex Webmaster documentation, Meta tags). A page that must stay out of every engine should therefore carry noindex without any index or all next to it.

index, noindex, follow, nofollow, none

These five decide whether the page is listed and whether its links are followed. index and follow are defaults, so content="index, follow" changes nothing; MDN notes that behaviour is undefined when contradictory values such as index and noindex sit together, and Google resolves such conflicts by applying the more restrictive rule. none is shorthand for noindex, nofollow.

Link builders should check these values on every page that carries a link to them. A Web 2.0 blog, a profile or a guest post with noindex drops out of results, and with nofollow the page asks Google not to follow any of its links. Our guide to backlink pages not indexed lists the other blockers on such pages. When a Web 2.0 host lets you switch a post from noindex to index, Google applies the new value only after its next crawl, which is the moment to index Web 2.0 backlinks instead of waiting for Google to come back on its own.

nosnippet, max-snippet, max-image-preview, data-nosnippet

These control how a result looks, not whether it appears. nosnippet removes the text snippet and video preview; a static thumbnail may still show. max-snippet caps the snippet length, and Google ignores it if no parseable number follows the colon. max-image-preview:large allows previews up to the width of the viewport.

To hide only part of a page from snippets, use the data-nosnippet attribute on a span, div or section. Google warns that the attribute may be read before or after rendering, so do not add or remove it on existing elements with JavaScript.

<p>This text can appear in a snippet.
  <span data-nosnippet>This part will not.</span>
</p>

noarchive, notranslate, noimageindex, unavailable_after

noarchive is now ignored by Google Search because the cached link feature no longer exists; Bing still reads it, with the AI changes described above. notranslate stops Google from offering a translated title and snippet. noimageindex keeps the images on the page out of the index. unavailable_after takes a date and time, for example unavailable_after: 2027-06-30; after that point the page no longer shows in results, and Google says it will reduce the crawl rate of the URL considerably.

Combining directives and crawler-specific tags

You can list several rules in one tag or spread them over several tags; the result is the same. When rules conflict, the more restrictive one applies: with both max-snippet:50 and nosnippet, Google uses nosnippet. When tags address different crawlers, Google adds up the negative rules that apply to it.

<meta name="robots" content="nofollow">
<meta name="googlebot" content="noindex">
<!-- Googlebot reads this page as noindex, nofollow -->

Crawler-specific tags never loosen a general one. A googlebot tag cannot undo a noindex in the robots tag, because Google combines both. The validator above shows the combined result for Googlebot and lists tags that address other crawlers separately.

Crawling is a separate layer. A robots meta tag cannot stop Google from fetching a URL; that is the job of robots.txt, and our generator for robots.txt rules writes those for you.

Robots directive validator

Paste the page head and, if you have them, the response headers (DevTools, Network tab, click the document, Headers). The validator lists invalid or misspelled values, duplicates and conflicts, and the combined result Googlebot applies.

X-Robots-Tag: when to use the HTTP header

Every rule that works in the meta tag also works as an X-Robots-Tag response header. The header is the only option for files that have no HTML head, such as PDFs, images and videos, and it lets you set rules for whole groups of URLs in your server configuration instead of in each template.

HTTP/1.1 200 OK
X-Robots-Tag: noindex
X-Robots-Tag: googlebot: nofollow

Several X-Robots-Tag headers can be combined, or one header can carry a comma-separated list. A crawler name before the rules, as in googlebot: nofollow, limits that header to one crawler; a header without a name applies to all. On Apache you set it in .htaccess or httpd.conf; on Nginx in the site configuration:

# Apache
<Files ~ "\.pdf$">
  Header set X-Robots-Tag "noindex, nofollow"
</Files>

# Nginx
location ~* \.pdf$ {
  add_header X-Robots-Tag "noindex, nofollow";
}

If your goal is to take pages out of Google, timing and checking matter as much as syntax. Our page on the noindex tag in depth explains how to check a page for noindex, how long removal takes and how to get a page back.

Meta robots vs robots.txt

What each mechanism controls
QuestionMeta robots or X-Robots-Tagrobots.txt
ControlsIndexing and how the result is shownCrawling (which URLs may be fetched)
ScopeOne page or file per tag; header rules can cover patternsPaths for a whole host
Read whenThe URL is crawledBefore any URL on the host is crawled
Keeps a URL out of resultsYes, with noindexNo; a disallowed address may still be listed from links alone
Saves crawlingNoYes

The two must not be combined on the same URL. Google is explicit: if a page is disallowed in robots.txt, its indexing and serving rules will not be found and are ignored. A page that should drop out of results needs to stay crawlable until Google has seen its noindex.

Setting meta robots in WordPress, Shopify and Wix

WordPress. Core prints the robots meta tag through the wp_robots() function, added in version 5.7, which collects rules from the wp_robots filter and writes one tag (WordPress developer reference, wp_robots). SEO plugins use that route for their per-post settings, and a theme can add its own rule, for example noindex on internal search results:

add_filter( 'wp_robots', function ( $robots ) {
  if ( is_search() ) {
    $robots['noindex'] = true;
  }
  return $robots;
} );

Shopify. There is no per-page switch in the default admin. Shopify’s help center shows two routes: a condition in the <head> of theme.liquid that prints the tag for one template or handle, or a seo.hidden metafield set to 1 on a page, blog post or product, which also drops it from the sitemap and the store search (Shopify Help Center, Hiding a page from search engines).

{% if template contains 'search' %}
<meta name="robots" content="noindex">
{% endif %}

Wix. Each page has a Let search engines index this page toggle under SEO Basics in the page’s More Actions menu; the dashboard can also switch off indexing for groups of pages or the whole site. Wix notes that pages hidden this way may not appear in the sitemap (Wix Help Center, Preventing Search Engines from Indexing Your Page).

Common mistakes

  • noindex left on after launch. Staging settings or a CMS visibility switch carry over to the live site. Check one page per template after every launch.
  • noindex on a page blocked in robots.txt. Google never sees the tag, and the URL can stay in results.
  • Misspelled values. no-index, noindex; or no follow are not valid rules, and Google ignores what it cannot parse. Separate rules with commas.
  • Changing the tag with JavaScript. Google may skip rendering when the raw HTML says noindex, so a script that removes noindex may never run for Google.
  • Expecting nofollow to stop crawling. It only covers links on that page; Google can still find the linked URLs through other links or sitemaps.
  • Relying on noarchive. Google no longer uses it.
  • noindex in robots.txt. Google does not support a noindex rule in robots.txt.

Frequently asked questions

What is the meta robots tag?

It is an HTML meta element named robots, placed in the page head, whose content lists rules such as noindex, nofollow or nosnippet. Search engines read it when they crawl the page and use it to decide whether to index the page, follow its links and how to show it.

Do I need ‘index, follow’ on every page?

index, follow is not needed on any page: both are the defaults, so the tag changes nothing; Google treats a page without a robots tag the same way. Use a robots tag only where you need a restriction. Robots rules are also only one of several gates; our guide to all indexing gates adds status codes, canonicals and robots.txt.

When should I use X-Robots-Tag instead of a meta tag?

Use the header for non-HTML files such as PDFs and images, and when one server rule should cover many URLs. Use the meta tag for individual HTML pages, especially when you cannot edit server configuration. Response headers are one of many checks in our site-wide technical checklist, which runs through a whole site.

What does nosnippet do?

It stops Google from showing a text snippet or video preview for the page; a static image thumbnail may still appear. The rule covers every Google surface, Images, Discover, AI Overviews and AI Mode included, and Google does not use the page’s text as direct input for AI Overviews or AI Mode. Bing honours nosnippet as well and drops both the description and the preview thumbnail.