Link to home
Start Free TrialLog in
Avatar of sheelpatel
sheelpatelFlag for Canada

asked on

How can I go about setting up a subdomain on IIS7?

I am runing IIS7 on Windows Server 2008
I have two sites created,
one as my root domain lets say domain.com,
and another at sub.domain.com
this evidently isnt enough, how can I go about creating the subdomain?
Avatar of meverest
meverest
Flag of Australia image

Hi,

1.  open up inetmgr (start->run->"inetmgr"->ok)
2.  expand the branches to see the web sites node.
3.  right click the web sites node (i.e. NOT the actual web site) and choose 'add web site'
4.  enter:
    site name: whatever you want (e.g. 'subdomain site')
    physical path: fully qualified path to the web site content (e.g. "c:\inetpub\subdomsite")
    host name: the host name used to access (e.g. "sub.domain.com")

now make sure that your dns is working ('sub.domain.com' should resolve to the same IP address as 'www.domain.com) and then it should all just simply work.

Cheers.


Avatar of sheelpatel

ASKER

Thanks for your help, I think my problem is that my sub domain isn't in inetpub, does it have to be?
Hello,

no - it can be anywhere that the anonymous web user has read access.  what is the nature of the problem you experience?

Cheers.
I simply get a server not found message, my subdomain is on another drive.  I believe its a permission problem as the IIS users group isnt even listed on the permissions for the subdomain folder, is there anyway I can add the group?  Thanks for your help.
open up a cmd shell and enter "ping sub.domain.com" then "ping www.domain.com" (put your real domain and subdomain in there of course) do they both resolve to IP addresses?  do they both resolve to the SAME ip address?

Cheers.
The subdomain host could not be found, I do not think IIS has permissions to read that directory, how can I enable read privileges without having the group show up in the panel when I right click properties? I'm not very familiar with windows as a hosting platform.
I manged to add read privileges to IIS Users, however I still can not ping the site
 
then it is a dns issue - who looks after dns for your domain?

if you only need to access from a few locations, you can add an entry to hosts file:

start->run->"notepad %systemroot%\system32\drivers\etc\hosts"->OK

then add a line atthe bottom of the file:

 

e.g:

192.168.1.3 sub.domain.com

Cheers.
this crappy wysiwyg editor stuffed up that last comment:

 
 
e.g:

192.168.1.3 sub.domain.com

ASKER CERTIFIED SOLUTION
Avatar of meverest
meverest
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have a dedicated server, my DNS is handled by the ISP, thanks for your help, I will contact them as to why I cant create a domain name.  Thanks for your help.
You will always need to make a dns entry for every hostname you use.

cheers.
Ok, thank you very much