We help IT Professionals succeed at work.

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

3,645 Views
Last Modified: 2012-08-14
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?
Comment
Watch Question

Top Expert 2008

Commented:
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.


Author

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

Commented:
Hello,

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

Cheers.

Author

Commented:
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.
Top Expert 2008

Commented:
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.

Author

Commented:
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.

Author

Commented:
I manged to add read privileges to IIS Users, however I still can not ping the site
 
Top Expert 2008

Commented:
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.
Top Expert 2008

Commented:
this crappy wysiwyg editor stuffed up that last comment:

 
 
e.g:

192.168.1.3 sub.domain.com

Top Expert 2008
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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.
Top Expert 2008

Commented:
You will always need to make a dns entry for every hostname you use.

cheers.

Author

Commented:
Ok, thank you very much

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.