The Ultimate WordPress Multisite Domain Mapping Tutorial

WordPress is an astonishing piece of software.  It runs 16.7% of the worlds highest trafficked sites, has a plugin repository with over 22,000 plugins, and is widely considered the number one blogging platform.  It’s easily adaptable into a full CMS, which is precisely why we love using it and have our own multisite network setup here.

By adding in WordPress multisite domain mapping, we’re able to fully leverage the power of WordPress for our clients and allow them the flexibility of maintaining their own domain name.

What makes multiple domains difficult to use with one WordPress code base is the disconnect between the physical file system structure and the way WordPress creates permalinks.  On a non-WordPress website, you could have the path of and this would be a physical subfolder location that you could point a domain to in your registrar’s admin panel, but in WordPress that location would be “virtual” (read more about WordPress permalinks here).

So, how do you resolve this issue?  You could hire us to do it (*cough* please do! *cough*) or there’s a couple of alternatives.  This tutorial focuses on the WordPress MU Domain Mapping Plugin written by Donncha O Caoimh.

We prefer tinkering around with things ourselves and the plugin is free.  However, if you’re not into the nuts-n-bolts approach, there’s a service called WebSynthesis that integrates WordPress hosting and domain mapping functionality (props to Ron and Andrea Rennick of Copyblogger Media)!

Let’s get started!

What We’re Going To Accomplish

  1. Setup a WordPress Multisite Network
  2. Install and configure the WordPress MU Domain Mapping Plugin
  3. Create an additional site within your network
  4. Configure settings with your registrar/hosting provider
  5. Assign a mapped domain name to the new site

Step One – Setup A WordPress Multisite Network

All of the setup steps have been detailed by the guys and gals at WordPress.  You should check out their documentation on it before proceeding.  If you’ve already setup your network, continue on to Step 2.

Step Two – Install and Configure the WordPress MU Domain Mapping Plugin

This plugin is no run-of-the-mill WordPress plugin in the repo.  It’s REQUIRED that you install this plugin MANUALLY.  Here’s the deets:

  1. Download the WordPress MU Domain Mapping Plugin.Directory structure example of how files should be arranged in the WordPress Multisite Domain Mapping setup
  2. Extract the zip archive to a location of your choosing.  If you’re in need of a program to extract the archive, we recommend 7-Zip.  We also recommend downloading it and other utilities from Ninite.
  3. Navigate to your “/wp-content/” directory on your WordPress site and create a folder called “mu-plugins”.
  4. Verify that you also have a folder titled “/blogs.dir/” within the “/wp-content/” folder as well.
  5. From the location where you extracted the plugin, we’re going to copy two files: “domain_mapping.php” and “sunrise.php” into the “/mu-plugins/” directory and “/wp-content/” directory, respectively.  Please compare to the screenshot here to verify that you did this correctly.
  6. Navigate to the root of your WordPress install and open “wp-config.php”.
  7. Insert the following:
    define( 'SUNRISE', 'on' );

    and make sure it appears above the following line

    /* That's all, stop editing!  Happy blogging. */
  8. Upload your updated “wp-config.php” file to your web host.
  9. Log into your WordPress site and navigate to the “Network Admin” section.
  10. Click Settings > Domain Mapping.  This is the interface for configuring your domain mapping across the entire network.
  11. Find the IP address of your web hosting server and enter that information into the Server IP Address field.  You can also use a CNAME record instead if that’s your preference.  You can find this information by pinging by your domain or within your web host’s admin panel (e.g. HostGator uses cPanel and your server’s IP address can be found in the sidebar to the left, all the way at the bottom of the screen under Account Information > IP Address).
  12. The Domain Options checkboxes below are important to decide how the mapping and subsequent redirection is handled.  To explain what each of these options means:
    1. Remote Login – This forces all login attempts to be redirected to the main site’s URL. For instance, if we had this enabled, all of our network sites would be forced to redirect to to log in. We don’t want this, so it’s disabled.
    2. Permanent redirect (better for your blogger’s pagerank) – This enables the use of a 301 redirect instead of a 302. We recommend turning this setting on.
    3. User domain mapping page – Enables a site-specific domain mapping interface page located under Tools > Domain Mapping. We recommend this if you allow users to register their own site.
    4. Redirect administration pages to site’s original domain (remote login disabled if this redirect is disabled) – Much like Remote Login, this makes use of redirecting the user from their URL to your URL, but the big difference here is that this applies to ALL administration pages. This is up to you, but we leave ours turned off.
    5. Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.This is NOT recommended for proper SEO. Enabling this setting ignores redirections from non-WWW to WWW and vice versa. This can create major issues with duplicate content in search engines.

Screenshot of the WordPress MU Domain Mapping Plugin with Frontera Marketing Group's live settings

Step Three - Create An Additional Site Within Your Network

This step is very straightforward.  Navigate to your Network Admin Dashboard and click SitesAdd New.  Fill in the details as you see fit, click Add Site, and your new site has been created.

Step Four – Configure Settings With Your Registrar/Hosting Provider

At this point, we need to discuss a few things about domains, registrar’s, and hosting.  When you purchase your domain name, you’ll use a domain registrar to do this.  Typically domain registrars will also offer web hosting so that their customers can have an all-in-one place to manage everything from.  GoDaddy or DreamHost are good examples of companies that provide both services in one place.

However, you can also choose to purchase your domain at one place and your web hosting elsewhere.  For instance, you could have GoDaddy as your registrar, but you could use Bluehost for your hosting.  Or you could have DreamHost as your registrar, but use HostGator as your hosting provider.

The reason I bring all of this up is that if you split your domain registration and your web hosting between companies, you’ll need a way to tell the registrar where your hosting is located.  We do this with name servers.

The crucial point here is this:  set your domain name servers to point to your hosting BEFORE you begin doing any domain mapping work with WordPress and let the information propagate.

Why is this so important?  Without getting too complex, changes to name servers and DNS records can get pretty complicated due to “propagation” and TTL (time-to-live) values.  It’s crucial to have these values set properly beforehand so that if you make a mistake with your WordPress multisite domain mapping, you can then eliminate DNS as a potential culprit when troubleshooting.  For more information on DNS and propagation, DreamHost has a really good Wiki topic on it.

After changing your name server settings at your registrar, give the system time to update before proceeding to the next step of this guide.  Usually, name server changes occur after about an hour, but sometimes these can take longer.  DNS and name server changes can (but often don’t) take 24-48 hours to fully propagate around the internet.

As an additional tidbit of info, I’ve included links to some major hosting and domain registrar providers’ “how-to” sections for setting DNS and name server information:

Step Five - Assign A Mapped Domain Name to the New Site

Finally, we’re on to the good stuff!

Provided you changed the name servers in the previous step and let them propagate, all changes from this point on should be instantaneous.

We’ll now finalize the domain mapping settings for your new site and get this ball rolling:

  1. Log into your new site’s dashboard.
  2. Click on Tools > Domain Mapping.
  3. Under the Add new domain section, you should see a box preceded by “http://”.  Type your domain name in this box (e.g. “” or “”), but DO NOT check the checkbox for Primary domain for this blog.
  4. Click the Add button to save your new domain name.
  5. You’ll now see two domain name options under the Active domains on this blog section with radio buttons next to them.  The radio button should be in front of the current URL to access your site.
  6. You should now add another domain name that either includes the “www” in the URL or excludes “www” depending on how you entered it on Step 3 and add this exactly like you added the previous one.  This is important for SEO purposes as Google can potentially see your site as two individual sites if not properly handled, which you definitely do NOT want.  By adding both here, you can ensure that the “non-www” URL forwards to the “www” URL or vice versa.
  7. At this point, I highly recommend double- and even triple-checking your work up to this point to ensure that all of the steps have been completed properly.  After completing the next step, you will be logged out of the dashboard and if you didn’t let your name servers propagate, you won’t be able to log back into your site dashboard until it finishes propagating.
  8. When you’ve reviewed that you completed all the steps properly and the name server records are properly updated, click the radio button next to the domain name that you wish to be primary for your site.
  9. Click the Set Primary Domain button.
  10. You’ll now be logged out of the site.  If you look in your omnibox of your browser, you should notice that the URL has updated for your site.  If you’re unable to log back into your site, don’t panic!  You haven’t allowed for the propagation of the DNS servers to take into account your name server changes so you just need to be patient and give it more time.  I’m an impatient guy myself, so I understand how difficult it can be to just sit and wait, but that’s what you’ll need to do.

Conclusion – WordPress Multisite Domain Mapping

At this point, you should be rock-n-rolling with your shiny new domain name pointed to your WordPress install!  You should also have the “non-www” forwarding to the “www” or vice versa and everything should be dreamy, right?  Well if it’s not for any reason, leave us a comment below or give us a shout on our contact form and let us know.  We’re always willing to help out.

Tags: , , , ,

Article written by Mike Smith

6Articles Mike Smith on LinkedIn | Email Mike Smith

Mike is the Electronic Media Director and Site Administrator for Frontera Marketing Group. Since building his first website in 1996 using animated GIFs of flaming skulls on GeoCities, he's graduated to advanced HTML5/CSS3 techniques and is well versed in front-end design and back-end development with PHP/MySQL. When not building websites, Mike likes spending time with his family, playing video games, writing articles about technology, photography, and building custom computers.

Post a comment or leave a trackback: Trackback URL.


  1. structured

    What’s up it’s me, I am also visiting this web site daily, this website is really good and the viewers are actually sharing pleasant thoughts.

    August 2nd, 2013 at 11:33 pm Reply

  2. nathan

    How would I enable an SSL certificate for online payments on one of the mapped sub-domains? Can I just purchase an SSL certificate for each domain? Or, is it not that simple since I believe a multisite is set up on one IP address and each SSL would need its own dedicated IP?

    August 13th, 2013 at 1:27 pm Reply

    • Mike Smith

      Hi Nathan,

      I would recommend checking into this plugin here: SSL Subdomain for Multisite WordPress. The instructions illustrate how to accomplish what it sounds like you want to do and the plugin that this is compatible with is the same plugin we use for all of our sites and featured in this article.

      Hope that helps!

      August 13th, 2013 at 3:06 pm Reply

  3. TellTuts

    Thanks to share this useful plugin to mapping domain.

    August 14th, 2013 at 5:48 am Reply

  4. Nickm

    Hey Mike,

    I’m wondering if you can help me, or point me in a direction…
    I’m trying to to a site in my MU setup using the Domain Mapping plugin.

    I’ve set the the mapping so that;

    are all mapped to the correct site ID. I’ve got the owners of the domain to point to the server IP.

    However, when I go to the URL I get routed to my servers default WPMU site.

    Any clues at all? Thanks for the tutorial!

    August 30th, 2013 at 6:02 am Reply

    • Mike Smith

      Hi Nick,

      If I’m understanding this correctly (and perhaps I’m not), you want to point to another domain that’s already mapped to a site in your network. Is this correct?

      If the DNS is already changed for to point to your server IP, then it makes sense that when you visit it, you’re getting directed to your primary site in WordPress. That’s precisely what you want the domain path doing. However, you would need a way to internally route that path to where you want to go and domain mapping isn’t what you want because domain mapping doesn’t handle a domain path that includes a subfolder.

      I think it would be best if you use .htaccess and 301 redirect the request for to wherever it is you want to go within your network.

      Hope that helps!

      August 30th, 2013 at 1:44 pm Reply

  5. Alex Leuschner

    Hey Mike,
    I’ve followed this tutorial and others and can’t seem to get this working. Btw your tutorial has been the most detailed and well-explained of the blogs I’ve visited to solve this issue.

    I’m guessing its a small detail that I’ve missed.

    Here’s my setup:
    Main domain: (registered with godaddy)
    2nd domain: (registered with godaddy)
    Both are hosted with mediatemple.
    I’ve set the nameservers to mediatemple on the godaddy website. This is correct and working.
    Mediatemple has the dns zone file where I enter any dns info.
    This is whats currently on the dns zone file for 43200 SOA (
    2013090501 ; Serial
    10800 ; Refresh
    3600 ; Retry
    1209600 ; Expire
    43200 ) ; Minimum TTL 43200 NS 43200 NS
    . 43200 A
    * . 43200 A
    ftp . 43200 A
    mail . 43200 A
    www . 43200 A
    . 43200 MX 10

    I have the multisite setup and working. /the-sussex-deal is blog_id=2.
    I have setup the domain mapping plugin as outlined above. I’ve added a server IP:
    I’ve checkmarked options 2 and 4. I haven’t checked #3 because I will have control of the sites and would rather manage them all from the network admin interface.

    Under domains I’ve mapped and (as primary) to site ID 2.

    When I visit it just takes me to the mediatemple server page which is default for any site on the server that has no files on it.

    Any ideas where I could have gone wrong? Thanks for your help in advance.

    September 6th, 2013 at 7:16 pm Reply

    • Mike Smith


      Glad you liked the article and sorry to hear you’re having troubles. On a side note not related to domain mapping, I’d definitely decrease those TTL values though because currently they’re set to only update every 12 hours. I typically like to set mine to 3600 seconds (1 hour). Hosting companies generally frown upon that because it increases the load on their servers, but I personally don’t see anything wrong with having a lower TTL value other than it’ll help your site update faster (most of the time, but not all).

      Anyway, the first time I attempted to go to your main site it gave me an “Error establishing database connection” notice. I just tried again and it took me there. Not sure if you’re having intermittent issues or perhaps you were working on it at the time of me writing this.

      When I ping, I get the IP of, which doesn’t match the IP that you have set for of

      I’m also showing the following for your DNS records for that domain, which are not MediaTemple DNS servers, but instead look like Amazon’s servers:

      Name Server: NS-729.AWSDNS-27.NET
      Name Server: NS-414.AWSDNS-51.COM
      Name Server: NS-1818.AWSDNS-35.CO.UK
      Name Server: NS-1084.AWSDNS-07.ORG

      To me it seems like your primary domain is pointed at a completely different server than your secondary domain. Are you sure that you have the routing for your primary domain setup correctly? It’s imperative for the multisite portion to work that you have the DNS setup the right way first, and the domain mapping stuff will then fall into place. Regardless, if your primary site doesn’t reside in the same spot that you have your secondary blog, then none of this will work. I’d say that you need to have your primary domain’s DNS pointed to and first, then verify it by checking the WHOIS or pinging it to make sure it’s gone through, then you need to setup the secondary domain.

      September 9th, 2013 at 6:20 pm Reply

  6. Wouter


    excellent tutorial, best I found!

    However, I wondered if you could help me with this: is my main wordpress site. I made this a multisite and make almost exact copies to subdirectories, ie.

    Now I want to get rid of these complex directory names and want to have a normal domainname for every subdirectory. For example when people goes to they should actually arrive at (but without seeing or knowing it).

    I followed each step in your tutorial carefully and doublechecked, but somewhere I seem to have missed something. You see that when you go to the child website, you do get to see the new domain name, so that part seems ok. Still though, you only see the (unexisting/dummy) website of and not the child website as it should be.

    Both domainnames or registered by the same company, as is the hosting. So both domainnames have the same nameserver.

    Would you maybe know what I’m doing wrong?


    September 17th, 2013 at 4:25 pm Reply

    • Mike Smith


      I definitely see what you’re talking about. When I go to your subsite, the URL that you want to map is correctly showing, but I see the same default page.

      From the looks of it, your DNS and name servers are setup correctly because if I ping either domain, I get the same IP address. However, it appears as though you’re getting a “parked” domain page to show up.

      In your hosting’s control panel, do you have the site parked or do you have it pointing to a physical folder location in your filesystem? The hosting company’s landing page is saying that you need to upload files into your public_html folder to change the site, so perhaps that indicates that it’s pointed to an incorrect physical location, but WordPress domain mapping works differently. You want to verify that your domain points to the root folder of your WordPress install and that should clear it up.

      September 17th, 2013 at 7:29 pm Reply

      • Wouter


        thanks for the reply!

        Do you mean that I also need to install wordpress on the pointer-domain

        September 17th, 2013 at 8:15 pm Reply

        • Mike Smith

          No, not at all. This only requires one WordPress installation. But what you should do is verify that inside your hosting admin panel, the domain points to the root folder of the WordPress installation for

          For instance, if the path in your hosting for is: /var/usr/public_html/ then when you added the domain to your hosting account, it should also point to /var/usr/public_html/

          If you’re unfamiliar of what the path is for your website or uncomfortable with doing it, I’d contact your hosting provider and they’ll be able to help you with that part. After all, what are you paying them for if not to help? :)

          September 17th, 2013 at 8:30 pm Reply

          • Wouter


            you were right! After letting the domain pointing to the right path, it worked perfectly.

            Thanks a lot!

            September 20th, 2013 at 8:25 am

          • Mike Smith

            Glad to hear, Wouter!

            September 20th, 2013 at 12:45 pm

  7. Lisa

    Hi – I’ve been reading tutorials all day and this one by far is the best one out there. I’m using sub domains and I currently have 2 sites in my network. The problem I’m having is that the www address is working fine for my 2nd site, but the http:// address is resolving to my server’s IP address, with that “your apache is working” message. You mentioned that when doing the mapping for a site, you need both entries for SEO purposes (and I agree). I just can’t figure out why www is resolving correctly but the http address is not. I have my A record at the registrar set to the server IP. Any ideas? Thank you!

    September 18th, 2013 at 3:33 am Reply

    • Mike Smith

      Hi Lisa

      Do you have anything in your .htaccess file either for the parent site -or- the sub site? If so, there can be conflicting rules that interfere with making the non-www not redirect correctly.

      Here’s a good article on htaccess redirection. If you want to redirect www to non-www then you can reverse the rewrite rules.

      Check to make sure you don’t have conflicts and let me know if that works.

      September 18th, 2013 at 4:05 am Reply

  8. Mike Green

    I would like to do something like having the primary domain be and one of the secondary domains be A further complication is that is not a WordPress site. (It uses OpenCart.)

    Can this be done?

    October 23rd, 2013 at 4:23 pm Reply

  9. Eric Wargo

    Great post! I got my network setup and the domains mapped like they should be. Props to you guys and thanks a ton for taking time to write this.

    November 6th, 2013 at 7:52 pm Reply

  10. Aaron Col

    Thanks for the article!

    One question though, what happens when the main domain is changed?

    Say you have which is where the multisite is housed, and then which is a site on the network with a domain mapped to it. If you change to through your host, would that effect

    November 8th, 2013 at 9:57 pm Reply

  11. Dolly Holmes

    Before trying to do what is described in your tutorial, I have a question: I am trying to redirect a subdomain on my multisite installation to a separated domain that I have already set up. This separate domain is not in my multisite installation. Will this method work for me? The subdomain is and the separate domain is


    December 10th, 2013 at 9:12 pm Reply

  12. Bob

    Hi, have you a solution for the following permalink problems?:
    thanks for you support

    February 3rd, 2014 at 10:23 am Reply

  13. Brijesh

    I Can’t Add or See My New Domain!!

    I have WP Multisite installed on my cPanel. For some reason I can’t see or add my new site even after installing

    this plugin (and doing the required.)

    I’ll go step by step, because I guess I may have missed something.

    1. Took a backup and disabled all my plugins
    2. Installed and network activated the plugin mentioned above
    3. Moved sunrise.php into wp-content
    4. Added define( ‘SUNRISE’, ‘on’ ); to wp-config.php file
    5. Then Under Domain Mapping (Network Admin>>Settings>>Domain Mapping) I added my server IP Address. (I also tried the CNAME Record way. Nothing happens even after that. Waited for more than 2 hours.)
    6. Under ‘Domain Options’ the ‘user domain mapping page’ is checked.
    7. Tried adding the new site. Doesn’t get added. Gives this error –

    More screenshots

    Did I do something wrong? What am I missing here? Please help asap.

    Thanks in advance.

    March 11th, 2014 at 11:05 am Reply

    • Mike Smith

      Based on the error, it appears to be an invalid site URL for your site. Have you tried not using just “pregnancytips” instead of using “”? I believe that’s your issue here.

      March 17th, 2014 at 3:17 pm Reply

  14. Dan Beach

    Thank you, thank you, thank you for the well-detailed explanation. I wondering if you have any pointers for me as I almost have it working.

    I have a sub-folder multisite installed. The original site is and I’m trying to map to it. I have both and in the domain mapping. The www version is set as the primary.

    When I go to or, I end up at the homepage. However, when I go to or, I get the site I want (with a certificate error, but that’s another issue that I’ll deal with using the answer given above).

    Any ideas?

    March 24th, 2014 at 9:08 pm Reply

    • Mike Smith

      Looks like your mapping is working as expected. Your issue seems to be with your site certificate. I’m not an expert with SSL, so you’ll want to verify this with your hosting company, but I believe all you need is a certificate for and you should be OK.

      March 24th, 2014 at 9:19 pm Reply

  15. Thomas Imlauer


    I try to map my membership base across a main website and 2 subdomains. I have not mapped my domains yet to my site because it is still in development and when I do people register right away (disabled it now). What I want to achieve when a user is subscribing is that the same user is registered across all sites. I use wishlist member multi site license as plugin. Mapping the database did not work, because I need only the user mapped not any other tables of the database. This is individual related to the site and content. All sites reside on the same VPS server. I do not use the original domain name currently because the old site is still mapped to it with the remark of migration work taking place. I read about the multisite plugin but I am not concerned about blogs. I need these users to be available as users for all sites once they register on any of these sites. These users need to be visible for wishlist member in order to apply permissions on each site. What would be the best approach rather than export and import user on the databases for each wordpress installation, every time a new user did registers?


    March 31st, 2014 at 10:51 am Reply

    • Mike Smith

      Hi Thomas,

      Unfortunately, the domain mapping plugin and the steps discussed in this tutorial are strictly for domain mapping only and do not have any bearing on user permissions or user management. It also doesn’t tie into the Wishlist Member plugin either. If you wanted us to take a look at your specific issue, you can contact us directly through our contact form and we can work with you on getting this resolved.

      March 31st, 2014 at 6:30 pm Reply

  16. s

    When i go to “domains” and add my domains, no “Active Domains” show up. i input the site id and domain, but it just disappears when i hit save. Any advice?

    April 3rd, 2014 at 8:35 pm Reply

    • Mike Smith

      Hi, it sounds like you’re adding the Site ID and the domain name to the “Domains” section in the “Network Dashboard”. Don’t do that. Go into the “Site Dashboard” and do it there instead.

      April 3rd, 2014 at 8:44 pm Reply

  17. don

    hi Mike,
    setup is working fine, but one thing is irritating: New Posts in all domains use the primary Multisite Domain for the permalinks.

    Thats the way it looks:
    Domain1 is the primary Domain
    Domain2 (siteID=2) is working correct and pointing to siteID 2. But all permalinks on Domain2 looks like this….

    Shouldn’t there be a translation in the mod_rewrite? Any ideas?

    regards Don

    April 4th, 2014 at 6:26 pm Reply

    • Mike Smith

      Hi Don,

      Your permalinks should take the new mapped domain name. Is this only old permalinks after you’ve mapped that are doing this or does this include new permalinks as well? Have you attempted to disable permalinks and re-enable them? If all of those fail, you can attempt to do a find and replace in the database for your links. There are plugins out there that handle this for you. I believe we’ve even had to do this once or twice on projects in the past.

      Best of luck!

      April 4th, 2014 at 6:43 pm Reply

      • don

        thx Mike, fixed the (blockhead) problem – for all facing similiar problems:

        I am using WPMS 3.8.1, german Version. Hint: in the german WPMS Version the Networkaccount has a pretty unlucky translation for the sites. Pages and Sites are both translated with “Seiten”. So be aware, that the “Seiten” within the Network Account are the “Webseiten” where you can edit all preferences.

        1) when setting up more domains for mapping: be sure to check the primary checkbox
        2) Editing the WPMS sites in the Networkaccount: check if you set the “home url” to your new domain. In earlier versions it was possible to setup this in the specific domain “tools” menu too.

        April 5th, 2014 at 7:36 am Reply

  18. Andreza


    After I have configured the plugin and mapped to my domain, I got this message when I acess my site: (the domain is

    Internal Server Error

    UID of script “/home/httpd/html/index.php” is smaller than min_uid

    suPHP 0.6.3

    Please, help.

    April 11th, 2014 at 5:14 pm Reply

    • Mike Smith

      Hi Andreza,

      Sounds like it’s a file permission issue on your server. I would recommend contacting your hosting provider immediately and they should be able to help.

      April 11th, 2014 at 5:21 pm Reply

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>