Skip to main content

Multisite Domain Mapping and Configuration

Updated today

A multisite can have either subdirectory or a subdomain structure.

Subdirectories:

  • example.com/subsite

  • example.com/anothersubsite

Subdomains:

  • subdomain.example.com

  • anothersubdomain.example.com

Multisite With Subdirectories

If a multisite installation uses subdirectories, each of the subsites can be mapped with its own domain. Remember to define this domain in the Siteurl and Home fields in the individual subsite settings.

If the subsites already have content and links, the address structure must be updated in the sites' database with search-replace command. You can use Seravo Plugin's features to run this command.

Multisite With Subdomains

If a multisite uses subdomains, it can also be configured ("mapped") to use separate domains for the subsites. This is possible with an additional plugin called Mercator. However, you don't need to install it yourself – Seravo will configure it for you when converting your WordPress into a Network. Once Mercator has been activated, All sites -tab will show a new column, Aliases.

In the picture below, in the leftmost column, URL must always show the actual subdomains however, in order for the site cookies to function properly.

Also the subsite's Site Address (URL) setting must always show the subdomain.

The separate domain must be defined as an Alias, and must of course be marked as active. Do note that while several aliases can be added, it is recommeneded to have only one active alias. If the intention is to direct several additional domains to a multisite subsite, it is recommended to use an nginx redirect instead.

Once a domain has been defined as an Alias for a subsite, it must also be configured as the subsite's Siteurl and Home (see the Settings-tab).

How Do I Publish a Multisite?

Publishing a multisite differs from the publishing of a normal site in certain ways. Unlike the standard process, it is advisable to change the addresses in the multisite database manually in advance using search-replace. In addition to this, the address must also be changed in the wp-config.php file, which is located on the server at the path /data/wordpress/htdocs/.

This file contains a number of multisite-related definitions, one of which is the site's primary address. The line you want to edit is the following:

define( 'DOMAIN_CURRENT_SITE', 'example.fi-c.seravo.com' );

Change the development address to the final primary domain for the site and save the changes. After these changes, the site will no longer be accessible via the browser until the primary domain has been pointed to our server and the DNS has had time to update. Despite this, it is still recommended to point the DNS after making the changes, as this allows our publishing automation to automatically generate the certificate and keeps the downtime associated with publication as small as possible.

If the domain starts point to our server before the addresses are changed in the database and the wp-config.php file, it will lead to the site being non-functional until both changes have been made.

I Wish to Make My WordPress a Multisite!

If you want to turn your site into a WordPress Network so that you can create a multisite, please contact Seravo's customer support.

Non-multisite WordPress

Are you looking for the instructions for how to configure a domain in a normal WordPress installation? See our instructions.

Did this answer your question?