Multiple sites on one domain in Azure (Web apps)

Evine Beursken asked on February 14, 2017 10:47

We have one server with one domain, but we would like to add a subsite. In Portal.azure.com you can configure the 'Virtual applications and directories' under 'Application settings'. In general, we have a domain (for example: demo.com) and we want a subsite demo.com/campagne1. There we have for the root:

Virtual path:/  
Physical path relative to root:  site\wwwroot
Application: yes

And for the subsite:

Virtual path:/campagne1
Physical path relative to root:  site\wwwroot
Application: yes

According to Azure, one virtual path needs to be the root, so virtual path: /

However, the problem is that due to the folder structure of Kentico, no physical path exists for my campagne website.

An important note is that we have only one instance of Kentico!

Any idea how to configure Kentico/Azure to make it happen?

Thanks in advance!

Correct Answer

Trevor Fayas answered on February 14, 2017 15:12

I think the one instance of Kentico means they only have 1 license, so they are trying to utilize Kentico's 1 domain to host multiple sites.

You have two options:

  1. If you want the new site to exist purely as it's own Kentico instance, same domain as the other kentico site, you may need to generate another SQL database, make the subfolder and copy the entire CMS folder into there and create another site (similar to how the Kentico installer creates a virtual folder on an existing IIS site). The two Kentico sites will technically be 'separate sites' but off of the same license key you have. I'm unsure how this affects licensing however.

  2. The better option is simply to not create another Kentico site, and just have a folder on your main kentico site, set it's own master template on that folder, and build your site there. We have a couple instances of school districts where they have 1 kentico site, but dozens of school folders under it that each have their own master template and their own design (although similar). This way you don't need to worry about virtual directories, and you can create URLs that will point the person to your site/campagne1.

See http://www.ecasd.us/District/Home, http://www.ecasd.us/Prairie-Ridge-Early-Learning/Home, etc, all on the same install with a "District" folder, "Priaire Ridge Early Learing" folder, etc.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Charles Matvchuk answered on February 14, 2017 14:14

Is your subsite going to be in Kentico or another application? Kentico, out of the box handles multiple sites.

0 votesVote for this answer Mark as a Correct answer

Evine Beursken answered on February 14, 2017 15:19

Both (overall site and the subsite) are in Kentico.

I know that it is possible, but to do so you need IIS which is not available when deploying on an Azure server. See this documentation:

Setting up multiple sites on a single domain

We have tried this:

general site 'example' has domainname example.com and subsite 'campagne1' has domainname example.com\campagne1

So my question remains: How to configure a subsite in Kentico on a Azure server on one domain?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 14, 2017 20:55

Within Kentico you can state which relative paths you want Kentico to process and which ones you don't. You can configure this in Settings>URL's and SEO>URL format>Excluded URLs. In that textbox enter the relative URL you want to exclude from Kentico processing.

For instance you can put:

/campagne1;/campagne2;

Then in your folder structure within Kentico add those folders and files. No need to get crazy with Azure settings or other master pages within Kentico.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.