Questions tagged [x-robots-tag]

The x-robots tag is a field in the HTTP response header that allows sites to tell search engines and other crawlers whether or not they are not allowed to access the content found on the URL. In this way, it is very similar to the meta robots tag or the robots.txt file. The difference is that this information is found in the HTTP response header instead of the page source or the robots.txt file on the root of the domain.

The x-robots tag is a field in the HTTP response header that allows sites to tell search engines and other crawlers whether or not they are not allowed to access the content found on the URL. In this way, it is very similar to the meta robots tag or the robots.txt file. The difference is that this information is found in the HTTP response header instead of the page source or the robots.txt file on the root of the domain.

A typical x-robots tag:

X-Robots-Tag: noindex

Similar to the meta robots tag, the x-robots tag can contain multiple values, comma-separated.

Below are the most important values:

  • all: The default value. No restrictions for robots.
  • noindex: Exclude this URL from being indexed
  • nofollow: Do not follow links on this page
  • none: Do nothing with this page (same as "noindex, nofollow")

The x-robots tag is relatively new and not as widely used or accepted as robots.txt or the meta robots tag. Google, Bing, and Yahoo support it, but other search engines may not.

24 questions
7
votes
4 answers

X-Robots noindex specific page in .htaccess

Can I 'noindex, follow' a specific page using x robots in .htaccess? I've found some instructions for noindexing types of files, but I can't find instruction to noindex a single page, and what I have tried so far hasn't worked. This is the page I'm…
moobot
  • 477
  • 1
  • 4
  • 20
6
votes
1 answer

Adding noindex header to php redirect file

I have a simple php redirect script (link.php) that I use to keep track of our affiliate links. (Example: http://www.example.net/link.php?id=1 will bring you to http://www.product1url.com) I've noticed that Google is indexing…
zoe739
  • 125
  • 2
  • 6
5
votes
1 answer

How to exclude all robots except Googlebot and Bingbot with both robots.txt and X-Robots-Tag

I have 2 questions regarding crawlers and robots. Background info I only want Google and Bing to be excluded from the “disallow” and “noindex” limitations. In other words, I want ALL search engines except Google and Bing to follow the “disallow” and…
VinceJ
  • 71
  • 2
  • 5
3
votes
1 answer

Using .htaccess to override existing "noindex, nofollow" X-Robots-Tag header?

I'm trying to set X-Robots-Tag to allow Googlebot to index my website. I don't have a robots.txt file and I don't have any meta tags relating to X-Robots-Tag in any of my html files. The Apache server is returning a header with X-Robots-Tag set to…
TheMarkster
  • 33
  • 1
  • 1
  • 5
3
votes
2 answers

How to remove 'X-Robots-Tag' http header in Symfony 5

I am developing a project using the Symfony 5 framework. I have deployed that code to production. When I am trying to add website to google search engine then I am getting: Error "No: 'noindex' detected in 'X-Robots-Tag' http header" I have…
2
votes
1 answer

is there a way to implement the X-Robots-Tag instruction with tomcat?

I want to add X-Robots-Tag noindex, nofollow to the HTTP response of all the .PDF files of a site to avoid that these documents be referenced by the Google search engine. This is for Tomcat 8 server on Heroku with Spring boot 2.1. From the past,…
1
vote
0 answers

Noindex 4000 urls using x-tag-robots via htaccess

I need to noindex 4000 URLs. I wanna do it using x-robots-tag via htaccess, but I don't want to overload the htaccess with such infinite list of URLs, so... The idea would be to create the list in a separate file (noindexurls.txt) and then using a…
Bobby
  • 23
  • 4
1
vote
1 answer

Using X robot tags to in .htaccess file to de index query strings URL from Google

I am looking for a solution to deindex all the URLs with query strings ?te= from Google. From example I want to deindex all the URLs https://example.com/?te= from Google. Google has currently indexed 21k URLs with the same query string and I want…
1
vote
1 answer

How to add x-robots-tag for certain url pattern

i need help about adding x-robots-tag to certain url pattern. My web site have many ?nonamp=1 ?amp kind of pattern that getting crawled by search engines. I would like to let engines crawl those urls but not want them to index these ones. (i…
damonbl
  • 13
  • 3
1
vote
0 answers

X-Robots noindex all wordpress URLs in specific subdirectory

I want to noindex all websites/URLs in the subdirectory "author". Examples: example.com/author/torben example.com/author/lucy example.com/author/* .htaccess seems to be the right place to do it. I found some code that should do the trick but does…
user231893
  • 11
  • 2
1
vote
0 answers

X robots tag to noindex a single pdf file

I need tour help. I have the need to noindex a single pdf file. I know that if i wanted to noindex all pdf files it would be great to use the x-robots tag Header set X-Robots-Tag "noindex, noarchive,…
Ands
  • 11
  • 1
1
vote
1 answer

How can I get rid of the x-robots-tag in my http response header

So I have a wordpress website on a server, on which the x-robots-tag is always included, because it's mainly a storage cloud hosting. I want to get rid of the tag because with it my site won't get indexed for google and other search engines. I tried…
Magnix
  • 11
  • 1
  • 2
1
vote
1 answer

Apache and Nginx as reverse proxy: where to add X-Robots-Tag?

If Nginx works as reverse proxy between Apache and the web, where should i add X-Robots-Tag (to add some additional headers) - in the htaccess of Apache or in the Nginx configuration file?
Evgeniy
  • 2,337
  • 2
  • 28
  • 68
1
vote
2 answers

Bash shell script to find Robots meta tag value

I've found this bash script to check status of URLs from text file and print the destination URL when having redirections : #!/bin/bash while read url do dt=$(date '+%H:%M:%S'); urlstatus=$(curl -kH 'Cache-Control: no-cache' -o /dev/null…
Sami
  • 717
  • 6
  • 28
1
vote
2 answers

Google Search Console throws error in UI: 'noindex' detected in 'X-Robots-Tag' http header

In trying to crawl my site in Google Search Console, I see the following error on each and every one of my pages: I updated the X-Robots-Tag to have the following: < X-Robots-Tag: usasearch all; googlebot all; none and verified that this is live…
Stan
  • 1,191
  • 2
  • 15
  • 27
1
2