The Ultimate WordPress Multisite Domain Mapping Tutorial

Anyone who has tried to map domain names to multiple sites within a WordPress network has probably encountered a few issues.  This process isn’t exactly the easiest thing to do.  Why is that?  Well, the primary reason mapping domain names with WordPress is difficult is due to the lack of a physical file structure and how WordPress uses permalinks (read more about WordPress permalinks here).  Your domain registrar will require you to properly point your domain to a physical location, e.g. http://mysite.com/subfolder/ – which is typically fine unless you’re using WordPress because technically, that path doesn’t physically exist.  So how does one get around this?  With a WordPress Multisite Domain Mapping plugin.

In this tutorial, I’m going to describe what the WordPress MU Domain Mapping Plugin (written by Donncha O Caoimh) does and how to properly configure it within a WordPress multisite network.  I’ve tried to write things out as detailed and as simple as I possible can.  If you’re a tinkerer and you’re stuck, feel free to drop us a comment on this article and we’ll get back to you as soon as we can.  We love helping out.  If you’re REALLY stuck, you might consider hiring us to work on your setup.  Other users have and we’ve made their domain mapping setups work perfectly.  Contact us here and we’ll get your WordPress network mapped properly.

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 http://fronterahouse.com/ 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. “www.mysite.com” or “mysite.com”), 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?  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

7Articles 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.

51 Comments


  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 http://www.mydomain.com/somepath1 to a site in my MU setup using the Domain Mapping plugin.

    I’ve set the the mapping so that;
    domain.vic.gov.au
    domain.vic.gov.au/somepath
    http://www.domain.vic.gov.au
    http://www.domain.vic.gov.au/somepath

    are all mapped to the correct site ID. I’ve got the owners of the domain to point domain.vic.gov.au/somepath to the server IP.

    However, when I go to the URL domain.vic.gov.au/somepath 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 domain.vic.gov.au/somepath 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 domain.vic.gov.au/somepath 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 domain.vic.gov.au/somepath 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: http://www.alandracl.com (registered with godaddy)
    2nd domain: http://www.thesussexdeal.com (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 thesussexdeal.com:

    thesussexdeal.com 43200 SOA ns1.mediatemple.net. dnsadmin.mediatemple.net. (
    2013090501 ; Serial
    10800 ; Refresh
    3600 ; Retry
    1209600 ; Expire
    43200 ) ; Minimum TTL
    thesussexdeal.com 43200 NS ns1.mediatemple.net.
    thesussexdeal.com 43200 NS ns2.mediatemple.net.
    . thesussexdeal.com 43200 A
    * . thesussexdeal.com 43200 A
    ftp . thesussexdeal.com 43200 A
    mail . thesussexdeal.com 43200 A
    www . thesussexdeal.com 43200 A
    . thesussexdeal.com 43200 MX 10 mail.thesussexdeal.com.

    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: 205.186.142.100
    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 http://www.thesussexdeal.com and http://thesussexdeal.com (as primary) to site ID 2.

    When I visit http://thesussexdeal.com/ 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

      Alex,

      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 http://www.alandracl.com/ 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 http://www.alandracl.com/, I get the IP of 54.200.1.196, which doesn’t match the IP that you have set for http://www.thesussexdeal.com/ of 205.186.142.100.

      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 ns1.mediatemple.net and ns2.mediatemple.net 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

    Hi,

    excellent tutorial, best I found!

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

    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 http://www.bouwvrijheid.be they should actually arrive at http://www.ervaardekracht.be/evelynverlinde/ (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 http://www.bouwvrijheid.be 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?

    Thanks!

    September 17th, 2013 at 4:25 pm Reply

    • Mike Smith

      Wouter,

      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 http://www.bouwvrijheid.be 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

        Hi,

        thanks for the reply!

        Do you mean that I also need to install wordpress on the pointer-domain http://www.bouwvrijheid.com?

        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 http://www.bouwvrijheid.com points to the root folder of the WordPress installation for http://www.ervaardekracht.be.

          For instance, if the path in your hosting for http://www.ervaardekracht.be is: /var/usr/public_html/ then when you added the domain http://www.bouwvrijheid.com 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

            Hi,

            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.

      http://eppand.com/use-htaccess-to-redirect-non-www-to-www

      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 domain1.org and one of the secondary domains be subdomain-a.domain2.com. A further complication is that domain2.com 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 maindomain.com which is where the multisite is housed, and then additionaldomain.net which is a site on the network with a domain mapped to it. If you change maindomain.com to primarydomain.org through your host, would that effect additionaldomain.net?

    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 http://dolmarva.com/maps/ and the separate domain is http://www.dolmarvadesign.com/

    Thanks!

    December 10th, 2013 at 9:12 pm Reply

  12. Bob

    Hi, have you a solution for the following permalink problems?:
    http://stackoverflow.com/questions/21479095/permalink-problems-with-wordpress-multisitesmultidomains
    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 – http://puu.sh/7rdHc.jpg

    More screenshots
    http://puu.sh/7rdN6.jpg
    http://puu.sh/7rdPC.jpg
    http://puu.sh/7rdXR.png
    http://puu.sh/7re3e.jpg
    http://puu.sh/7re5B.jpg
    http://puu.sh/7rdHc.jpg

    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 using just “pregnancytips” instead of using “pregnancytips.us”? 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 pages.stolaf.edu/broadeningthebridge and I’m trying to map broadeningthebridge.org to it. I have both broadeningthebridge.org and http://www.broadeningthebridge.org in the domain mapping. The www version is set as the primary.

    When I go to http://www.broadeningthebridge.org or broadeningthebridge.org, I end up at the pages.stolaf.edu homepage. However, when I go to https://www.broadeningthebridge.org or https://broadeningthebridge.org, 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 http://www.broadeningthebridge.org and you should be OK.

      March 24th, 2014 at 9:19 pm Reply

  15. Thomas Imlauer

    Hello

    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?

    Thomas

    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

    Hi,
    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 http://www.Domain1.com/Domain2/….

    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

    Hi,

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

    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

  19. Meredith

    As others have already said, thanks for this tutorial! It’s pretty comprehensive. I got as far as the Very Last Step, when I got a 404, because the new primary domain I selected (www.mysite.com) ends up looking for the WordPress folder and file: wp-admin/tools.php?page=domainmapping&updated=primary.

    If I remove the redirection in my cPanel (pointing from http://www.mysite.com to the subdomain.wordpressinstall.com), then the old page loads (with its files in a different folder, not within the WP install), but none of the images do.

    Did I set something up incorrectly involving the CNAMEs or whatnot? That’s about the only part I’m not entirely clear on.

    I’m hoping to have this domain (which I have set up as an Add-On Domain in my cPanel from ages ago, since I have it hosted using the same space as a different domain) point invisibly to the WordPress install, rather than show the WordPress Multisite Wildcard/Subdomain path in the URL.

    Any clarity you can provide would be much appreciated!

    May 4th, 2014 at 5:20 am Reply

    • Mike Smith

      Hi Meredith,

      The reason it looks for this path: wp-admin/tools.php?page=domainmapping&updated=primary is because this is the page and query parameters used when you update the domain mapping plugin to set the domain you filled into the primary field as primary. The reason it shows a 404 is because the redirection is broken and points a location that it can’t find.

      I see later on you state that it’s an “add-on domain” in cPanel. Typically when using cPanel, you want to park the domain so that it points to the root location where your WordPress is installed, provided you actually installed WordPress at the root. It sounds like you might have WordPress installed in a subdomain location of your main domain and that generally isn’t the default setup for this, but as far as I know can work so long as the DNS is setup properly.

      It’s tough for me to accurately know what’s going on with your setup without more information, but I would say that the redirection itself, perhaps at the DNS level is incorrect. Just note that when you go changing DNS settings, you won’t see those changes happen instantly. They can be one of the most frustrating problems to have. Manually flushing your local DNS cache can help your local computer accept the DNS changes made at the server level, IF they’ve already propagated to the server you pull DNS from. Good luck and hopefully you get this resolved!

      May 5th, 2014 at 3:15 pm Reply

  20. ghulamjafar2

    Hi
    I think “copy” and “move” are two different functions.
    It seems that you (author of article) has mixed up them in step two (no:5).

    May 12th, 2014 at 10:25 pm Reply

    • Mike Smith

      It could be “copy” or “move” in this instance. Either way, the files on your file system need to match up exactly as shown in the screenshot. They could be copied from an alternate location or moved. :) Thanks for the input!

      May 12th, 2014 at 10:30 pm Reply

  21. Dave

    Thank you for the excellent tutorial. It allowed me to get my additional site up and running in minutes.

    May 31st, 2014 at 7:38 pm Reply

    • Mike Smith

      Awesome, David! Thanks for letting me know and glad to hear it worked well for you.

      May 31st, 2014 at 7:44 pm Reply

  22. Dave

    Mike, I may have spoke too soon. One thing I failed to try is to login logout again. I am getting a “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” It seems to be a common issue with the domain mapping plugin.

    I may have found the solution on the codex, which says to the following:

    Add the below to your ‘config.php’ and leave it in there –

    define(‘ADMIN_COOKIE_PATH’, ‘/’);
    define(‘COOKIE_DOMAIN’, ”);
    define(‘COOKIEPATH’, ”);
    define(‘SITECOOKIEPATH’, ”);

    I am new to nignx, so not sure where to locate config.php.

    May 31st, 2014 at 11:02 pm Reply

    • Mike Smith

      Hi Dave,

      Yes this is a common issue and has happened to me before as well. I added those lines you’ve mentioned before into our wp-config file and then had to comment out define(‘COOKIE_DOMAIN’, ” ); to get ours working properly. Not sure if you’ll need to do the same. You can find the wp-config.php file in the folder which you’ve installed WordPress.

      June 16th, 2014 at 8:53 am Reply

  23. Richard

    So my current setup is that I have my sub blogs as subdirectory installs. I have remote login unchecked, permanent redirect checked, user domain mapping page enabled, and the last two unchecked. I am using server IP address. I added the new domains properly as you said.

    My domains and hosting are set up with the hosting provider, so they’re together in the same place. The A names seem to already be set pointing to the IP address I set on the settings page of the domain mapper plugin

    However, the domains that I want to map are mapped to different public_html folders in the same server. Do I need to have the hosting provider change the public_html folder of the other domains to point to my primary domain’s public_html in order for this to work?

    July 8th, 2014 at 10:39 am Reply

    • Mike Smith

      Hi Richard,

      Yes, you’re correct. You need to point all of the domains you want mapped to the root folder. If that’s /public_html in your case, map it to that. On some hosts, it’s simply “/” – root. The reason they need to be mapped to the root is because your WordPress install is there and when the domain mapping plugin loads, the plugin will handle the traffic from that point on to forward it to the correct site.

      Hope that helps!

      July 8th, 2014 at 11:14 am Reply

  24. Richard

    Mike, thank you for your speedy reply! I greatly appreciate it.

    July 8th, 2014 at 12:06 pm Reply

  25. Johan

    Thanks for this.

    I have never used www.

    My problem is that I am trying to move a domain to a new site, but the domain name continue to default to the old subsite.

    I have explained it all here http://wordpress.org/support/topic/migrated-domain-to-new-subsite-old-site-still-shown-after-mapping-of-domain

    After reading your post I add www. one of the domains I used on the site and when I used http://www.capeholidays.co.za it mapped correctly. But not the ones I used; http://capeholidays.co.za is currently mapped over the new subsite but defaults to the old subsite.

    Regards

    August 1st, 2014 at 8:08 am Reply

  26. Johan

    My issue was cache. I thought I cleared it but I did not. BLOND.

    August 1st, 2014 at 10:25 am Reply

  27. Sachin

    Got an error on newly mapped site

    Warning: Creating default object from empty
    value in /home/dindianw/public_html/wp-
    content/sunrise.php on line 31

    any solution for this?

    August 4th, 2014 at 9:26 am Reply

  28. AM

    Hi Mike,
    Thanks so much for your tutorial. It took me the whole day to figure out how to map my different domains names and your tuto is the only one working.
    In fact, my provider said that I had to reinstal wordpress in different folders, but this did not work. I’m glad I found you !
    Cheers
    AM

    August 12th, 2014 at 9:07 am Reply

  29. AM

    by the way Mike,
    I created two sites following your tutorial. One of them provides absolutely normal urls (looking like domain.com/portfolio/name-of-the-item), but the ‘original’ site now has a “blog” kind of slug which did not exist before

    domain.com/blog/portfolio/name-of-the-item

    Any idea why?

    August 12th, 2014 at 11:01 am Reply

  30. Savvy Shopper

    Thanks for the wonderful and REALLY detailed tutorial! Do you have any plans to update it for WordPress 4.0? The directions provided from wordpress.org are different than those in your tutorial and make no mention of the plugin you wrote about – is this plugin still needed with WP 4.0 multisite?

    I’m trying to get subdomains setup. My domain is registered at GoDaddy and DNS is properly setup to point to my hosting account at hostgator. First I installed WP on my domain ebess.com. I set up the permalinks and then disabled all plugins. I have gone into cpanel in hostgator to add wildcard subdomains for ebess.com in the way of * being the subdomain and the document root set to /public_html/ebess.com

    I have modified my wp-config.php file to turn on Multisite. I then went back to my WP admin and went to Tools|Network Setup and specified ‘subdomains’ as the type of WordPress multisite I wanted. After I applied these changes I got an error of:

    “Warning! Wildcard DNS may not be configured correctly!
    The installer attempted to contact a random hostname (48592d.ebess.com) on your domain. This resulted in an error message: Couldn’t resolve host ‘48592d.ebess.com’
    To use a subdomain configuration, you must have a wildcard entry in your DNS. This usually means adding a * hostname record pointing at your web server in your DNS configuration tool.
    You can still use your site but any subdomain you create may not be accessible. If you know your DNS is correct, ignore this message.”

    I tried entering test.ebess.com in safari’s address bar and it took me to my ISPs dns not found with their search engine’s results for test.ebess.com. I also noted that the address bar had changed to http://www.test.ebess.com.

    I then tried entering http://test.ebess.com in safari’s address bar. This time I got an error of “Safari cannot find the server”.

    I’ve searched the wordpress.org support forums and everywhere else for how to set up WPMU with wildcard subdomains specifically on hostgator and came across several posts that were encountering the same error I have, but all of them resolved their issue by making changes to how subdomains were setup in cpanel (they initially had it pointing to /public_html/ when it needed to be /public_html/domain.com) – but I have already done this and it is still not working.

    I’ve been trying to get this working for 2 days now and am ready to pull my hair out! I tried to create a support ticket on HostGator but, surprise surprise, their support ticket system isn’t working so once you enter all your info and click “Submit” the only thing that happens is the Submit button turns grey and no ticket is submitted (wonderful!). I have now been trying to get HostGator support through Live Chat regarding this issue, but despite the fact that it said the wait time would be 30 minutes (seriously?), I have in fact been waiting for over an hour and a half and still have not gotten a tech to Live Chat with (unbelievable).

    I’m at my wits end with this. Please help me Mike, you’re my only hope

    October 15th, 2014 at 11:22 am 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>