|
| IIS 6 with Sub Domains - how? |
 |
Tue, 4 Mar 2008 14:50:14 +0000 |
I have a DNS server setup. It has a main website example.com. I want to make
subdomains such as 1.example.com and 2.example.com.
I was told that this is how to do it:
1. Create a directory for the website and put it in there.
2. Create the new website in IIS. Set its host header to 1.example.com
3. Create an Alias CName in DNS. All the websites are on the same box as the
DNS server, so I use an Alias rather than a Host A record.
I have done this many times. Sometimes it works, sometimes it doesn't. I don't
know why it is so tempermental. Can anyone give me the steps to garantee this
setup works everytime.
|
| Post Reply
|
| Re: IIS 6 with Sub Domains - how? |
 |
Tue, 4 Mar 2008 16:03:03 +0000 |
Hwere are you accessing it from? has the DNS entry been replicated? Hav you
tried flushing the DNS chache?
|
| Post Reply
|
| Re: IIS 6 with Sub Domains - how? |
 |
Wed, 5 Mar 2008 14:40:33 +0000 |
The first thing you should check is that the domain name pings to the right IP.
(it sounds like it does). From the command prompt type ping {domain name}. If
it pings to the right IP, you can consider DNS good and you don't need to worry
about that anymore.
For the server, you need a binding specific to each IP. The (all unassigned) is
a wildcard IP which means that it will listen on all IPs. For example, if you
had 127.0.0.1 before but your domain name is 64.10.10.10, then it wouldn't
'catch' by site binding because it doesn't match. Setting to (all unassigned)
will listen.
There are 3 things you need to have correct for the binding to work: IP, port
and host header. Port is always always 80 for HTTP traffic unless you have a
specific reason otherwise. For a server with a single IP address, you can
either enter that IP address or you can leave it to all unassigned. The host
header is key. At least two of your site must have specific host headers. If
you have DNS setup to send the www. and non www. to the server, then you will
need 2 host headers, one for the www and one for without. i.e. it needs to be
an exact match. The 3rd site can either have a specific host header like the
other two, or it can be left blank which means that it's a wildcard and will
catch everything except for what the other 2 sites are handling.
You can't have the exact same bindings on any two sites, otherwise one of the
sites won't start.
As long as you can understand the IP/Port/Host header concept, and do a ping
test for DNS, it's pretty easy to follow the logic and see what IIS site should
handle the domain name.
|
| Post Reply
|
| Re: IIS 6 with Sub Domains - how? |
 |
Wed, 5 Mar 2008 15:20:16 +0000 |
See the forums at www.iis.net for help configuring IIS. Same login/password as
here.
Jeff
|
| Post Reply
|
| Re: IIS 6 with Sub Domains - how? |
 |
Wed, 5 Mar 2008 15:39:39 +0000 |
My primary webserver will also be my primary DNS server - so I am accessing the
website through the DNS server. I have setup three subdomains - two of which
worked but one did not - even though all the setting were the same. I restarted
both IIS and DNS many times and cleared the DNS cache with no effect. At the
moment, the server only has one IP address, so I went into IIS and set the IP
address of the sub domains from Unassigned all to my IP address. The sub domain
started working. I then reset this to 'Unassigned all' and the sub domain
continued to work. I have no idea why this is happening, but it is working. I
would like to know why though.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|