X-Robots-Tag Checker

Inspect the HTTP headers of any URL (HTML pages, PDFs, images) to check for X-Robots-Tag indexing directives.

Try URLs for HTML pages, PDFs, images, or API endpoints.

Share this tool:

What is the X-Robots-Tag?

The `X-Robots-Tag` is an HTTP header sent by your web server that functions similarly to the HTML `<meta name="robots">` tag. However, while meta tags only work on HTML documents, the `X-Robots-Tag` can be applied to any file type.

This makes it the only effective way to prevent search engines from indexing non-HTML files such as PDFs, images (JPG, PNG), videos, or plain text documents.

Protecting Non-HTML Files

If you have an internal PDF document or a private image, putting a rule in `robots.txt` might stop crawling, but Google can still index the URL if someone links to it. Only an `X-Robots-Tag: noindex` will force Google to remove the PDF from search results.

Server-Level Control

By configuring your Apache or Nginx server, you can apply an `X-Robots-Tag` conditionally across an entire directory (e.g., forcing `noindex` on all `.doc` files or a specific staging environment) without modifying the application code.

Frequently Asked Questions

In your `.htaccess` file, you can add a rule using `Header set`. For example, to noindex all PDFs:
<FilesMatch "\.pdf$">
Header set X-Robots-Tag "noindex, nofollow"
</FilesMatch>
In your server block configuration, use the `add_header` directive:
location ~* \.pdf$ {
add_header X-Robots-Tag "noindex, nofollow";
}
It supports all standard meta robots directives, including `noindex`, `nofollow`, `none`, `noarchive`, `nosnippet`, `max-snippet`, `max-image-preview`, and `max-video-preview`.
Google processes both. If they conflict, Google typically honors the most restrictive directive. For instance, if the HTML meta tag says `index` but the HTTP header says `noindex`, Google will `noindex` the page.
Yes! The default behavior for search engines is to crawl and index everything they can access. Unless you explicitly want to block or restrict indexing via HTTP headers, you do not need an X-Robots-Tag.

Was this tool helpful?

Comments

Loading comments...

Check Out Other Popular Tools