WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress MU Domain Mapping

Map any blog/site on a WordPressMU or WordPress 3.X network to an external domain.

  1. Install the plugin in the usual way into the regular WordPress plugins folder. Network activate the plugin.
  2. Move sunrise.php into wp-content/. If there is a sunrise.php there already, you'll just have to merge them as best you can.
  3. Edit wp-config.php and uncomment or add the SUNRISE definition line. If it does not exist please ensure it's on the line above the last "require_once" command. define( 'SUNRISE', 'on' );
  4. As a "super admin", visit Super Admin->Domain Mapping to create the domain mapping database table and set the server IP address or a domain to point CNAME records at.
  5. Make sure the default Apache virtual host points at your WordPress MU site or WordPress 3.0 network so it will handle unknown domains correctly. On some hosts you may be required to get a dedicated IP address. A quick check: in a web broswer, type in the IP address of your install. If you are using CPanel, use the Park a Domain menu to set the mapped domain to your main installtion.
  6. Do not define COOKIE_DOMAIN in your wp-config.php as it conflicts with logins on your mapped domains.

Illustrated installation instructions can be found here but you can ignore the instructions to place domain_mapping.php in mu-plugins. Thanks Otto.

Configuration

On Super Admin->Domain Mapping you can configure the following settings:

  1. "Remote Login" can be disabled. Useful if you're hosting totally separate websites.
  2. "Permanent redirect" uses a 301 redirect rather than 302 to send visitors to your domain mapped site.
  3. "User domain mapping page" allows you to disable Settings->Domain Mapping that the user uses.
  4. "Redirect administration pages to network's original domain (remote login disabled if this redirect is disabled)" - with this checked, if a user visits their dashboard on a mapped domain it will redirect to the dashboard on the non mapped domain. If you don't want this, remote login will be disabled for security reasons.
  5. "Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues." - ignore the primary domain setting on your sites. The same content will be available on multiple domains and may cause problems with Google because of duplicate content issues.

Super Admin->Domains allows you to edit the domains mapped to any sites on your network.

For Cpanel users

If your domain uses the nameservers on your hosting account you should follow these instructions. If the nameservers are elsewhere change the A record or CNAME as documented above. Add a wildcard subdomain/virtual host record to your site's DNS record in Web Host Manager (WHM). If you do not have access to WHM, you must email your web host and ask them to make this one change for you. Should be no problem:

  • Go to "Edit DNS Zone" and select the domain of your WPMU installation and click "Edit".
  • Below "Add New Entries Below This Line", enter in the first box (Domain) an asterisk: "*".
  • The second box, TTL, should be "14400".
  • The third box should be "IN".
  • Select A Record Type from the drop down "A".
  • And in the last box, paste in the IP address of your website/network.

From Cpanel, click on the "Parked Domains" under the "Domains" section:

  • Under "Create a New Parked Domain" enter the domain name you want to add to your network.
  • Click the "Add Domain" button.
  • It should add the domain to the list of parked domains and under "Redirect to" it will say "not redirected". That is OKAY.

Now you're ready to do your domain mapping.

Requires: 3.1 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-17
Downloads: 245,051

Ratings

4 stars
4.5 out of 5 stars

Support

17 of 71 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Works!

7 people say it works.
1 person says it's broken.

100,1,1
100,3,3
100,4,4 89,9,8
0,1,0
50,4,2 60,5,3
100,1,1 71,7,5 100,1,1
57,14,8 90,21,19
85,27,23 85,20,17 0,1,0
100,4,4
100,3,3
100,6,6
100,1,1
58,12,7 88,17,15
50,6,3
100,3,3
75,8,6 100,1,1
100,2,2
100,2,2
100,1,1 75,4,3 92,25,23
30,20,6
50,20,10 82,28,23
100,2,2
20,5,1
71,17,12
93,28,26 100,1,1
70,20,14
60,15,9 79,19,15
67,9,6
69,13,9
100,1,1 33,6,2
50,2,1
86,7,6
100,7,7
100,6,6
100,1,1
0,1,0
88,8,7