Inferensys

Glossary

X-Robots-Tag

An HTTP header directive that provides granular, page-level control over indexing and content usage, allowing webmasters to specify noindex or noarchive rules for AI crawlers without modifying HTML meta tags.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
HTTP HEADER DIRECTIVE

What is X-Robots-Tag?

The X-Robots-Tag is an HTTP response header that provides granular, page-level control over indexing and content usage, allowing webmasters to specify directives like `noindex` or `noarchive` for AI crawlers without modifying HTML meta tags.

The X-Robots-Tag is an HTTP header directive that controls how compliant crawlers index and use specific web resources. Unlike the robots.txt file, which offers site-wide path exclusion, or HTML <meta> tags, which require markup access, the X-Robots-Tag operates at the server configuration level. This allows administrators to apply granular indexing rules to non-HTML files like PDFs, images, and videos, or to dynamically generated content, specifying rules such as noindex, nofollow, or noarchive directly in the HTTP response.

For AI training data opt-out, the X-Robots-Tag is a critical mechanism for implementing the TDM Reservation Protocol. By serving a X-Robots-Tag: noai or tdm-reservation: 1 header, rights holders signal to compliant AI crawlers that content is reserved for text and data mining. This provides a legally significant, machine-readable preference signal that operates at the protocol level, offering a more robust and enforceable method for content exclusion than relying solely on robots.txt disallow rules for autonomous agents.

HTTP HEADER DIRECTIVES

Key Features of the X-Robots-Tag

The X-Robots-Tag provides granular, page-level control over indexing and content usage for AI crawlers. Unlike meta tags, it operates at the HTTP response level, allowing webmasters to manage non-HTML resources like PDFs and images.

01

Granular Path Exclusion

Enables selective blocking of AI crawlers from specific directories or file types without affecting human visibility. Use wildcards and regex patterns in server configuration to target precise content segments.

  • Example: Header set X-Robots-Tag "noindex, noarchive" for /private/ directory
  • Applies to PDFs, images, and other non-HTML files
  • Overrides broader robots.txt rules for specific resources
02

AI-Specific User-Agent Targeting

Directives can be scoped to specific AI crawler user-agents like GPTBot or CCBot, allowing differentiated policies for search engines versus training data collectors.

  • Example: Header set X-Robots-Tag "noindex" "expr=%{HTTP_USER_AGENT} =~ /GPTBot/"
  • Maintains search visibility while blocking AI training ingestion
  • Supports conditional logic based on user-agent strings
03

Noarchive Directive

The noarchive value prevents compliant crawlers from storing cached copies of content, restricting use in long-term training data repositories.

  • Blocks storage in cached corpora and training datasets
  • Critical for time-sensitive or proprietary content
  • Works alongside noindex for comprehensive protection
04

Non-HTML Resource Control

Unlike HTML meta tags, the X-Robots-Tag controls indexing for binary assets like PDFs, images, videos, and API responses that lack a document head.

  • Example: Header set X-Robots-Tag "noindex, noai" on image directories
  • Essential for protecting multimedia training data
  • Applies to JSON, XML, and other structured data endpoints
05

TDM Opt-Out Integration

The header supports Text and Data Mining (TDM) reservation signals, explicitly communicating that copyrighted works are reserved and unavailable for AI training ingestion.

  • Implements TDM Reservation Protocol at the HTTP level
  • Provides machine-readable rights reservation
  • Complements robots.txt TDM declarations
06

Conditional Header Application

Server configurations like Apache mod_headers and Nginx add_header support conditional logic based on URL patterns, file types, or request parameters.

  • Apache: Use Header set with expr= conditions
  • Nginx: Use add_header within location blocks
  • Enables dynamic, context-aware crawling policies
X-ROBOTS-TAG

Frequently Asked Questions

Clear answers to the most common technical and legal questions about using the X-Robots-Tag HTTP header to control AI crawler access and training data ingestion.

The X-Robots-Tag is an HTTP response header directive that provides granular, page-level control over indexing and content usage for automated crawlers, including AI bots. Unlike the robots.txt file, which offers site-wide path exclusion, or HTML <meta name="robots"> tags, which only work on HTML pages, the X-Robots-Tag can be applied to any file type—PDFs, images, videos, and JSON responses. The server sends this header in the HTTP response, and compliant crawlers parse it before processing the content. For AI training opt-out, the directive X-Robots-Tag: noai or X-Robots-Tag: noindex, noarchive signals that the content must not be used for foundation model training or stored in long-term training corpora. This mechanism is critical for enforcing Training Data Opt-Out policies on non-HTML assets that cannot embed meta tags.

CRAWLER DIRECTIVE COMPARISON

X-Robots-Tag vs. Robots.txt vs. Meta Robots

A technical comparison of the three primary mechanisms for controlling AI crawler access and indexing behavior across HTTP headers, file-based protocols, and HTML elements.

FeatureX-Robots-TagRobots.txtMeta Robots

Implementation Layer

HTTP response header

Server file (plain text)

HTML <meta> element

Scope of Control

Per-resource (URL-level)

Site-wide or directory-level

Per-page (HTML document)

Non-HTML File Support

AI-Specific Directives (noai, noimageai)

Crawl Budget Management

Indexing Prevention

Snippet/Cache Control

Enforcement Model

Voluntary compliance

Voluntary compliance

Voluntary compliance

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.