Route based subdomain in Orhcard cms

Topics: Administration, Customizing Orchard
Nov 7, 2014 at 3:45 AM
Hi all

Is it possible to make an orhchardcms route, based on a subdomain?

In orchard cms site i'd like to create online stores for users. Any store that is created by user should have a URL like "".

I tried some routing work but failed at all. I am researching for a solution but cannot find any proper solution.

My purpose is that; if I can add a route to manage any request that tries to find a subdomain I will check if it is a user online shop name and get the dynamic data on play.

Need routing help :) Thanks.
Nov 7, 2014 at 4:23 AM
I'm not sure that you can. But even if you could, I don't think that is how you should do it.
You should either create a tenant per shop (tenants can be associated per domain), or have your controller inspect the requested domain, and serve the appropriate shop. For that I imagine you would have a list of store records in your database, each store associated with a (sub)domain.