0

Im a little lost here. Im starting on a project for a customer who wants a SaaS solution as a small portal.

The idea is that i make a web solution e.g. an online business card, where each customer should have their own domain like this:

  • www.carpenter.com
  • www.painter.com
  • www.masonry.com

Etc. each of these domains should point to my web application and each have their own administration web site and the online business card. This means that if I go to: www.carpenter.com I should see the companys online business card. And at the url: www.carpenter.com/admin the carpenter company should be able to log in and edit its information.

I hope this makes sense.

What Im looking at is how this is done in practice, I would like to have a central database and a central place to update my software (maybe one per country). What do i need to do to point a www.carpenter.com domain/url to its own specific area in my web app. And how do I need to structure my web application to do this?

Im using ASP.NET MVC for this, but this should be a general question regardless of language - or?

Im considering using a cloud service such as Azure, is this possible with this setup? Or do i need a virtual hosted server i own myself?

I guess the main question is "how do I host multiple domains on the same software" - and keep the display of the "business card" and admin separated from each customer?

Brian Hvarregaard
  • 4,081
  • 6
  • 41
  • 77
  • This has been asked many times before. Please use the search with queries like "asp.net mvc multiple domains". – CodeCaster Jul 02 '14 at 14:10
  • possible duplicate of [Host Multiple Domains with the same ASP.NET MVC app?](http://stackoverflow.com/questions/685973/host-multiple-domains-with-the-same-asp-net-mvc-app) – CodeCaster Jul 02 '14 at 14:10

1 Answers1

0

Not sure if this specifically answers your question, and my experience thus far has not been with ASP, but I think the general idea is that you determine the execution environment for your web app early in the bootstrap process, and then set constants and configuration options at that point. Then, you can use those values throughout your application to customise the response based on which site you're working with (i.e. carpetner, masonry, etc.). And, since the only piece of differentiating information you have during the bootstrap process is the domain name and URL of the site being requested, I think the generally accepted method is to switch on the domain name. So, you can store different configs for the different sites based on their domain names, and then load those configs during the bootstrap process. For example, if you had a different site template for your carpentry site and your masonry site, you could store the path to your templates as one of the configuration options. HTH

oliakaoil
  • 1,615
  • 2
  • 15
  • 36