Offer Your Multisite Users Unique Domains With Domain Mapping
Domain mapping provides a simple way to point multiple domains to your primary hosting account. And for Multisite admins, it’s also useful in that it allows you to map any domain to your network, giving you the option to offer domains to your users.
Mapping domains can seem complex and fiddly if you’re unfamiliar with cPanel and messing around with IP addesses, but it’s actually a straightforward process and doesn’t take long at all.
In this tutorial, I’ll show you how to use the Domain Mapping plugin to map a domain to your Multisite network, so http://network.com/awesome becomes http://www.awesome.com
Getting Starting With Domain Mapping
For this tutorial, I’m going to point a domain I have set up with my web host to another site. To do this, I need to point my domain to a dedicated IP address.
Before we get started there are a few things you need:
- A dedicated IP address. Domains need to be mapped onto a single IP. If you use shared hosting with a dynamic IP address, your IP address will change regularly, meaning there is no single IP address for your domain to be mapped to. Get in touch with your web host to add a dedicated IP address to your account.
- Access to cPanel
- A domain to map and access to its settings
- The Domain Mapping plugin
- A WordPress Multisite installation
Step 1. Set Up Your Domain
Login to your domain registrar and find the area that lets you update your domain settings. Most web hosts will call this “DNS Manager.”
There you will find a record under A (Host) or A Records (depending on your host) with @ pointing to an IP address. We want to change this IP address. Click edit and insert your dedicated IP address.
Step 2. Park Domain
As my Multisite network is on shared hosting, the next step is to park the domain.
To do this, login to cPanel and scroll down to “Parked Domains.”
Click “Parked Domains” and insert the domain you want to park.
Step 3. Add New Multisite Site
Login to your Multisite network and add a new site.
Give your new site a name, title and add your email address, then click “Add Site.”
1.6 million WordPress Superheroes read and trust our blog. Join them and get daily posts delivered to your inbox - free!
Step 4. Install Domain Mapping Plugin
Download Domain Mapping.
Next, login to your site using via FTP. We’ll be installing the plugin and moving one of the plugin’s file to another location.
- Unzip the Domain Mapping plugin and copy it to the public_html/wp-content folder
- Copy the sunrise.php file to the /wp-content folder.
- Copy wp-config.php from the root folder of your WordPress installation to your desktop and open it in your favorite text editor and add the following line just before the line /* That’s all, stop editing! Happy blogging. */
define( 'SUNRISE', 'on' );
Save the wp-config.php file and copy it back to the root folder.
Step 5. Configure Domain Mapping
Go back to your Multisite dashboard go to Network Admin > Plugins and network activate Domain Mapping.
Next, go to Settings > Domain Mapping.
In the “Mapping options” tab, enter your dedicated IP address in the “Server IP Address” section.
Step 6. Map Domain
Go to the dashboard for the new site you created for your work earlier.
Then go to Tools > Domain Mapping.
Add the domain you want to map.
Click “Map Domain.”
7. Check Your Site is Working
Open up a new browser window and check the site you mapped is working.
That’s all you need to do to set up a mapped domain on your network.
In addition to mapping domains, you can integrate Domain Mapping with our Pro Sites plugin to offer your users domain mapping as a paid upgrade.
With this two plugins, you could even offer a paid and fully-managed WordPress hosting service.