WordPress Domain Mapping explained

While most websites use one domain, it is not uncommon for web developers to get multiple. This is usually done for larger websites with a far-reaching audience, where using a single domain is simply not enough. In such cases, web developers need to connect multiple domains to a single hosting service. And here is when domain mapping becomes important. With it, you can orient your domain so that they navigate your online traffic to the desired host, which makes dealing with website migration a whole lot easier. But, doing so is easier said than done. This is why we will not only cover what WordPress domain mapping is but when and how to use it.

What is WP domain mapping?

By default, WordPress will allow you to create additional network sites. These can either be subdomains or even subfolders, depending on what you use out of them will be. In certain cases, this is more than enough. But, if you would rather use WP multisite to manage distinct websites, you should make a unique domain name for them. Well, WP multisite domain mapping lets you do precisely that. While it is a bit more complicated to implement, it gives you all the benefits of setting up regular sites, with some extra benefits on handling different domains.

A person frustrated while working on a computer.
With a bit of experience, you will see that handling WordPress Domain Mapping is not as difficult as people make it out to be.

When to use WordPress domain mapping?

In practice, there are several situations where you might need to use WP domain mapping. The most common ones are:

  • You are using multiple domains and you want them all to lead back to a single server.
  • You own a single domain name, but the hosting provider is different from the one for your website server.
  • Switching to a new CMS (Content Management System) while trying to maintain links on your current website.

All in all, if for some reason you plan on using a domain name that is not directly connected to your server host, you will have to use WP domain mapping. Only by doing so will you be able to redirect users to the current host while using the desired website address.

How to get started

The easiest way to handle WP domain mapping is through WordPress multisite. As of WordPress 4.5, you don’t have to use exterior plugins in order to handle domain mapping. While this makes doing so a bit more simple, we still advise you to fully familiarize yourself with the whole process before going at it. Also, remember to make a backup of your website before making any major changes. That way, you will be able to revert to the previous state without too much trouble.

External drives used for saving large files.
It is always a good idea to make a backup of your website before implementing any changes.

Setting up WP multisite

The first thing to do is to set up the WP multisite network. To do so you need to install the standard WordPress software. Then you need to head on to the wp-config.php file and add the necessary code snippet. Doing so will enable your WordPress multisite. After that, you simply need to follow the interface instructions in order to set up the network. Once you do that, you will get two code snippets. One is for your .htaccess file, and the other is for the wp-config.php file. Once you are done setting up WP multisite, opt for subdomains. We recommend doing so simply because it makes handling domain mapping easier.

Adding a new site with Network Admin

With your WP multisite functioning, it’s time to add a new site to your network. To do so, simply go to the Network Admin interface and use the Sites -> Add New option. After adding the site, feel free to chose any subdomain or subfolder as you see fit, as we will change it soon. After you click on Add Site, head on to the Sites and click on the Edit button for the site in question. Here you can ether the external domain that you are going to map. By clicking on Save Changes, your website will now assume that the network site is located in the external domain.

A list showing you home to pick a domain name before handling WordPress Domain Mapping.
Think carefully before picking a domain name.

Using the external domain as an alias for the host

Now you need to open the DNS records of your network site and add the external domain to it. There are multiple ways in which you can do this, which is why we will focus on the one that we deem easiest, which is through cPanel. Once you install cPanel, you need to find the Parked Domain or Aliases option (depending on the version on cPanel that you are using). Once you find it, enter the external domain and click Add Domain. In the Redirects To bracket choose the Manage Redirection option. Here you need to opt for Disable Redirection.

Orienting nameservers to your host

The final thing to do is to orient your nameservers to your host. More precisely, you want your external domain to point to the same nameserver as your WP multisite (this is usually where your WordPress is installed). This process is mostly dependant on where and how you’ve registered your external domain. Again, for simplicity, we are going to assume that you used GoDaddy, as it is the most common option. To change nameservers here you’ll need to:

  • Sign in to your GoDaddy account.
  • Head on to the Domain Settings page and select your domain.
  • Choose the Manage DNS under Additional Settings.
  • Choose Change in Nameservers settings.
  • Pick the “Connect my domain to the website I’ve built” option, as it is the most straightforward one.
    • If this doesn’t work, use the “Enter my own nameservers option”. It is a bit more complicated, but it gives you more control.
  • Select either Connect or Save.
  • Agree to “Yes, I consent to update Nameservers for the selected domain(s)”.

For all of this to take effect, you need to wait 48 hours. Expect that your website may malfunction or completely shut down during this time, as it is a relatively large task. If you think that there are performance issues after 48 hours, perform a security audit to ensure that there were no unauthorized changes to your website.

 

 

404 error404 pageabove the foldadvanced cssAIDA modelakismet pluginbacklinks auditbehavior patternbounce ratebrowser compatibilitybulk deletecaching pluginscall-to-actionchild themecode snippetcolor schemecomment sectioncompetitors' backlinkscontact formconversion ratecreate child themeCTA buttoncustom pagecustom themedead linksdefault configurationdigital marketingdomain authorityeasy manageedit main pageediting toolsemail marketingengaging contentFAQ pluginsfilter spamfix site errorfolder structurefree pluginsfriendly toneGoogle analyticsgoogle rankingsGravity Forms pluginguest postingHeadless WordPressHow toimage optimizationincrease readabilityindex errorsinfluencer marketingkeyword researchlibrary assistantlink managementlink trackingloading speedlocal businesseslong-tail keywordsmedia replacemedia restrictionmobile optimizationmoney onlinemulti currency pluginsmysql queryonline presenceonline validatorpage builderpage creationpopup pluginproducts and servicesquality imagesquality serviceReact JSreaction buttonsredirect chainsresponsive designschema markupsearch rankingsearch termsSEO for bloggersSEO optimizationSEO professionalsSEO tipsSEO toolsshort linkssocial mediasocial media plugins for WordPressssh commandsstatic pagetargeted audiencetechnical performancetest metrictext formattheme setting uptime utilizationtips and trickstraffic increaseunique visitorsuser accessuser engagementuser experiencevisual designvisual elementsvisual reportweb crawlersweb hostingwebsite architecturewebsite auditwebsite designwebsite elementswebsite maintenancewebsite optimizationWebsite problemswebsite securitywebsite structureWhat’s new in WordPresswhite spacewoocommercewordpressWordPress admin email verification noticeWordPress debug modeWordPress functionalityWordPress pluginWordPress pluginsWordPress recovery modeWordPress responsive designwordpress securitywordpress themewordpress theme editwordpress tipsWordPress tips and tricksWordPress web hostingwp security

Newsletter