I'm using host headers in IIS 6 to host multiple websites for the same IP address. Currently I have a need to access one of the websites by IP address rather than URL. Any idea how to do this?

I could take advantage of DNS Rewrite on my firewall but I don't have access to it right at the moment.


Put another host header directive in on the target web site, only enter the desired IP address instead of the host name when you create it. The host header directives just inspect the value of the HOST: HTTP header (which is a string) so you can enter anything in there.

Obviously the server will need to actually have that IP address assigned to it and the web site will need to be listening to that address in order for it to answer :)

  • I was able to put another host header directive in there of the internal IP address and a different port number besides the default '80'. I was going to accept your answer, but apparently I have to wait 8 minutes...WTF? – GregD Aug 19 '10 at 17:58

Quick and dirty solution: put the web site's name in the hosts file of your client computer.

This way, when you type http://web.site.name/ in your web browser, it will resolve to the server's IP address and the browser will use exactly that name when making its HTTP requests.

You can do this for multiple names at once, and the browser will behave correctly (i.e. as you want him to) with all of them.


Sorry, I misunderstood the question; I thought you wanted to access one of your web sites without having an actual DNS entry pointing to it.

If you actually want to put the IP ADDRESS in your web browser and have the server answer with one specific site, you'll need to either have it run as the default web site on the server, or use another IP address and/or a custom port.

  • This solution won't work for me Massimo. I have multiple websites using the same IP address (which is why I mentioned host headers). I had to add an additional port, in this case '81' to the other websites host header info – GregD Aug 19 '10 at 18:19
  • @GregD, see edit above. – Massimo Aug 19 '10 at 18:28
  • It's all good. I certainly never misread a question.. – GregD Aug 19 '10 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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