Robots directives in headers and HTML

Robots meta and X-Robots-Tag can carry page-level indexing and serving rules. They only help a crawler that can receive and process the response containing them.

Decision rule

Inspect response headers and HTML separately, record targeted user agents, and resolve conflicts with the relevant crawler documentation.

01

Where directives appear

  • Robots meta element: an HTML element, normally in the document head.
  • X-Robots-Tag: an HTTP response header that can also apply to non-HTML resources.
  • robots.txt: a crawl-control file, not a page-level noindex mechanism.
02

Common rules

Support and interpretation can differ by crawler. Recheck the operator's current documentation before relying on a rule outside Google Search.

  • noindex asks a supporting search engine not to show the resource in results.
  • nofollow asks a supporting crawler not to follow links on the resource.
  • nosnippet prevents a text or video preview in supporting Google results.
  • max-snippet, max-image-preview, and max-video-preview set supported preview limits.
03

Crawler access comes first

Google states that a crawler must be allowed to access a page to discover its meta or X-Robots-Tag rules. Disallowing a URL in robots.txt can prevent those page-level rules from being seen.

This is why crawl control and index control should be tested as a combined system, not as interchangeable files.

04

What an inspector should report

  • Every robots meta element and its name attribute.
  • Every X-Robots-Tag field and any targeted crawler token.
  • Duplicate or conflicting rules without silently discarding one.
  • Whether the HTML, response headers, or original fetch context are missing.
90

Primary sources

Checked for this page on 22 August 2026. External documentation can change.

  1. 01
    Google Search Central — Robots meta and X-Robots-Tag

    Current page-level indexing and serving controls supported by Google Search.