Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I host multiple domains on a GoDaddy shared hosting account. I would like to setup a website locally in IIS 7 that mimics the setup of my hosted account so that I can test and debug applications locally before deploying, as debugging after deploying, or discovering there are issues after deploying is frustrating.

I have created a folder WebRoot, at put my main application in that folder. I created a website in IIS 7 and pointed it at that folder. I setup bindings with a fake domain, and created a matching entry in my hosts file to make the fake domain point at my I then created a folder under webroot. I then created an application underneath my website, and pointed it at this folder. I can't find how I can add bindings to the web application to have it referenced as a different fake domain, rather than a subdirectory under my root domain.

What would be the proper way to setup IIS to best simulate the environment on the GoDaddy servers.

share|improve this question

migrated from Jan 4 '10 at 22:40

This question came from our site for professional and enthusiast programmers.

Bindings can only be done at site level. They cannot be done at application or folder level.

You have two options:

  1. Create a 2nd IIS site, bind it to your 2nd fake domain, and configure the application in there

  2. Add a 2nd binding to your existing website for your 2nd domain name. Then the site will respond on both domains. You can then use some server-side (or even javascript) code to redirect/reject queries that come in on the domain you don't want.

share|improve this answer
Your #2 option seems somewhat likely. If I have a website pointing at the folder /webRoot, and then I create an application inside that website pointing at /webRoot/ then I get some of the same behavior as godaddy. One big difference is in my configuration, the sub application doesn't get web.config values from the root application (website), but on godaddy, it does get those values. However, I'm sure it is not a virtual directory because it allows application level settings in the web.config. – NerdFury Jan 19 '10 at 17:26
Also, will take me to the / folder on godaddy, but Action Links created with mvc append the folder name in the urls generated making them which is not desirable, but I may not have an option there, other than to write my own link generator. – NerdFury Jan 19 '10 at 17:28
@NerdFury have you been able to solve the issue where ASP.Net MVC Html.ActionLink() appends the subfolder? – xandercoded Aug 5 '10 at 3:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.