3

if a server response header is added to a config file of a site, does it display in IIS 7 as a server response header?

I am having a problem where a no index response header (tag) is repeatedly being added to a high profile website.

This no index header is viewable under the "server response headers" feature.

I have removed the response header a number of times in the past.

The only thing I can think of is that the header is part of a web config file on the development environment and when changes are uploaded the web config file from the dev environment is being copied with it causing the no index response to be pushed to the live environment.

can anyone clarify??

Thanks all!!

2
  • 1
    Please quote exactly what you are seeing and what tools you are using to see it. I think your terminology may be a bit off. Are you talking about an HTTP header that looks like "Server: IIS 7.5"? What exactly is a "no index response header (tag)"?
    – rmalayter
    Feb 15, 2012 at 16:27
  • "x-robots-tag noindex" is the response header that keeps appearing in IIS after I remove it, and yeah - my bad - it is an HTTP response header so apologies for the confusion.
    – Andy Smith
    Feb 15, 2012 at 16:35

1 Answer 1

4

If you suspect that the web.config file includes a custom header, why don't you have a look? :-)

Open the web.config file in your favorite XML editor (I prefer notepad++), locate the following section:

system.webServer/httpProtocol/customHeaders

and see if any headers are added. It would look something like this (assuming that nothing else was in that web.config file):

<configuration>
   <system.webServer>
      <httpProtocol>
         <customHeaders>
            <add name="x-robots-tag" value="noindex" />
         </customHeaders>
      </httpProtocol>
   </system.webServer>
</configuration>

You can find more info on customHeaders over at IIS.NET

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .