Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
So, here are my requirements. I am building a multi-tenant site where companies after they sign up get their own subdomain.
Assume that my business is called Email Jobs Inc with domain www.emailjobs.com. This site is hosted in a shared ISP environment so I have very limited access to IIS etc.

Just to clarify, here is an example of what I need:

company1 signs up and they get this url company1.emailjobs.com
company2 signs up and they get this url company2.emailjobs.com
company3 signs up and they get this url: company3.emailjobs.com

My understanding is that there is a DNS and IIS component to this. That is, I will need to change an entry in a DSN server and then also a binding in IIS. All this is very tricky, because of non-static IP addresses, etc. etc.

However, another option I heard of is to ask your ISP to setup an IIS wildcard option where *.emailjobs.com goes straight to my ASP.NET MVC server. There I can parse the URL, extract the subdomain and I would be in business! Right?

Could someone confirm that this is possible and correct?

I realize that another option I have is to build urls like this: www.emailjobs.com/company1 etc, but that would be far less elegant.
Any feedback would be greatly appreciated...

Best.
Posted
Comments
F-ES Sitecore 20-May-15 4:58am    
This is a very common requirement, it is best to just put your question subject into google and read all the questions\articles out there that already cover this

http://stackoverflow.com/questions/458757/wildcard-subdomains-in-iis7-is-it-possible-to-make-them-like-it-is-in-apache

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900