The right way to create subdomains for different user and seo friendly subdomains

Go To StackoverFlow.com

1

I want to build a website with asp.net mvc3 and entity framework which user can login and make their own store under a subdomain.

There is two way that i can do that:

the first one is to create only one view page and based on the user fill the page with appropriate style and content from the database and use url rewriting to fix the url. so for example if my website name is example.com a user can login and create a subdomain like user1.example.com which then there are some pages like user1.examples.com/add , user1.examples.com/shoppingCart/Checkout ,...

or

The second way is that I can create different views and controllers and based on the user fill the views withe appropriate content and style.

the number of the pages under different subdomains are the same and even the name. For examples two different users like user1.example.com and user2.example.com both have user1.example.com/shoppingcart and user2.example.com/shoppingcart and so on.

Which way is the right way and is there any other ways to build this website? which one is more seo friendly?

2012-04-04 03:52
by 1AmirJalali


1

I would create a user-themed layout where you can configure the design based on the chosen store.

You could make a route that basically takes the store name as an "id" and then load the design settings from the database.

Replicating views for each store sounds painful and unnecessary, plus a maintenance nightmare.

2012-04-04 03:57
by bevacqua
im doing the same. i wanna create only one page and fill the content from the database and then use url rewriting to fix the url or i can also make some pages and controllers and based on the user again fill the pages with appropriate style and content from the database. my problem is that i dont know which way is the best way using url rewiring or not - 1AmirJalali 2012-04-04 04:02
Ads