Reputation: 77
I am building a Web Application on IIS with asp.net. The concept is as follows.
A customer Buys a Domain and then Selects a Template from 20-30 ready Templates.
Now the application resides on say www.mywebappblabla.com/usersites
The users domain is www.myowndomain.com
which points to www.mywebappblabla.com/usersites
and then we track url from the database and then website is shown along with the predefines template from the user.
So if there is other user with domain www.myotherdomain.com
which will again point to www.mywebappblabla.com/usersites
and then different template and different page content is shown to him depending on stored data in database.
My question is this system may be used by say 3000 -5000 users. So is this the right approch? Or should we make a seperate folder and separate Db for each site?
We want to configure the system in very less time. eg. User sends word file with content and the template to use. We should be able to make the site live in 2-3 hrs.
What should be the approch. Will it affect the site performance.
Thanks and Regards
VIpin
Upvotes: 4
Views: 2455
Reputation: 13775
That approach is fine. Obviously a lot of people use sub domains instead, but the host is just as suitable.
You'll need to setup bindings in IIS to allow all requests *
on port 80/443 for the site. And you'll obviously want to store their domains and route them to the right template based on the domain. You might also set it up so unregistered domains get a friendly version of your site or a friendly error message.
As far as technical help, more specific questions as you implement it will produce better results. If you aren't familiar with asp.net, you should look into HttpContext
. That will let you inspect the request's domain. That should give you a start.
Upvotes: 1
Reputation: 21
Most Websites use a subdomain approach for this kind of thing; for instance, my "Website" might be located at joshuashanemartin.host.com and yours might be located at yourusername.host.com (Wordpress, Google Sites, and others all use this approach).
Basically, you might use a single database with the following tables:
One customer can have multiple sites, each of which has many pages. You define the template in the site, or even in the page. Each "page" object has a "content" attribute, which is either HTML or some kind of markup language (like what StackOverflow uses when I write my answer).
Whether or not you take the subdomain approach, like customername.host.com, or your approach, like www.host.com/usersites/customername is up to you. In the end, you'll just be loading different content from a single database and using the URL to determine who's data you're loading.
Upvotes: 1