X-Robots-Tag HTTP Headers

Updated on

Because HTML meta tags only work in HTML pages, there needed to be a way for other files to send a message to bots that blocks them from being indexed.

That method is an HTTP header called the X-Robots-Tag.

How to implement this header requires programming knowledge so we won’t go into the details yet, but when a Web server includes a tag with the name X-Robots-Tag (case-insensitive), search engines are supposed to respect the values.

Here’s an example of an X-Robots-Tag telling search engines not to include the page in the search results:

x-robots-tag: noindex

To learn more about the possible values of the header, see this page.

Takeaways

Return to the main tutorial page.

Feedback and Comments

What did you think about this page? Do you have any questions, or is there anything that could be improved? You can leave a comment after clicking on an icon below.