Sitecore provides Multisite Architecture in which single installation of Sitecore can create multiple websites and publish them in the same Sitecore instance. This way it becomes accessible to hosts all an organizations website in a Single Sitecore Instance. In this blog, I am describing how we can quickly setup multisite in Sitecore with the single Sitecore instance.

The benefits of using single Sitecore installation with multisite architecture includes:

1. Single set of user access credentials for access to all sites: Single Sitecore instance lets you use the same set of Sitecore managed users to access all your sites.

2. Easier to share content between sites: With single Sitecore instance, all content is directly accessible and addressable through Sitecore. It provides ability to share common data like templates, master pages, content items as data sources in renderings across sites.

If Sitecore instances are separated, then content on the other instance is treated more as content on any external sites, and in that case, we would need to use RSS feeds, Web API or any Data Providers to provide content sharing between websites.

3. Easier tracking of visitors: All websites exists in a Sitecore instance share a single xDB database, so it becomes easy to capture web analytics information and get consolidated view across the different websites.

Some key configuration points of multisite setup in Sitecore:

  • Multiple websites are hosted in a single Sitecore installation, each site will be having its on properties and sharing common data like templates, master pages, items etc. The properties of each site are stored in the Sitecore configuration files.
  • Each site in the Sitecore multisite structure runs with its own context created inside SiteDefinition.config file placed under “~WebsiteApp_ConfigInclude” folder. The context is defined for each site by adding a in the congif file having the site definition.
  • Sitecore determines the site context based on the URL, hostname and the physical folder name specified in the site definition. For Ex. If two different sites are created in the content tree as below:

  • Website 1:hostName=” website1.hostname.com”virtualFolder=”/”physicalFolder=”/”rootPath=”/sitecore/content/Website1″startItem=”/home”database=”web”

    domain=”extranet”

    allowDebug=”true”

    cacheHtml=”true”

    htmlCacheSize=”50MB”

    enablePreview=”true”

    enableWebEdit=”true”

    enableDebugger=”true”

    disableClientData=”false”/>

    Website 2:

    hostName=” website2.hostname.com”

    virtualFolder=”/”

    physicalFolder=”/”

    rootPath=”/sitecore/content/Website2″

    startItem=”/home”

    database=”web”

    domain=”extranet”

    allowDebug=”true”

    cacheHtml=”true”

    htmlCacheSize=”50MB”

    enablePreview=”true”

    enableWebEdit=”true”

    enableDebugger=”true”

    disableClientData=”false”/>

  • Binding with each hostname is then needs to be done in IIS as below:

  • Below host entries are required to be added in the hosts file placed under “C:WindowsSystem32Driversetc”

1. 127.0.0.1 website1.hostname.com

2. 127.0.0.1 website1.hostname.com

Now you can browse the websites using website1.hostname.com & website2.hostname.com.

You can create more websites in the content tree and can add the site definition and host entries for them in IIS and host the file using the above steps.

Posted by Advaiya

    Let's connect to make technology work for you.





    Please tick the options most relevant to your business challenges
    Decision makingBusiness productivityCustomer experienceTechnology-led innovationDigital transformation


    [By using this form you agree with the storage and handling of your data by this website.]