Compatibility Multisite 4.2 BuddyPress 184.108.40.206
"WPMU DEV wins the prize for today's most awesome company and most helpful customer support."
Domain Mapping is the only plugin of its kind to bundle simple mapping, domain name resale and mapping as a premium service.
As one of the most requested features for Multisite, Domain Mapping has quickly become an essential plugin for every network.
Simple Setup, Smart Configuration
Domain Mapping automatically adjusts to fit your network’s structure.
Let site owners set and purchase custom URLs while keeping global shopping carts and network-wide user login intact.
Sell Domain Names Direct
Become a reseller and open new streams of income. Provide ways to search and buy domain names directly from your network.
Automate distribution and management with eNom and WHMCS integration.
Stand Out Performance
Save big on SSL certification with mapping control over individual URLs.
Get the only mapping plugin in its class to offer forced HTTPS and to let you use an original URL for things like checkout and payment pages.
Better with Pro Sites
Domain Mapping together with Pro Sites makes it easy to create your own paid and fully managed WordPress hosting service.
Attract new users and grow profits with high-end products and services for your network.
To Get Started:
Before we get started, there are 4 things we need to check first…
- WordPress Multisite: you are running your WordPress website as a multisite right? Because if not then you won’t be able to install this plugin.
- Dedicated IP: For using A Record setups, you need to ensure you have a dedicated IP. This IP would fall onto your multisite setup. i.e. when you enter the IP you see your multisite. This is known as the DocumentRoot for the IP, your host will be able to sort this quickly and easily.
- FTP access: you need FTP access to your multisite to properly install and configure this plugin. Specifically, one plugin file must be relocated, and wp-config.php will need an edit.
- PHP version: You’ll need to be running a PHP version equal or higher to 5.3 for Domain Mapping to work.
Got all that? Great, then let’s get to it!
Getting Set Up
So first and foremost, download the plugin to your computer and then unzip it. Inside, you will see the following files:
Once unpacked, we need to upload all that to your website. Provided you have not changed your plugin directory path, it will look like this:
You will want to upload the inner domain-mapping folder there (that’s the one inside the main folder with all the numbers). So log in through FTP or, if you are on a local host, then move that folder over.
The path will then be:
You will see in the /domain-mapping/ folder there is a file called sunrise.php. We need to move that (move, not copy) to the /wp-content/ folder.
So the path to that file will be:
Thats the files sorted and uploaded. Now we just need crack open your wp-config.php file located within the root of your WordPress installation. On a cPanel server that path might be:
You will have to enter the following line:
define( 'SUNRISE', 'on' );
You can pop that right under the WP_DEBUG option, so like this:
define('WP_DEBUG', false); define( 'SUNRISE', 'on' );
If for some reason you don’t have the WP_DEBUG line, then providing it is just above the following code comment it should work well:
/* That's all, stop editing! Happy blogging. */
Note: If you add this in the wrong place, you will most likely find issues when adding a domain name to be mapped from your WordPress admin area.
Now head on over to Network Admin > Plugins, and Network Activate the plugin.
We have the plugin installed now, so let’s go configure things!
Configuring Network Settings
The settings are located in the Network Admin area under Settings > Domain Mapping.
There are a few settings that need your attention under the first tab: Mapping Options.
Let’s take a look at them one by one.
The Server IP Address is where you enter the IP address of your multisite. This doesn’t really affect anything; it appears in your users admin panels, and is only to inform them which IP they must use when mapping their domains.
You can optionally enter your own instructions. When this field is left blank, the plugin’s default text will be used.
Administration mapping is where you select the domain that will be used in the admin area of sub-sites.
- domain entered by the user enables you and your users to access the admin area with either the mapped domain (userdomain.com/wp-admin/) or the original domain (usersite.yourdomain.com/wp-admin/).
- mapped domain enables you and your users to access the admin area through whichever domain is mapped. Don’t worry if you use usersite.yourdomain.com/wp-admin/, it will simply forward to userdomain.com/wp-admin/.
- original domain enables you and your users to access the admin area through the original domain only (usersite.yourdomain.com/wp-admin/).
Login mapping has similar options as above, but it affects login action.
- domain entered by the user enables you and your users to login with either the mapped domain (userdomain.com/wp-admin/) or the original domain (usersite.yourdomain.com/wp-admin/).
- mapped domain requires you and your users to login with whichever domain is mapped (userdomain.com/wp-login.php/).
- original domain requires you and your users to login through the original domain (usersite.yourdomain.com/wp-login.php/).
Enable Cross-domain autologin if you want the plugin to automatically log you into all sites you have mapped. Will also log your users into all domains they have mapped too!
If Verify domain availability is enabled, the plugin will notify your users if their selected domain cannot be mapped.
You can force https in login and admin pages, only applicable if you have an SSL certificate.
And you can also force http/https in front-end pages as well, applicable if you have SSL enabled.
Select Pro Sites Levels will only appear if you have the Pro Sites plugin activated on your network. This enables you to make the domain mapping functionality available to certain Pro Site levels only, and charge your end members for the privilege of mapping their own domain via Pro Sites upgrades. (If you don’t already have Pro Sites, you can grab it here).
Now let’s take a look at the settings under the second tab: Reseller Options.
The reseller API requests log level setting enables you to select how to log requests for domain names that your users purchase from you.
The Reseller provider setting allows you to select from the available domain name resellers. You can select from the following providers:
- eNom – you will need to enter your eNom account information.
Your account id and password are the same you use to login to your eNom account.
The Select environment setting enables you to specify whether to use a test account at http://resellertest.enom.com/ or your live account at http://www.enom.com/ Be sure the account ID & password you just entered are for the right account. :)
The SSL Certificate Verification setting allows you to enable or disable SSL verification.
The Select payment gateway setting will only be visible if you have Pro Sites also active on your network. You can select between the eNom credit card processing services (requires you to have a processing agreement with eNom and a secure SSL connection), or the PayPal payment gateway in Pro Sites.
- WHMCS – you will need to enter your WHMCS account information.
Enter your WHMCS location in the WHMCS url field.
Your username and password are the same you use to login at your WHMCS url.
Tick the Enable client registration option to allow client registration.
In the Define domain pricing section, you can specify your pricing on a top-level domain (TLD) basis. Click the + icon to add more.
The Select payment gateway setting will only be visible if you have Pro Sites also active on your network, allowing you to select any of the Pro Sites gateways.
Let’s take a look at the last tab: Mapped Domains.
This tab provides a great overview of the domains mapped on your network. Domains are shown along with details and options available in columns as follows: Site ID, Mapped Domain, Original Address, Health Status, DNS Configuration, Active, Actions
- Easily find domains by entering a search term and clicking the Search mapped domains button.
- The Health Status column indicates whether a domain is valid or not. Clicking the link will refresh the field.
- The Actions column provides a couple of icons for quick actions: Toggle scheme or Remove mapping.
To add a domain name to your admin area is easy, but keep something in mind here:
If in the previous steps you chose “Mapped Domain” as the method for accessing the admin area and the domain being mapped is either not resolving to your server yet or not resolving for another reason other than DNS propagation then that admin area will not be accessible until the domain name has resolved correctly. Choose another option if this bothers you. :-)
Adding a domain name which is not resolving correctly in this instance will make that admin area inaccessible. Honest, we warned you!! ;-)
So, lets go to a sub site which has it own domain to map. In the sub site’s dashboard, go to Tools > Domain Mapping.
Under the first tab, you can add the domain to be mapped to your sub site. Once you click add then that’s all you need to do from WordPress.
If you have enabled Verify domain availability in your network settings as described above, and the domain entered here is not valid for some reason, an alert like this will pop up:
If you have enabled domain purchasing in your network settings, clicking the second tab (Purchase domain) will enable your users to select and purchase their preferred domain name from you, right in the admin of their site. How cool is that?
A Record & CNAME
If you or your end user wishes to map a sub domain to the blog within your multisite install then you can set up a CNAME
For the purpose of these instructions we will assume you are doing this through cPanel, however if you are using a different panel or managing the DNS with the domain name registrar then the principle is just the same, the method of adding it might be a little different.
If you cannot manage your own DNS then you would need to discuss this with whomever is currently managing it.
Even people on cPanel might not have access to the Simple and Advanced DNS options, this depends on your hosting provider. If you point your name servers to your host then it can be managed by your host or your cPanel. Again if you don’t have access, then ask your host.
CNAMEs are used for sub domain mapping. i.e. you want to map blog.userdomain.com to usersite.yourdomain.com
A Records are for mapping TLDs aka Top Level Domains. i.e. userdomain.com mapped into usersite.yourdomain.com
First we will handle a CNAME:
We will do this through Advanced DNS, so click on that.
Select the domain from which you would like to enter a CNAME. Now fill in the form. :-)
Name: the sub domain to be mapped. So subdomain.example.com
TTL: You can set this to 14400. If you know what you are doing then please feel free to adjust this.
Type: CNAME of course ;-)
CNAME: Where it is going to, in the example above, we use usersite.yourdomain.com
Easy Peasy huh!
For A Record – Top Level Domains we go through the same process, except you will most likely already have the A record set (unless in instances where the domain is registered but not pointed anywhere).
So If its there click on EDIT for the main A record, and change that IP address to the dedicated IP for your Multisite install.
If you are setting up A record for the first time then the type is “A” A Record. Then rather than entering a CNAME it will be the Address field, which is for the IP Address.
Note: The IP address must have it’s DocumentRoot set so that when you load it in your browser you will see your WordPress install. In most cases this should be /public_html/ but it can vary, your host will be able to assist easily. This ensures that any mapped domains will be sent through to your WordPress install.
Yeah there are, you can also use Addon Domains and Parked Domains. They must point to the root of your multisite installation in order to function correctly.
This method also does not require a dedicated IP address.
However its not recommended you use this method for client websites as you will have to manually control their DNS. You would need to deal with MX Records if they wish to use email on that domain as well as other DNS requests.
This is a good method if you own them all though, its quick and easy!
Remember the domain root needs to be your multisite folder which is usually:
Addon Vs Parked
There really is not much difference. If you want an extra FTP account then use Addon domains. Really you shouldn’t be handing FTP accounts out due to security concerns, so there isn’t much need for this. And all FTP is usually done through your main FTP account.
Parked domains simply does as it states, it parks the domain onto a folder or redirect. Again this will vary from control panel to control panel.
With Domain Mapping, you’ll be able to easily see mapped domains through your sites list at Sites > All Sites.
Here you’ll see an additional column, Mapped Domains.
All domain names mapped within your network will be displayed here.
I get a 404 or some sort of server page, why?
Chances are your not using a dedicated IP or you have some issue with your htaccess file, please check those out first. You may also wish to double check your permalinks and re-save them again.
Why do I need a dedicated IP?
You only need a dedicated IP address when using A Records to map your domain. This is because the domain being mapped needs to land on your WordPress multisite install and if it doesn’t then our plugin and WordPress won’t know when to map it.
On shared hosting platforms, usually the sites IP address will fall on a landing page which is not related to your account in anyway.
Doesn’t this need to go into the MU folder?
Nope, you no longer need to do that!
If however you are running an older version pre-3.0.7 then you must remove those older plugin files before using the new version!
When I add a domain, the page just refreshes and nothing happens?
Chances are when you edited your wp-config.php to enter the sunrise information, you put it to far down. Check through these docs again and make the appropriate adjustments.
Nope that wasn’t it, the page still refreshes and nothing happens so what now sherlock?
Another cause of this is the sunrise.php file, if you are running our Multi Domain plugin:
Then you will find in the plugin folder an alternate sunrise file dm_sunrise.php you need to use this file. First rename it to sunrise.php and then upload it just like the original sunrise.php file in these instructions and that should fix you up! :-)
Erm… Cookie syncing does not work?
Cookie syncing is where you log into your mappeddomain.com and subsite.domain.com at the same time. Its this process that allows you to administer and view a mapped domain website whilst being logged in.
Its not a process to log you into all mapped domains on a network install.
Anything else I need to do?
If you installed your WordPress installation as a subdirectory, then nahh nothing else there.
If you installed your WordPress installation as a subdomain version, then we assume here that you’ve already set up your Wild Card? Don’t worry if not, checkout WordPress for a walk through:
After adding a domain I can not add a second domain. Is this correct?
If you haven’t added anything to your wp-config.php then it’s limited to a single domain per site. If you add the following somewhere in it then you will be able to use multiple domains per site.
But…. But…. But…. What now!!!!
Thats your end of it done anyway. If you or your end user need to map a domain we first need a site. We won’t cover the whole creation of multisite and sub sites here. If you need help there then please pop over to our support forums, we will gladly help you out there!
Domain Mapping Features
Grow your network and increase profits.
- Unique landing page URLs
- Improve branding
- Network cookie sharing
- Maintain global logins
- Works with global shopping carts
- Setup product sub-sites
- Sell domain names direct
- eNom integration
- WHMCS integration
- Pro Sites integration
- Sell mapping as an upgrade
- International domain name mapping
- Separate admin and login mapping controls
- Cross domain login included
- Force HTTP/HTTPS
- Use original domain for SSL
- User controlled domain mapping
- Built for Multisite
- Simple guided configuration