How to Map Domain to WordPress Website – Easy Guide
Do you want to map multiple domains to your WordPress site? If yes, this guide is for you.
There are a couple of scenarios where having multiple domains in WordPress can be useful.
For instance, you may need to redirect your users to your new domain after rebranding your online business. Another reason may be that you want to have a unique domain for a landing page you just created.
Domain mapping saves you from the traditional method that requires installing WordPress on every domain you want to add to your site.
In this guide, we will explain what domain mapping means and why you may want to use it on your website. Then we will show you how to map a domain to WordPress websites.
- What is Domain Mapping?
- Why Map Domain to WordPress?
- How to Map a Domain to WordPress sites
- Multisite Domain Mapping
What is Domain Mapping?
Simply put, domain mapping is a system that lets you connect multiple domain names to a single website. You can have a single WordPress installation, and then map domains to specific pages on your website.
Using this, you do not have to install WordPress each time you want to add a domain name to any page or subdomain on your website.
Why Map Domain to WordPress?
There are a couple of reasons why you may want to map a domain to your WordPress site. Below we will list out some of them.
This is a safety precaution applied by most popular brands as a means to protect their brand identity. For instance, a company whose site is available at mybrand.com may want to protect the name by buying other related extensions such as mybrand.org, mybrand.net, etc.
After buying the domain names, you will need to map the secondary addresses to your main site domain. This protects the site users from phishing attacks and also helps users easily access your content.
WordPress Multisite Network
If you run a multisite network, subsites under the network are usually available as a subdomain (site1.mysite.com) or subdirectory (mysite.com/site1) of the main site.
Domain mapping makes it easy to have unique domain names for each subsite on your multisite network.
For instance, if you plan on using a multisite network to create websites for your clients, you can use domain mapping to ensure your clients’ sites are unique with their separate domain names.
Let’s say you changed your brand identity to a new name and have purchased a domain to that effect. In this case, you would want your users to still be able to access your site through the old address.
To ensure you don’t lose your customers, you may need to redirect all traffic from the old website address to your new domain.
Unique Domains for Landing Pages
Let’s say you run an ecommerce store and intend to promote a specific product using a landing page. After creating the page, you can map the page URL to a separate domain rather than having to install WordPress on the domain you intend to use on your landing page.
How to Map a Domain to WordPress sites
In this section, we will show you how to map a domain to WordPress in 3 simple steps.
Step One – Purchase the Domain Name
Before mapping new domains to your WordPress installation, there are some important criteria that need to be met for it to work.
If you are mapping a new domain, you need to have the domain name ready before you can map to your WordPress site. There are many domain name registrars available such as Namecheap and Godaddy for you to choose from. Go ahead and register the domain name if you do not own it already.
Also, you may intend to use subdomains of your primary domain name. For example, you can point store.mysite.com to just your WooCommerce store page. In this case, you don’t need to purchase anything.
Step Two – DNS Configuration
After buying your domain, you also need to change the nameservers for the new domain so that they point to the server hosting your WordPress site.
The process of setting this may vary depending on your domain name registrar. We have a tutorial on how to configure DNS in Namecheap. If your domain registrar is different, you may have to contact them or consult their knowledge base for guidance.
Meanwhile, here are official guides on how to change the name server of your domain on Godaddy, Domain.com, and Google Domains.
If your web host is the same as the domain name registrar, then you do not have to worry about setting up DNS records. This is because the domains already point to the right nameservers. The same applies if you are using subdomains.
Side note: Changes to your name servers may not take effect immediately. This is because DNS propagation takes up to 1 hour. In some cases, you may have to wait for up to 24 hours for it to propagate properly.
If you have multiple domains, you can repeat the process for all the domains/subdomains you want to map to your WordPress site.
Step Three – Map Domain to WordPress
After pointing the domain to your host, you can then map the domain to WordPress either using the Aliases settings on your web host or using WordPress domain mapping Plugins. We will show you how to configure both.
Using Domain Alias on cPanel
This is useful if you are rebranding your website or you have multiple domains and you want to map them to your main site address.
You can use the “Aliases” setting on your WordPress hosting dashboard to redirect traffic from the secondary domains to your primary domain.
For this, login to cPanel and then navigate to the “Domains” section. Once here, click on Aliases. Depending on your hosting provider, this can also be called Domain Alias, Domain Mapping, Multiple Domain, etc.
Under “Create a New Alias”, enter the domain name you wish to add. You can use any new domain you registered and pointed to your web host, or enter a subdomain of your site (such as store.mysite.com. Next click on the Add Domain button.
You should get a success message similar to the one in the image below. Most hosting providers will include 1-year free SSL certificate after you add them to your host. You can click on the Verify HTTPS redirect settings link to check your status.
To configure the redirection, click on the Manage Redirection link.
Next, enter your WordPress sites’ address on the text box and then click on the Save button.
You should get a success message like the one below.
Now, when you type the domain name on your browser, it will redirect you to your WordPress blog. If you have multiple domains, you can follow the same procedure highlighted above to map your domain to WordPress via Alias redirection.
Side note: If you wanted to map a domain to a specific landing page, in the redirection box, input the URL of that landing page instead.
Using WordPress Plugins
WordPress plugins let you extend the functionality of your traditional WordPress installation. Like you would guess, there are plugins that also handle domain mapping in WordPress.
In this guide, however, we will use the Multiple Domain Mapping on Single Site plugin. The plugin is easy to configure and use. With it, you can map unlimited domains to any page or post type on your WordPress site.
You only need to ensure your domain is pointing to your host nameserver for this to work (as we showed above).
After that, you need to install and activate the plugin on your WordPress website. Please check this guide to learn how to install WordPress plugins.
Once the installation is complete, go to Tools >> Multidomain from your WordPress dashboard.
On the “Mapping” tab, enter the domain name you wish to add to your site. Then select the page or category to which you want to map the domain.
Once done, click on the Save Mappings button. The plugin will automatically create a new line where you can add another domain to your WordPress site.
After mapping the domains, your users can now access the page you specified using the unique domain name you added.
Note: If your web server uses Nginx, you need to update the plugin’s settings to reflect that. For this, click on the Settings tab. Under the “PHP Server-Variable” settings, select the recommended option for Nginx server as seen below.
After updating the settings, click on Save Settings to complete your changes.
Bonus: WordPress Multisite Domain Mapping
WordPress multisite is a feature that lets you create unlimited websites on a single WordPress installation. Each subsite is independent of the other and can be managed from its separate dashboard.
However, there is a super admin or network admin that can access all the sites on the network.
When you create a multisite network, each subsite will be available as a subdomain or subdirectory of your main site address.
WordPress has a built-in feature that lets you have a unique domain name for each subsite on the network. Configuring this is pretty straightforward.
Kindly refer to our complete guide on how to set up a multisite network in WordPress. There we also explain in detail domain mapping for multisite networks.
WordPress continues to maintain its position as the best and most popular CMS due to its ease of use and the numerous options it presents when it comes to managing your content.
WordPress domain mapping saves your server resources because you do not have to install WordPress on every new domain you add to your site.
We have shown 2 ways you can use to map a domain to WordPress in this guide. Using the Aliases feature on your web hosting account is straightforward and can be used to set redirects to any page or subdomain of your website.
The plugin method is also beginner-friendly and works similar to the Aliases option. Essentially it configures your server and sets redirection to the page you mapped to your domain when configuring the domain mapping plugin.
If you are having issues with domain mapping on your website, you can reach out to Fixrunner Support and let our experts handle it for you. Meanwhile, also check this post to learn how DNS works for beginners.