I asked this question (Mapping mvc application to subdomains using IIS 7.5) over on stackoverflow and Amritpal mentioned I should be looking at multi tenancy.

How do I set my 2 applications up to run this?

I have 2 mvc4 applications on the same server running IIS 7.5

Application 1 is the marketing site Application 2 is the business site that I need to be able to configure a wildcard dns allow me to point to something like

www. company2.mydomain.com

I dont want to have to hardcode anything into IIS for each of the hostheaders as I dont want to have to update IIS everytime I get a new customer.

Any suggestions/tips/answers would be really appreciated.


If no SSL is required, I would just add a 2nd IP to host, and create a IIS Web App for each MVC4 app and bind each Web App on it's own IP. Then no host headers are required and you can point your wildcard DNS to the respective IP for each app.


To get IIS to respond using the same app pool/website, you should set it up with a blank hostname in IIS Manager.

Once you do this, I would guess you need to do the rest in MVC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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