This project is read-only.

Multi-domain (NOT multi-tenancy)

Topics: Customizing Orchard, Writing modules
Feb 21, 2011 at 3:01 AM

I'm interested in hosting my company's site on Orchard (on Azure, but shouldn't matter...)

We have multiple domain names, one for each brand. Each domain name will consist of a web site with about 90% of the same content -- the product is different but the About Us, etc. remains constant. However, the home pages would be different on each domain, and then those home pages would link to various other separate site pages.
The theme on each site would also be like 99% the same, with the only difference being the logo displayed.

Is this something that Orchard can handle out of the box, perhaps with some clever routing or URL rewriting? If not, I'd love to contribute a module if someone could give me some pointers. I work in ASP.NET MVC 3 daily so hopefully there shouldn't be too much of a learning curve.


Feb 21, 2011 at 2:13 PM

Such a module would be really cool! As for now you can achieve that by using multi-tenancy and putting the absoulte urls in the menu (via Navigation panel in the Dashboard).

There are several things you could use to build such a module:

  • Filtering the data depending on the domain name by creating a filter - implementing both Orchard.Mvc.Filter.FilterProvider and IActionFilter (and possibly other ASP.NET MVC filters if you wish)
  • Marking the content items with the domain(s) name(s) to which this item applies. This would involve creating your own content part for persisting such info for an item.
  • Overriding the default content display builder to allow filtering items by domain name. You could do this by creating custom implementation of Orchard.ContentManagement.IContentDisplay ( the current, default one is Orchard.ContentManagement.DefaultContentDisplay. The filtering logic can be handled inside BuildDisplay method
  • Overriding the default content display manager (which calls the builder mentioned above) to allow filtering items by domain name. You could do this by overriding Orchard.ContentManagement.DefaultContentDisplay.BuildDisplay method to include filtering.

There are many more approaches to solve this problem... I wonder which one the Team would advise to use as best-practice?



Feb 22, 2011 at 4:48 PM

I've been using the Cuyahoga Framework for instances where I need this kind of functionality. It's rare to find an CMS that supports it but I'd love to see it. Unfortunately, I really can't commit to any development work around this feature. Exciting!

Oct 26, 2011 at 11:53 AM

Funny, today I got a proposal for several sites (for a motor vehicle dealer with several brands) most likely I'll be requiring such a feature in the near future.

davidpmg, could you please post back once you have chosen a solution?

Nov 11, 2014 at 11:21 AM

I just wondered if anyone did anything for this? It seems easy to add multiple urls for a tenant in SiteSettings2PartRecord. Not sure where to go from there though.