0

I am using umbraco 7.1.3.

My requirement is to create another sub-domain in main site dynamically as per user request.For example I have implemented umbraco cms for my site "ww.xyz.com" & I am updating content through umbraco login. Now I want to create sub-domains for different clients as per their request... like : "www.xyz.com/client1", "www.xyz.com/client2" and so on...

Now all sub-domain site should have it's own umbraco framework, so client-site (sub-domain owner) can login and update their information respectively.

To achieve this requirement I implemented following steps...

  1. First I register a umbraco website in IIS and configure it, and that worked properly.
  2. Then I register another umbraco website in IIS and configured it, and that also worked properly. Now to implement sub-domain logic...
  3. I simply copied 2nd website's folder in to first website folder. Then convert that folder to application through IIS.

As per my expectation this should work, As I have already done the same in asp.net and it worked.

But with umbraco I am facing issue like "Invalid key value".

I think the issue is related to some umbraco configuration, but I am not able to figure it out.

Thanks & Regards

  • Are you saying that you are creating separate umbraco instances ie a separate set of files for each sub domain that all point to the same umbraco database? – wingyip Oct 11 '14 at 07:43
  • No, main site points to different database and there will be new database for each new umbraco sub-domain – Bharatkumar Leel Oct 13 '14 at 08:57
  • Is there a reason you need to separate these sites out to separate installations this way? You can host multiple websites within the same umbraco installation, so you can have each sub domain as a top level site and you get lots of advantages - shared templates, shared content, shared media library etc – Carl Sargunar Oct 15 '14 at 22:23
  • Thanks Carl for your response, But my requirement is bit different. As I mentioned earlier that each sub-domain site will have it's own umbraco framework for main site as well as other sub-domain site. All sites including main and each sub-domain will point to different database. We don't want to share templates and content. Yes, I know for that we can create new website for each new sub-domain but that will require to use new ports each time. So avoiding this situation I want to create new sub-domain instead of new IIS web-site. – Bharatkumar Leel Oct 17 '14 at 08:19
  • So your file structure looks like this now? `/umbracoSite1/umbracoSite2`? I haven't tried anything like this, but in the web.config, there is an appSetting you can use to possibly move you forward. `umbracoReservedPaths`. If you add `umbracoSite2` to the list of umbracoReservedPaths, umbraco will hopefully stop treating your `umbracoSite2` like a node in the `umbracoSite1` site. – bowserm Jan 05 '16 at 21:08
  • Nop, main site hosted in IIS is itself a Umbraco site let's say it's UmbracoRoot site (eg: www.umbraco-root.com). Root site is for country level, Now I want to create sub-sites for states level (eg: www.state1.umbraco-root.com OR www.umbraco-root.com/state1). It only works when 1) Root site is non-umbraco and all sub sites are umbraco. 2) Root site is umbraco and sub sites are non-umbraco. But what I am trying to achieve is both root and sub-site are umbraco. – Bharatkumar Leel Jan 19 '16 at 08:00
  • Hi Bharat, I think you will get into technical difficulty following this course. I have not come across an implementation like that. I also don't think there is any mileage having totally separate Umbraco instances nested within each other and the routing will become more tricky. If you want separate Umbraco instances with separate DBs that fine. Implement them separately. How the domains are displayed (in terms of domains and subdomains) need not have a impact on that. Any common logic you create in one site could be exposed by an Umbraco API. – Darren Street Feb 09 '18 at 09:25
  • However there are benefits to having multiple sites hosted by one Umbraco instance, especially when hosting multi-language sites. All the sites need not share any of the data/styling and would for all to see totally separate. – Darren Street Feb 09 '18 at 09:26
  • @DarrenStreet, Yeh you got it correctly. we have created common web-application for country/states/districts. There will be one few config values which will identify whether this application should behave like country/states/districts clubs. – Bharatkumar Leel Feb 21 '18 at 14:40
  • Basically all sites will point to one master database using same connection string for web-application, but yes as per their different umbraco sites, each site will have different umbraco database. – Bharatkumar Leel Feb 21 '18 at 14:41
  • Here I am trying to achieve www.countryclub.com, then www.state1.countryclub.com, www.district1.state1.countryclub.com same for another state like www.state2.countryclub.com & www.district1.state2.countryclub.com this all sites needs to be hosted under same domain countryclub.com, each sub-domain is separate umbraco site which has individual umbraco database. – Bharatkumar Leel Feb 21 '18 at 14:45
  • Is this achievable? – Bharatkumar Leel Feb 21 '18 at 14:45
  • Have you considered having each site separate and using a reverse proxy to configure the urls on the domain? https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/ – Will Jul 18 '19 at 20:39

1 Answers1

0

A bit of an open door, but since I don't see it mentioned in any of the comments and it's a bit hidden away in Umbraco 8. Have you tried setting the urls in the Cultures and Hostnames section?

enter image description here

Note: you get to this by going to "Content", in the content tree right click on your homepage and now you get several extra options which are normally hidden away with also the very useful Hostname and Cultures option which allows you to support multiple urls.

סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68
Patrick
  • 71
  • 1
  • 4