Host Multiple Domains with the same ASP.NET MVC app?
Asked Answered
B

2

6

I want to host multiple web sites (all with different domains - not sub domains) with the same ASP.NET MVC app. I need the app to act differently based off the domain, but I still want the same app to serve all domains. I don't want domain forwarding or redirection, I actully want all the domains to function on their own, but served out of the same MVC app. How do I do this? It is also worth noting that I am in shared hosting with GoDaddy.

Thanks in advance!

Bezonian answered 26/3, 2009 at 14:14 Comment(2)
Can you give an example or two of the different behaviours you're looking for?Woodworth
@Zhaph-BenDuguid www.somesite.com/home/news, and www.somesite2.com/home/news. Data fetched from same db by a domainConstant.Anomie
R
3

This should be possible with IIS using the host headers field in the bindings settings. You can add as many different host headers as you want for your application. And as long as that domain somehow goes to that host on that particular port (http or https or custom), then that application will be used.

Ripping answered 26/3, 2009 at 14:30 Comment(0)
K
3

ASP.NET MVC Domain Routing demonstrates one possible way to control ASP.Net MVC application behavior based on the domain name that was used to reach your site.

Kelwin answered 9/6, 2011 at 4:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.