cancel
Showing results for 
Search instead for 
Did you mean: 

IIS 6 - configuring for sub-domains

chenks76
All Star
Posts: 3,274
Thanks: 338
Fixes: 12
Registered: ‎24-10-2013

IIS 6 - configuring for sub-domains

so i've set up a windows 2003 server at home for testing and playing about.
i had a similar set many years ago, and my memory is a little vague now.

i have a domain which is pointing to the server, all ok so far.
i have set up 2 sub domains, and they are also correctly pointing to the server.

in IIS do i leave the default website "as is"? ie leave the host header value as blank?
then create 2 new "sites" in IIS (one for each sub domain) and set the host header value in each as the FQDN?

so it would be....
default web site - for www.blah.com (or blah.com) - host header left as blank
sub1 - for sub1.blah.com - host header set to "sub1.blah.com"
sub2 - for sub2.blah,com - host header set to "sub2.blah.com"

reason i ask is that i've set it up like that, and the two sub domains work fine, but when i try to go to the main domain i get Bad Request (Invalid Hostname)

5 REPLIES 5
Anonymous
Not applicable

Re: IIS 6 - configuring for sub-domains

Have you created a host entry for it?

chenks76
All Star
Posts: 3,274
Thanks: 338
Fixes: 12
Registered: ‎24-10-2013

Re: IIS 6 - configuring for sub-domains

host entry where and for what?
these are public URL's, no need for a local host file if that's what you mean.

the two sub-domains load fine, externally and internally.
Anonymous
Not applicable

Re: IIS 6 - configuring for sub-domains

I guess that would be the same place you used for the sub-domains. If you go to sub1.blah.com and to sub2.blah.com you must have created DNS entries for these somewhere, no?

chenks76
All Star
Posts: 3,274
Thanks: 338
Fixes: 12
Registered: ‎24-10-2013

Re: IIS 6 - configuring for sub-domains

the A records are already set up via the domain registrar.
this is an IIS config issue, as the "bad request" error is coming from IIS

Anonymous
Not applicable

Re: IIS 6 - configuring for sub-domains

This link may be of interest to you then.