Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I change the message Bad Request (Invalid Hostname) in IIS 6? I would like to be able to change it to Bad Request (Invalid Hostname - SERVERNAME) so I can identify which server gets the request.

share|improve this question

Are you saying "which server" in the context of a cluster or something? Or are you instead looking to see what the bad Host: header value is?

Invalid Hostname means that you don't have a website on the server configured to handle requests for whatever host was sent in the Host: header of the http request.

That means that your server (call it SERVERA) is getting a request that looks something like:

GET / HTTP/1.1
Connection: close

and you have a DNS record for that points to the IP of the SERVERA (so that the request will actually make it to SERVERA). But what you don't have is a web site configured in IIS on SERVERA that is set to accept requests for

share|improve this answer
@squillman This is in the context of routing problems at the hosting company. I want to know which physical server responded to this request with an Invalid hostname. In other words my A record is correct, but I don't trust how the hosting company is doing the routing. So I would like to verify that my server is actually getting the request. – Keltex Feb 19 '10 at 18:04
@Keltex: ah, ok. In that case can you not just look at the IIS log to see if your requests are getting to the server? It sounds like you have physical access to the server, in that you're wondering how to modify IIS config. – squillman Feb 19 '10 at 18:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.