How to use Multisite

This page and its subpages explain how to use the Multisite module to set up and run multiple websites from one Magnolia installation.

We present a few typical use cases for a multisite setup and the corresponding configuration required. Full working examples of certain use cases are in the subpages. We assume that you already know some basics about a Magnolia site definition.

Site limitation

In DX Core, the number of sites that can be used is defined by the number of sites purchased.

In the Community Edition, you can only create and use one site.

Overview

Typical use cases

Using multisite makes sense in the following scenarios:

How multisite works

In the Multisite module, you configure two important elements:

  • Site definitions

    When developing your multisite project, you configure your own site definitions. Every site definition can have its own theme and template prototype. A site definition contains a domain mapping and mapping to a node in a repository (URI2RepositoryMapping).

    For configuration details, see Multisite definition configuration.

    The Multisite module is delivered with one default site definition called fallback, for details see the Fallback site page.
  • Site resolution rules

    The site resolution rules ensure that Magnolia can properly assign a site for a given request. The Multisite module comes with a standard set of site resolution rules. The standard rules usually are sufficient. We strongly recommend you be careful if you choose to change these rules.

    When a request is sent to Magnolia, info.magnolia.multisite.filters.MultiSiteFilter analyzes the request to determine which site definition it fits. Once the site has been determined, it is set to info.magnolia.cms.core.AggregationState from where it can be read during further request processing.

    For configuration details, see Site resolution rules.

Setting up multisite - main steps

The following bullet points summarize what you need to do to set up a multisite environment with one Magnolia installation:

  • Create trees or subtrees of JCR nodes (usually pages) with different purposes.

  • Configure site definitions. For each one, define:

    • A mapping pointing to the tree or subtree of JCR nodes (usually pages).

    • A domain mapping to map a domain to the site.

  • Access the distinct content (sub)trees via distinct domains.

When the Multisite module is enabled, you must configure at least one site definition including a proper domain mapping. If you do not do so, pages are not served correctly on the public instance.

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules