Meta tags

robots

Sets page-level rules for compliant search crawlers, including whether the page may appear in results and what previews may be shown. It does not block access to the page.

Parameters

all
Applies no indexing or search presentation restrictions. This is the default.
<meta name="robots" content="all">
noindex
Prevents the page from appearing in search results.
<meta name="robots" content="noindex">
nofollow
Tells crawlers not to follow links on the page.
<meta name="robots" content="nofollow">
none
Equivalent to noindex, nofollow.
<meta name="robots" content="none">
nosnippet
Prevents a text snippet or video preview in search results.
<meta name="robots" content="nosnippet">
indexifembedded
Lets Google index an embedded page despite noindex. It works only when combined with noindex.
<meta name="robots" content="indexifembedded">
max-snippet:120
Limits a Google text snippet to 120 characters.
<meta name="robots" content="max-snippet:120">
max-image-preview:large
Allows Google to show an image preview as wide as the result viewport.
<meta name="robots" content="max-image-preview:large">
max-video-preview:-1
Allows Google to show a video preview of any length.
<meta name="robots" content="max-video-preview:-1">
notranslate
Prevents Google from offering a translated result for the page.
<meta name="robots" content="notranslate">
noimageindex
Prevents Google from indexing images on the page.
<meta name="robots" content="noimageindex">
unavailable_after: 2030-12-31
Removes the page from Google results after a valid date or time.
<meta name="robots" content="unavailable_after: 2030-12-31">
export type Robots =
     /**
   * Applies no indexing or search presentation restrictions. This is the default.
  **/
    'all'
    /**
   * Prevents the page from appearing in search results.
  **/
    'noindex'
    /**
   * Tells crawlers not to follow links on the page.
  **/
    'nofollow'
    /**
   * Equivalent to noindex, nofollow.
  **/
    'none'
    /**
   * Prevents a text snippet or video preview in search results.
  **/
    'nosnippet'
    /**
   * Lets Google index an embedded page despite noindex. It works only when combined with noindex.
  **/
    'indexifembedded'
    /**
   * Limits a Google text snippet to 120 characters.
  **/
    'max-snippet:120'
    /**
   * Allows Google to show an image preview as wide as the result viewport.
  **/
    'max-image-preview:large'
    /**
   * Allows Google to show a video preview of any length.
  **/
    'max-video-preview:-1'
    /**
   * Prevents Google from offering a translated result for the page.
  **/
    'notranslate'
    /**
   * Prevents Google from indexing images on the page.
  **/
    'noimageindex'
    /**
   * Removes the page from Google results after a valid date or time.
  **/
    'unavailable_after: 2030-12-31'

Code examples

Good example
<meta name="robots" content="noindex">
Prevents compliant search engines from showing the page in their results.
Good example
<meta name="robots" content="max-snippet:120, max-image-preview:large">
Limits the Google text snippet and permits a large image preview.
Avoid this example
<meta name="robots" content="index, follow">
These are defaults for Google, so the tag adds no restriction.
Avoid this example
<meta name="robots" content="noarchive">
Google ignores this historical rule because cached links no longer exist in Google Search.

Recommendations

  • 01
    Let Crawlers Read the Tag
    Do not block the page in robots.txt when relying on noindex. A crawler must fetch the page before it can see this metadata.
  • 02
    Skip Default Rules
    Google’s default has no restrictions, so all and index, follow add no useful instruction.
  • 03
    Expect Crawler Differences
    Search engines do not all support the same rules. Check the documentation for each crawler you need to control.

Related documentation

Related meta tags

author

name

Names one author of the page. Add another author meta tag for each additional author.

<meta name="author" content="Jane Doe">
Names the author exactly as credited on the page.

charset

charset

Declares the character encoding used by the HTML document. In modern HTML, the value must be UTF-8.

<meta charset="utf-8">
The required character encoding for modern HTML.

Summarizes the page for directories and search engines. Google may use it as a search result snippet when it describes the page better than the visible content does.

<meta name="description" content="Bake 12 vanilla cupcakes in 35 minutes. Includes metric measurements, storage notes, and fixes for cakes that sink.">
Specific details tell the reader what the recipe covers.

google

name

Carries Google-specific page controls. Google currently documents nopagereadaloud for this metadata name.

<meta name="google" content="nopagereadaloud">
The documented Google-specific opt-out for page read-aloud services.

Verifies ownership of a site in Google Search Console. Google provides the exact token to place on the site’s top-level page.

<meta name="google-site-verification" content="your_verification_code">
Replace this placeholder with the exact token issued by Search Console.