Multisite example - Minisite using URL prefix and domain

This page provides two examples of how to create minisites:

  • Using a shortened URL to use within an existing domain.

  • Using a sub-domain.

Since version 3.0.0 of the Multisite module, site definitions are no longer configured in the config folder of this module, but in the sites subfolder of any module.

You can configure a site in a YAML definition (preferred) or directly in the JCR Configuration app.

Use case

We have content for a minisite that resides deep in the site hierarchy at /comics/belgian-comics/morris/lucky-luke/jolly-jumper. This page node and its subpages should be served as a minisite.

Assume that there is already a site named comics-site, mapped to the domain, mapped to the content /comics. This means requesting the domain with no further paths returns the rendered page of the node /comics. (See Multisite example - Two sites with different domains.)

Now we look at two solutions for the jolly-jumper minisite:

Setting up content

The tree below shows the page nodes.

Page nodes

In the following examples we look at the page node /comics/belgian-comics/morris/lucky-luke/jolly-jumper and its subpages.

Shortening the URL with handlePrefix within an existing site definition

Keep in mind that this example assumes that the site definition comics-site already exists. Have a look at the site definition setup in Multisite example - Two sites with different domains.

This is the existing comics-site site definition with an additional node under mappings:

Additional nodes under mappings

To get a short URL, we add another node under <site>/mappings. In this example, we add the node /comics-site/mappings/jolly-jumper.

jolly-jumper The mapping node name is arbitrary.


Enables you to access the content at <domain>/jollyjumper


Maps the content node.


Indicates the JCR workspace of the mapped content.

Now test it: It works!

Jolly Jumper image

Using a new subdomain with a distinct site

In this solution you enable access to the jolly-jumper minisite using the subdomain

To do this, you configure a new site definition:

New site definition

Note that using a distinct site for the minisite means that you can also apply another theme to it. In this example, the jolly-jumper-site uses the jolly-jumper-theme. The jolly-jumper-theme has a CSS that applies a different font (compared to the the comics-theme on the comics-site).

Extending the existing comic site:

If the new jolly-jumper-site should reuse items defined on the comics-site - for instance i18n and templates - you can define the jolly-jumper-site in a way that it extends the comic-site:

Extending the existing comic site

Configuring the environment

To enable accessing the Magnolia instance with the new subdomain - you must configure your environment accordingly, see mapping multiple domains to the application server.

<VirtualHost *:80>
    ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/

<VirtualHost *:80>
    ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/

<VirtualHost *:80>
    ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/


Now try to access It works!

Jolly Jumper accessed via subdomain


DX Core



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
6.3 beta

Magnolia 6.3 beta

Magnolia 6.3 is in beta. We are updating docs based on development and feedback. Consider the 6.3 docs currently in a state of progress and not final.

We are working on some 6.3-beta known issues during this phase.