Connect with us

Tips and Guides

A Complete Guide To WordPress Multisite Domain Mapping

Published

on

A Complete Guide To WordPress Multisite Domain Mapping

WordPress makes it easy to host multiple websites with a single hosting package, thanks to multisite. The main downside of multisite is that it defaults to using subdomains or subdirectories, which don’t make for user-friendly URLs.

You can fix that using domain mapping. WordPress multisite networks enable you to map a custom domain to each network subsite. To do this, you’ll need to tinker with the network setup, which is actually more straightforward than it might sound.

In this article, we’ll explain what WordPress multisite domain mapping is and how it works. Then, we’ll show you how to use domain mapping with multisite. Let’s get to it!

An Introduction to WordPress Multisite

Multisite is a WordPress feature and a type of setup. With it, you can create multiple WordPress websites as part of a connected network.

What’s more, multisite enables you to set up as many websites as you need using subdomains or subdirectories. You get access to a central WordPress admin dashboard that lets you manage the entire network, as well as individual dashboards for each of your network websites:

Advertisement
The WordPress dashboard for managing your main network site.

To put this into practical terms, you can pay for a single hosting account that supports multisite, and use it to set up multiple projects. Each site in the network will have its own address, such as:

  • website1.yourdomain.com
  • yourdomain.com/website1

Typically, you’ll map a primary domain to the multisite network and use subdomains or subdirectories for each site (you can choose either option). However, you can also map individual domains to each subsite.

Mapping a domain to a network subsite can be a smart move if you don’t want users to know they’re part of a larger network. For example, if you offer web development services and host client websites on a multisite network, they’ll probably want to use custom domains.

The same applies if you’re working on WordPress projects that have nothing to do with each other. Setting up individual domains for each of them looks more professional, and it works even if every site is hosted on the same server.

What Is Domain Mapping?

Now that you know the basics of WordPress multisite, let’s talk about domain mapping and domain registration.

When you register a domain name, it will have to be assigned to a main site. This can be done with the domain registrar or hosting provider you used to purchase the address.

It involves configuring the domain’s DNS records to point toward your web host’s nameservers. That process is called domain mapping. In a nutshell, this enables you to map a unique domain to an IP address and record that information in the DNS.

Advertisement

If you’re using WordPress multisite, the Content Management System (CMS) can create subdomains or subdirectories for the main domain. These are mapped automatically, so you don’t need to update the custom domain name.

WordPress multisite domain mapping involves using multiple domains and assigning each to one of the subdomains (or directories). This way, users will be able to access each site through a unique domain, and they won’t know you’re using a WordPress multisite setup.

A Guide to WordPress Multisite Domain Mapping (3 Steps)

To follow this WordPress multisite domain mapping tutorial, you’ll need to have one or multiple domain names available.

You can register one or multiple domains using SirsteveHQ. You can even use the free domain search tool to find the perfect custom domain.

If you do, you’ll be able to skip part of this domain mapping tutorial, since the custom domains will already point to the right nameservers.

Advertisement

Step 1: Create and Configure Your WordPress Multisite Installation

There are two ways to install WordPress multisite. The first is to use a hosting service that gives you the option to choose a multisite setup when you install WordPress. The second is to enable multisite manually, which is something we only recommend with a new WordPress installation.

To do the latter, you’ll need to edit your site’s wp-config.php file. This is one of the WordPress core files. That means it includes critical information for the CMS. In fact, the entire system won’t work without it.

To access the wp-config.php file, connect to the main WordPress multisite network via a File Transfer Protocol (FTP) client like FileZilla. Once your site is connected, you’ll need to access the maindirectory, which should be called rootwwwpublic_html, or your site’s name.

Inside the folder, you’ll find the wp-config.php file. Right-click on it and look for an option that says Edit (how this appears can vary depending on the FTP client you use):

Accessing the WordPress multisite network root directory using an FTP client.

This enables you to edit the wp-config.php file using a text editor. Look for the line that reads “That’s all, stop editing! Happy publishing”, and paste the following code before it:

define(‘WP_ALLOW_MULTISITE’, true);

As the code suggests, this command allows you to use a multisite network.

Advertisement

Next, add a second line of code below that first one. This code snippet enables WordPress domain mapping with multisite, which is critical for the next steps.

define(‘COOKIE_DOMAIN’, $_SERVER[‘HTTP_HOST’] );

That code will make it so you can log into different sites within the multisite network, even if they have custom domain names. Without this code, the login pages for each site won’t work, which means you’ll need to access them through the multisite network admin dashboard.

Finally, save your changes to the file and close it. The FTP client will upload the updated version and the changes will go live.

Now, go ahead and access the WordPress dashboard using the login screen, just as you would with any other installation. You’ll notice that the dashboard looks different. That’s because you’re seeing the WordPress multisite network admin screen.

Step 2: Edit the Subsite’s Custom Domain

This admin dashboard enables you to configure settings for every site that’s part of the WordPress multisite network. You can also jump to different sites in the network (or add new ones) using the Sites > All Sites option:

Advertisement
The multisite network admin dashboard, where you can manage multiple sites.

To change a site’s domain, hover over it and select Edit. This will open a new page where you can change the site’s URL:

Editing the site address for a subsite in a WordPress multisite network.

Note that you’ll need to repeat this process for every site in the WordPress multisite network that you want to use a custom domain for. This should only take a few minutes, though.

Also note that this will only work if the domain you use is already pointing to your hosting provider’s nameservers. If you’re using a different registrar, you’ll need to update the DNS records manually.

If the custom domain’s DNS records aren’t up to date, you won’t be able to access any of the sites in the network with their new addresses. Let’s see how that process works.

Step 3: Point the Domains to Your Web Host Nameservers

This process will vary depending on which hosting provider or registrar you’re using. To get started, simply log in to your domain registrar account and select the domain you want to map. Then open its DNS settings:

Configuring custom domain DNS records through the domain registrar.

You should see an option here to set up an A record. This is a record in the DNS that maps a domain to an IP address:

WordPress multisite domain mapping on the back end of a registrar.

What IP address you map the domain to will depend on your hosting provider. You’ll need to find its nameserver information, which should be available through your hosting control panel.

If you use SirsteveHQ for hosting, you’ll get the nameserver information in the welcome email we send you. Any domains you register through SirsteveHQ will automatically point to these nameservers, which means you can skip this step.

Note that DNS records can take a while to update. If the custom domains don’t start working immediately, give the process a few hours before trying to use them again.

Advertisement

Conclusion

WordPress multisite domain mapping is not a complex process. You can use a single web hosting account to power an entire multisite network. If the network requires more resources, you can always upgrade your plan, so that all sites continue to offer a great user experience.

If you’d like every site in your multisite installation to have its own custom domain, you’ll need to map a URL to each one. Here’s what you’ll need to do:

  1. Create and configure WordPress multisite installation.
  2. Edit the subsite’s custom domain.
  3. Point the domains to your web host nameservers.

Do you have any questions about WordPress multisite domain mapping? Let’s talk about them in the comments section below!

Stephen Oduntan is the founder and CEO of SirsteveHQ, one of the fastest growing independent web hosts in Nigeria. Stephen has been working online since 2010 and has over a decade experience in Internet Entrepreneurship.

Continue Reading
Advertisement
Comments

Trending

Copyright © 2024 SirsteveHQ. All Rights Reserved.