IIS: host headers w/ Win2003

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
We have an intranet server we're going to use as a test server. We normally access it by going to http://servername. Problem is, we want to test multiple web sites on the server so someone recommended host headers i.e. test.mydomain.com.

How does this work on an intranet site using the server name? I can't do http://test.servername. Do i have to setup a specific host name first or something? We're NOT using a domain right now.

Thanks for the help.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
You'll need to set up the host headers in IIS and either a) add the host names to your internal DNS tables or b) add the host names to your local HOSTS file.
 

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
Thar's what i thought. We dont have an internal DNS server so does that mean all of the developers will need to edit their hosts file? In the hosts file or DNS entry, should i create a "virtual host" i.e. http://virtualdomain.com instead of http://servername? Or does it not really make a difference as long as i create an entry for the redirect to a specific website in IIS? i.e. I can use any name ("test.whatever.com") and just direct it to the "TestApp1" website in IIS?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
A DNS or hosts file entry will map the hostname to the IP address. That will get the request from the client browser to the IIS box.

Once its at the IIS box, it's up to IIS to determine which site to route the request to. The host headers should be configured appropriately.
 

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
So without a hosts file change (dont really want to have to change it on every machine) we have to setup a DNS server for the network to automatically route things correctly? I guess it won't be THAT hard to add entries to the hosts file...