Create as many sites as you want in your network

How to Set Up Domain Mapping for WordPress Multisite

| 123 Comments

If you find this tutorial too difficult to follow, I can set up domain mapping for you. Please see my Domain mapping configuration service.

So you’ve gone through setting up WordPress Multisite, and now you’re ready to start setting up new sites in your network. Only trouble is, you want to use unique domains for your sites instead of using subdomains of your main installation. Well, with a little extra effort, it’s entirely possible.

Install the required plugin

There’s an excellent plugin that will do most of the hard work for you. Install the WordPress MU Domain Mapping plugin and Network Activate the plugin.

Before you proceed any further, there’s a couple of things that you have to do manually. Access your site’s installation, either using FTP or your hosting Control Panel and go to wp-content/plugins/wordpress-mu-domain-mapping/ and locate the sunrise.php file. You must move this file up two levels, to the wp-content folder.

Once you’ve done that, find your wp-config.php file and add the following definition. Add it below your previous multisite rules (i.e. above the “Stop editing” line):

Configure the plugin

Now your plugin is correctly installed and when you head to the Network Admin area you’ll notice a menu under Settings called Domain Mapping. Click on that so that you can configure the plugin.

Getting IP Address in cPanelThe main thing you need to be concerned with is setting the IP address of your server. To find this, log in to your hosting cPanel and on the main page, you should be able to see the IP address of your server in the information on the left-hand side. If you can’t find the IP address, you can get in touch with your host, or use one of many available free tools to convert the web address to an IP address.

If you fill out the IP address, you can ignore the CNAME field. Then, the remaining options are as follows:

  1. Remote Login – Means that logging in to one site will log you in to all sites.
  2. Permanent Redirect – This will create a 301 redirect on your subdomain (as opposed to a temporary 302 redirect) – highly recommended if the domain mapping will be permanent.
  3. User Domain Mapping Page – Creates a new menu in each site which allows that site’s users to map their own domains (instead of being controlled by the network’s Super Admin only).
  4. Redirect administration pages – Means that all administration pages will be kept on the original site’s domain, instead of on the mapped domains.
  5. Disable primary domain check – Means that multiple domains pointing to a single site will be treated as separate sites, instead of redirecting all domains to the noted primary domain (not recommended).

Map domains to your network sites

Now you’re ready to set up the domain for your new sites. You should have already created the site that you’re wanting to map your domain to. At the moment, it will just be a subdomain of your main site – it doesn’t have to be set up or looking perfect – it just has to exist.

Once you’ve purchased your domain, make sure that you set the nameservers for the domain to your hosting account’s nameservers. Then, go to your hosting account cPanel (which all good hosts, including my recommended HostGator, should have) and find the Parked Domains option under Domains.

Add a Parked Domain

Once in there, add your new domain as a parked domain, making sure that the document root shows as the same folder as your WordPress installation (probably /public_html). If you can’t do this (because you don’t have cPanel for instance), you need to set an A record on your new domain that points to the IP address of your hosting server (which you found out earlier).

Now is the final step. You’ll need to know the “Site ID” of the site you want to map the domain to. If you click on Sites > Sites in the Network Admin, and click on the name of the site (as if to edit it), the URL will include the site ID. It will look something like this (where the Site ID is 2 in the example):

Map a New DomainNow back in your Network Admin, go to Domains under the Settings Menu. You’ll see a section for adding a new domain, with three fields: one for the site ID, which you just found out, the domain name and an option whether to set the domain as the primary domain for the site. This is because you can set more than one domain to point to a single site, so you want to specify which one should be the site’s primary domain.

Once you save that, with any luck (and assuming that DNS changes have propagated), if you go to your new domain in a web browser, you should find yourself at your new site.

I’ll grant you that it is a little bit fiddly, and it would be nice if WordPress would bring this into the core and make it a bit more of a fluid process, but once it is set up, you never need to look at it again; the plugin will keep serving up the right site at the right domain.

Did you manage to get through the setup process? Did you encounter any problems? If you need any help getting through this process, you can always ask a question here, or hire me to do it for you.

Categories: Plugins, The Basics | Permalink

What next?

Hire me

If you couldn't quite manage this yourself, find it too intimidating, or just don't have the time to do it, you can always hire Dave to do it. Please get in touch so that we can discuss your needs.

Leave a comment

If you have a question, update, or comment about the tutorial, please leave a comment. I try and respond to every comment, though it may take a few days, so please check back soon.

Let a WordPress Expert help you

Do you want to try this, but feel like you need a helping hand, in case something goes wrong? My service, The WP Butler, gives you access to WordPress expertise whenever you need it. Better yet, I'll keep your site backed up, updated and secure, so that you don't have to worry about it. It's all part of the service. Use coupon DIWW and save 15% on all plans.

Visit The WP Butler

Author:

Dave has been tinkering with WordPress for many years, and he now shares his WordPress knowledge here on Do It WIth WordPress to help others realise its impressive power. He can also be hired to help with your WordPress needs. Dave, who is British, is married to his best friend, Marti, with whom he has a beautiful daughter, Ellie. When he's not dabbling with WordPress, he's probably eating Triscuits or hummus, watching an indie film or British TV show, spending time with friends or family, or exploring the world.

123 Comments

  1. Thanks for the tutorial Dave, I fairly recently spent a considerable amount of hours trying to get domain mapping to work for one of our WordPress networks. I failed to ever get it to work correctly. They were all working fine as sub domains but when trying to map other domains we had purchased, it just wrecked havoc with it all.

    I attempted to reach out for help with it at the time due to the mass of conflicting information and tutorials online that I had found but didn’t really find anyone that actually knew how to get it working properly unfortunately.

    I was not aware of the parked domain option (we use Plesk on our servers so will have to check if it even has that option), but I did previously try and configure the necessary A records as you mention above but for whatever reason, I couldn’t get it to work.

    This tutorial, which is at least ‘up to date’ with recent WordPress updates and changes to the MU platform has inspired me to give this another go though now. I’ll give it another shot this week, and if I encounter issues, I report back with the issue if you don’t mind.

    Thanks.

    • I’m glad this has inspired you to have another go at getting WordPress Multisite working as you need it. I took a look at that question you posted and it seems that this is what you need. I’ve never worked with Plesk, but so long as you can set an A record on the new domain that points to the server hosting your WordPress installation and the domain mapping plugin has your domain listed and attached to the correct site, then it should work. Give it a go and let me know how you get on. Good luck!

  2. Hi Dave, thanks for your reply. I’ve got to the stage where I have the WordPress install and the new domain (both set up on the same server so it’s the same IP). Everything is done apart from the A record. Do I go into the new domain and set an A record up or go into the domain that holds the main WordPress install and set up an A record?

    In Plesk, I can go only set up A records pointing to the same domain.

    Currently I have:-

    domain.com (main WordPress MU) hosted at IP 111.111.111.111
    subdom.domain.com set up as a site within WordPress MU

    and

    newdomain.com (purchased domain) also hosted at 111.111.111.111 with nameservers pointing to my custom nameservers at 111.111.111.111

    It’s just the mapping of newdomain.com to subdom.domain.com that I can’t get working.

    All is set up in WordPress MU including the Domain with Site ID.

    Frustrating. Heh.

  3. Think I’ve identified the problem Dave. Multiple instances of WordPress on the same IP.

    I’ve got multiple domains using WordPress on the same server IP as I hosted WordPress MU on, so when my new domain is being mapped to the server IP via an A record, it is displaying the wrong WordPress website at the domain rather than the virtual sub domain (site within WordPress MU).

    I’m assuming the issue is related to this WordPress support discussion.

    • Hmmm, interesting. I don’t know enough about the issue, especially since you’re using Plesk, of which I have zero knowledge, but I appreciate you linking to the support thread. Did it ever recommend a solution that you’re able to work through?

      • I’m still persevering with this, it’s not quire functioning correctly yet but working with our web hosts to get this sorted – will report back as soon we can select which WordPress install to use on same domain same server IP basis :)

        • If its any help to you, sometime with using Plesk you have the option to use BIND DNS or use your hosting providers. Take special note that if it isn’t working it could also be because the settings your entering into your DNS Zone File that they’re actually not updating. LOL

          To those of you who might not remember this I’d take special note about this regarding Plesk. You can typically check under the Plesk Admin to see if you have enabled this feature. Typically on a dedicated server its many times unnecessary to have this installed since it consumes and enormous amount of server resources.

  4. A very detailed guide, Dave. I think that the setup of domain mapping should go easily. The Remote Login option is just brilliant.

    • Have you tried the Remote Login option? Were you able to activate it? For some reason, no matter what I do, I can’t activate on my site, so I’ve never been able to take advantage of it.

  5. There’s an ebook here with complete instructions, including for some popular host and yes even the Plesk issue. ;)

    http://wpebooks.com/professional-domain-mapping/

  6. Just a quick note, you need to move sunrise.php up TWO directories to wp-content. It’s originally located in /wp-content/plugins/wordpress-mu-domain-mapping.

  7. Thanks for the great instructions! I’m leaning toward my first MultiSite install for a client after reading up on your blog. :)

    Related to domain mapping, I’m wondering if this has any effect on SEO for the mapped domain versus the original subdomain? I’m assuming since I’d be using 301 redirects that there wouldn’t be a negative impact, but just curious if you knew.

    • First of all, if you map your domains immediately after you create each site, you’ll never need to use the subdomains and the SEO won’t be an issue because the site will have never used the old addresses. If you do use the subdomain for a while and then decide to map a domain to it, you’re right that the 301 redirect will handle the SEO factor and you won’t be penalised at all. All rankings attributed to the old addresses will be password on to the new addresses under your new domain name. Good luck!

  8. Just wanted to let you know that after spending over a week reading all kinds of docs and watching video demos as I tried to get my wordpress multi-site and domain mapping to work, and after being told at 11pm last night by tech support at Bluehost that it wasn’t possible, it was the simple info ‘add your new domain as a parked domain’ that was the secret to success!!! By default all domains I’ve bought and pointed to bluehost were
    addon domains, but once I unassigned and then parked them, I was able to map the domain with the plugin and see it in my wordpress network. Everything is going to be much easier from now on and I want to THANK YOU!!!

    • You’re quite welcome. It’s usually the small things that you overlook that tend to be the sticking point. Glad you were able to diagnose the issue and move forward.

    • Michelle and Dave,

      Can you help me? I’ve installed WordPress Multisite on http://phxit.org, my primary domain on Bluehost. I’ve created a new site in this subdirectory http://phxit.org/rush, and then used Domain Mapping to map the domain Startr.org (a PARKED domain on Bluehost) to map to this same directory. However, when I type Startr.org in my web browser, it brings me to this directory: http://phxit.org/rush. Why won’t it map to Startr.org, my nice clean domain?

      Thanks,
      Matt
      PS. Michelle, like you, I’ve been through SO MANY docs, videos, tutorials, and a few hours on the phone with Bluehost. I’m losing my mind !

      • Your parked domain should be in the same directory as your main WordPress installation. Point it there and see if that solves it.

        • Dave,

          Thank you for your time here. To my knowledge, my domain Startr.org is parked in the same directory as the WordPress installation, phxit.org, which is my primary domain on my Bluehost account and also where I’ve installed WordPress multisite. However, it’s hard to be sure because I can’t find an area in the Bluehost cPanel that gives me an option to “point” a parked domain a directory. The closest thing to “pointing” that I can find is in my DNS Zone Editor where I am able to add a new DNS record. Given that there is no clear way to point Startr.org to any subdomain or subdirectory, can I assume that it’s pointing to the /public_html directory?

          • As I recall, Blue Host has a separate control panel for domains, if it’s not in cPanel under Domains > Parked Domains.

          • Hello Everyone,

            Unfortunately, I had no luck trying to get WP Multisite + Domain Mapping + Bluehost to work. Maybe it’s because the domain in which I hosted my Multisite was not the primary domain on Blueshost. I don’t know. But I tried to solve this problem for 6 weeks by reading every tutorial, message board, and YouTube video, and finally I just gave up.

            My solution now is not as robust and manageable, but it works. I simply have multiple WordPress installations on Bluehost. Now I’m back doing what I wanted to do in the first place: publish.

            I hope to fuse these blogs together with a single admin panel sometime down the road.

            Hopefully down the road

          • I’m sorry to hear that you weren’t successful Matt. You should still be able to have Multisite, even if the domain you’re trying to install it on is not the primary domain on the hosting account. Just make sure that all of your parked domains point to the same directory as your main WordPress installation.

  9. Will this affect SSL on the main domain?

  10. Successfully set up my network thanks to your great tutorial! About to proceed with the domain mapping, but a question….

    I’m setting up my network under a development URL that’s different from the final URL. Maybe a stupid question, but do you foresee that I’d run into any mapping problems once I switch over to the final URL?

    • I’m going through the same thing right now. You might encounter some issues and to be on the safe side, you should wait if possible. If not, everything can be changed, but it might require a few database edits to make sure that everything is configured the way you intend it.

  11. I am trying to get this setup. I am trying to use esther-conference.com to map to test.jatekweb.com I can’t seem to get it to work. When I go to esther-conference.com, I get “Great Success !
    Apache is working on your cPanel® and WHM™ Server”.

    Any ideas?
    Thank you!

  12. I’ve just started working on a multisite project that was started by the previous web guy at my company.

    We’re using Fasthosts for hosting a just general shared web hosting.

    We’re looking at implementing multidomain for the wordpress 3.1.1 multisite install but wasn’t too sure if it was possible on shared hosting?

    • Yes, that’s not a problem. My network is on shared hosting also. You just need to make sure that your hosting package will allow for the number of parked domains that you will be using.

  13. Scott’s questions brings up a question for me about SSL. Will the SSL I have for my main domain, where my MultiSite network is, work for my subdomains in the network?

    • I’m honestly not sure. I’ve not worked much with SSL before. I would think that SSL covers the entire domain, but if you’re using domain mapping, it’s probably not covered, since you’re using a new domain.

      • Hi – thanks for the great write up on Domain Mapping! I can confirm that SSL will *not* work on the subdomains of your WPMU Network. (I’ve been testing with some gracious friends).

        As such, I’ve been looking at wildcard SSL certificates (which protect all your subdomains), but they range in price from around $100-$500.

        I don’t know why there is such a range though.

  14. Hi, Dave.

    I tried your tips and they did the job fantastically. The only problem is this:

    Let’s say that I have example.com as main domain and acme.com as mapped domain.

    Whenever I go to acme.com, after having configured wordpress multisite properly, I notice that it redirects me to acme.example.com.

    Yes, I am able to edit the content of the mapped domain: acme.com from the wp dashboard, but is there any way acme.com would stay acme.com (instead of redirecting to acme.example.com) while it also being part of a wordpress multisite?

    Thanks!

    • Yeah, something’s not right. What you’re trying to achieve is what should be happening, but it seems that your site is working in reverse (mapping the custom domain back to the subdomain). It’s odd that it allows you to do that in the backend though. What are your settings in the Domain Mapping Plugin?

  15. Quick thing that I need clarifying. I want to have “site.com” with a staff blog at “staff.site.com” which is straightforward. But I also need a mapped “life.com”. Enabling mapping doesn’t remove the ability to have wildcard (staff.site.com) domains does it?

  16. Dave, for all I can tell I have a new scenario that I have been busting my brains over for the last few weeks.
    I have a domain with an up and running subfolder multisite website at gangleri.nl.
    I have a domain at another host with no hosting monas.nl.
    I want to use monas.nl for a new website that I have set up in a domain of the website that I do have hosting for thus: monas.gangleri.nl. The DNS of monas.nl point towards that subdomain, but what I actually want is monas.nl to be a separate website with urls as monas.nl/postname (rather than monas.gangleri.nl/postname). For the past few weeks I have tried PHP codes, htaccess redirects and rewrites, DNS settings and whatnot and the more I tried, the less I understood. Then I had the brilliant idea of mapping. Supposedly I can use the domain mapping plugin when I edit the https.conf file, but I am not allowed to do that, so I figured I’d just set up a network and map that. No success… I created a new subsite in the new network (ID=2) set it as ID 2, monas.nl primary; nothing happens. I have no idea what to use under the tab “domain mapping”. Of course I have an IP for the server that Gangleri.nl is on, but not for monas.gangleri.nl (it is, of course, the same). When I use it, nothing happens. The CNAME option doesn’t save.

    Probably I have to do something in the DNS settings of the domain name monas.nl. It now has an URL forward to monas.gangleri.nl. When I make an A-record with the IP of the server of Gangleri.nl nothing works. I might have to do something in the DNS settings of Gangleri.nl, but I have no idea what (I have tried a couple of things, but I’m pretty much shooting in the dark).

    I don’t have a clue. I haven’t had until I started to find out what I had to do. In short, I have a network in a subdomain which I want to map to a domainname registered elsewhere. Any thoughts?

    • OK, there’s a lot of information there, but in short this is what needs to happen. Set the nameservers for monas.nl to your hosting server. Park the monas.nl domain on your hosting server. Create the new site monas.gangleri.nl. Set the IP address of your server in the domain mapping plugin (no need to worry about CNAME). Set monas.nl as the primary domain for the site and everything should work as you want it to.

  17. Dave, thank you for your reply. I looks like my host has wonderfull specifications for serverspace, traffic, etc., but two domains for one hosting pack is out of the question. I guess that means no addon or domain mapping.
    I’ll continue my search, but perhaps I’ll just move my domain.

  18. Thanks for these great Tutorials. I’m nearly there, but for some reason I can not create a new site. I made one of my sites a parked domain, and now when I go to it in a web browser, it shows the main network site.

    I guess I’m just stuck.

    If I go under sites, add new site, I get Missing or invalid site address.

    Any tips? I have a shared IP with bluehost.
    thanks!

  19. Hello Folks,

    I’m working with the latest WP version (3.4) sub-domain setup and Plesk 10.4, and even thought I was able to see the correct domain mapping, and suggested A record at various locations it all failed, and I discarded the domain mapping plugin and found an alternate.

    Have not given it any thought right now about SEO, but I suppose it’s OK, since it’s a fresh site, but here is what worked for me.

    I added the domain without hosting via Plesk (that takes care of the DNS and name-servers management), and after that I just clicked on the domain and Plesk then offered domain forwarding options.
    So, I entered the wp site sub-domain address to be forwarded too, and then I chose Frame Forwarding, so that the intended domain shows in the browser address field, instead the sub-domain.

    This worked instantly without a hitch, and until somebody will tell me why that is a bad idea, I’ll stick with it, and perhaps others will try it as well. This works, regardless that I have more WP networks on my cloud server with the same IP address. No conflict, no issues so far.

  20. Aw man – I think I have a similar questions to Jan!

    I think there’s something wrong with how I setup the mapping, everything else seems ok. I did get a notice when I installed WordPress MU Domain Mapping that it hadn’t been tested with my version of WP (3.4.1). Don’t know if that’s the issue…

    I’m using Host Gator Business plan. I have multiple unique websites. They’re all built in Drupal now, but I am going to start fresh and redo them in WordPress.
    So I followed all your instructions (from this page, and the one prior to it (How to Install & Setup WordPress Multisite). I set it up as a subdomain (not subdirectory) network.

    I have site1.com as my primary domain. And now I want to add site2.com.
    1. added site2.com as a parked domain (also updated DNS to point to HostGator)
    2. in Domain Mapping, I got the server IP Address and under domain options I have everything selected except “Disable primary domain check….”
    3. Added “new domain” – got the site id per your instructions, added site2.com as the domain, and selected “primary” box.

    When I went to site2.com, it showed site1.com.. so then I went to add sites, and I added:
    site2.site1.com

    When I Type in site2.com it goes to site1.com and says “Registration has been disabled.” and the url says “http://site1.com/wp-signup.php?new=myanmarstaffing.com

    If I got to site2.site1.com it goes to my site…

    Halp! Thanks in advance. I’ve been searching like crazy for tutorials, and yours is by far and away the most comprehensive. Most people seem to get everything setup just fine – so I guess it’s me!

  21. The problem was that I used the wrong site id (doh!) when setting up the new domain….

    Thanks again for your tutorial. I NEVER could’ve set my sites up without it. Now it’s all easy-peasy easy going.

  22. Apparently this doesn’t work if WP sites are in a sub-directory, like mine are, because I wanted to keep a static index.html as the main page of my site and then develop WP sites in subdirectories. (Index.php and index.html couldn’t live happily in the same folder when I tried to develop WP multisite in the root). If anyone has a workaround let me know!

  23. Ahoy hoy!

    I have somewhat of a dilemma that I am hoping you may be able to help me with.

    so I have:
    mydomain.com

    I set up the network and added
    mydomain.com/book

    As another site.

    I need this sub-directory to point to a different IP. I know DNS sub-domain is the ideal way to go about this – however because of the way the service on the other server is set up its not really an option. It seems like there’s gotta be way to accomplish this somehow with the plug-in…but I cant quite figure it out. Maybe I just missed a step?

    Let me know what you think!

    Cheers,

    Nathan

    • Well, why does it need to point to another IP? If the site needs to be hosted on another server, then you won’t be able to use WordPress Multisite, as that runs multiple sites from a single installation of WordPress (i.e. on one server).

  24. Hello Dave,

    I’m trying to setup Google Apps for domains that I’ve bought through BlueHost, but I don’t have hosting for those accounts, because I am pointing the DNSs to my MultiSite network, which is hosted on HostGator. Are you familiar with Google Apps for email. And if so, how could I set this up?

    Thanks again for a great article!

    • Yes, it really doesn’t matter whether you have hosting with Bluehost – the only thing that matters is that you own the domain. If you own the domain, you can edit the DNS for your domain. Somewhere in Bluehost, you’ll find an option to manage the domain, or edit the DNS, at which point you can make the changes that are needed for Google Apps. However, if you have your nameservers pointing to HostGator (instead of just an A record), then you need to add the records in HostGator, not Bluehost.

  25. Dave, thanks for the tutorials. Your willingness to help newbies is greatly appreciated! I can follow everything on this tutorial in terms of setting up the primary domain as WPMU and mapping a parked domain. However, can that parked domain also have subdomains as a WPMU?

    For example:

    Primary domain set as WPMU: give.com
    Sub-domain: staff.give.com

    Mapped Domain also set as WPMU: life.com
    Subdomain: staff.life.com

    If the answer is yes, then I think I’m ready to give this a try.

    Thanks,
    James

    • I’m not sure exactly what you’re looking for, but if you’re saying that you’ve mapped life.com to a subdomain of the main WPMU install (give.com) and you’re wanting to know whether you can map subdomains of the mapped domain to new sites on WPMU, then I’d say that you probably can, though I have never tried this, so it would be a case of trial and error. Maybe you would need to create the subdomain in cPanel and make sure it points to the root folder of your WPMU install. Good luck and let me know how you get on.

      • Dave, thanks for the reply. All of the instructions worked, but as I suspected it appears the mapped domain cannot have individual sub-domains with content (it just redirects the mapped domain).

        That’s a bummer because the only way to have sub-domains on a site is to have a dedicated cPanel account (i.e. separate host account for each domain), and that can be costly.

        For example, if you have 10 domains that you want to convert to WPMU in order to set up sub-domains at ~$130 per year per main domain, that would be $1,300 per year. I guess that is not bad if you are making enough to cover the cost, but it would take time to get there.

        Thanks for your help. Best wishes with your business.

        - James

  26. Hi Dave,

    Thanks for the nice tutorial. I actually created a network in the early 2012 and it took like 4 weeks to get it working just right. There wasnt this clear info how to do it at that time (Atleast didn’t find heh). Now creating a new network for my startup business and this information was crystal clear so thanks!

    Oh and Hostgator support has been awesome regarding to MU related issues.

  27. Thanks so much for this tutorial. I was having trouble, after reading a number of other site pages and trying a number of things. This is clarity itself! It helped me resolve my issues.

    One thing I had wrong, and not mentioned here, is a relic “/www” for the home directory in a couple of spots. That led to a redirect loop somehow. In any event, removing that resolved the last of my issues.

  28. I have a clean LAMP install (CentOS 6). When I turn on Multisite, then follow the instructions for pasting the items into wp-config and .htaccess, I suddenly get an “Error connecting to database.” for every page.

    I’ve tried the install with both subdomain and subdirectory types and get the same result. I’ve tried running the repair and I get messages that a number of tables (wp_1_*) cannot be created, although I’ve tested the same user login/create/drop manually on the command line.

    Has anyone else experience this issue and/or have any suggestions on what I might try?

    • If you’re getting the error on every page, there must be an issue with your database credentials in wp-config.php I would think. Another thing to consider is whether your host supports wildcard subdomains (Dreamhost, for example, does not), which might restrict your ability to use Multisite.

  29. hey dave
    great tutorial, looks good an makes sense, i plan to follow it in setting up my own multisite.
    quick ques i see it was written in jan 2012, has there been any significant changes, any new methods of doing this, any new tips or tricks with it?

    im on godaddy with wp hosting v3.4.2, anything i should look out for with them?
    thanks
    noor

  30. Absolute legend!! I never thought of using the Domain Parking feature! I’ve been banging my head on my desk for the best part of a week trying to figure out why my mapped domains weren’t working!!

    THANK YOU!

  31. I’ve got a blog on wordpress.com and want to move it to my multi-site setup. Supposed to be (relatively!) easy peasy – export then import. But not seeing an import option. Tried searching the web and couldn’t find anything. Just want to keep all my old posts with comments, don’t have any registered users or anything else setup.

    Hoping one of the fine folks here can help! Thanks!

    • Mona,

      It should be under Tools > Import, unless you’re on a child site and don’t have the permissions set up to allow that.

      • Thanks Dave. Not sure if that was the problem, or what. But I removed cookies and such so I’d have to re-login. This time I first logged in as the network admin and then it showed up under “Tools.” Or, I’m losing my mind, cause I swear it wasn’t an option before!

  32. Hi Dave, I’m facing a problem on my configuration – I have two sites: site.com and site.com.br DNS’ pointing the same server. Each url serve a different site. The network and domain mapping is correctly configured. The issue appears when the Permalink settings on both sites are changed to “Post name”. I get an ugly “Not Found” error when I try to access a post link. If I get the settings back to “default” they work fine and each post is accessible via site.com/?p=3 , however I’m sensing Marketing will address me with some SEO issues on the near future.
    What do you think is going on here?
    Thanks in advance!

    • Martin,

      It sounds like this an htaccess issue. Can you confirm that the correct htaccess rules are in place? Go to Network Admin > Settings > Network Setup to view the correct rules.

      • Hey Dave, I’ve double checked the configuration and everything is correct. The “blogs.dir” directory is created are the wp-config.php lines were added as well. I’ll share the .htaccess configuration here:

        RewriteEngine On
        RewriteBase /
        RewriteRule ^index\.php$ – [L]

        # uploaded files
        RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^ – [L]
        RewriteRule . index.php [L]

        I don’t know if it should be more specific, it seems like a default configuration to me. The issue is that permalinks are not working properly.

        • Well, yes, but permalinks are enabled by your htaccess rules, so if there’s something wrong with your permalinks (any custom structure other than the default), there’s likely something in your htaccess file causing it. It could also be something with your server configuration. Who’s your host?

          • I have a Ubuntu Server 12.04 installation with Apache 2.2 default virtual host configs. DNS are handled by Route 53, Amazon services. Today I had to clear out the WP multisite installation and install a new single one. After configuring .htaccess and enabling the permalink settings, I’m now facing with the same Not Found error for each post link. I think I’m missing some Apache configuration.

          • Dave, found out the issue, had to modify AllowOverride settings to “All” in my Apache virtualhost.
            Thanks so much for your prompt response!

          • Martin,

            Glad you got there in the end, and thanks for posting your solution here for others to look at.

  33. Hi Dave,
    Just a short note to say “you’re the man!”. Like many of your previous repliers, I was tearing my hair out trying to make sense of all the various articles and tutorials, most of which are out of date. In my case, the control panel had very limited flexibility and parking the domain and pointing it to the correct IP address was a problem. The host’s technical support people said they couldn’t understand why it wouldn’t work. You’re words on the CNAME and the A records gave me the confidence to change deactivate the old A records and create new ones that did the trick. All your instructions were crystal clear and this was the icing on the cake.
    Thank you.

  34. Hi
    I am making a wordpress website http://www.gradeatv.com/ and the sub site is http://www.gradeatv.com/streetwisetoday/.I want to open it as http://streetwisetoday.com but i am unable to config it .I am using your steps but unable to please help me out of that?

    Regards
    Sal

    • The process is the same and works with subdirectories, so long as your Multisite installation is in the root folder of your server and not in a subdirectory itself.

      • Awesome tuturial, Dave :)

        Are you saying that it’s currently impossible to do domain mapping with any multisite install in a subdirectory?

        e.g.:

        /public_html/ /* good */
        /public_html/primary-site/ /* no good */
        /public_html/addon_domains/addon-site/ /* no good */

        To put it another way, is it possible to point a parked domain to a subdirectory of the web root? By default, all parked domains point to the web root–why the hell can’t we config this?

  35. THANK YOU!!!!!!
    I wish I had found your great explanation earlier.
    Now I have a multisite running.
    Cheers
    Danny

  36. Thanks for this great tutorial, I had problem to map domain, cause I did addon domain in Cpanel, now I see I need to do parking.

    Thank you Dave for this help

  37. Dear Dave,

    Great tutorial, thank you for your time and spirit of helping.

    I would like to confirm with you regarding , will Domain Mapping works on Multisite installation on server under subdirectory+addon domain.

    Cheers!!!

    • That’s correct. Domain mapping works with either subdirectories or subdomains.

      • Currently I am in situation as below,
        *exampleB.com is not my primary domain.
        I have an addon domain exampleB.com installed with multisite
        /public_html/exampleB.com/(WordPressFiles)

        as I read through all the Q&A above I believe that DomainMapping only works with ParkedDomains but not AddonDomains
        As ParkedDomains – that pointing to the root,
        it won’t work with AddonDomains that pointing to /public_html/exampleB.com —— ?

        —————————————————————-
        Problem
        exampleC.com(Domain for mapping)

        I follow all the instructions above.
        ParkedDomain – exampleC.com that pointing to root.
        here by I understand that I should point the exampleC.com to the directory that I installed multisite but ParkedDomain doesn’t allow me to do so.

        when I try to access exampleC.com
        It redirects me to exampleA.com that is the primary domain.

        Hard to explain the situation through words, hope that you able to understand the above questions.

        Thanks in advance.

        • Kovin,

          Domain mapping will not work for two different installations of WordPress. There’s just one set of WordPress files and one database, so if you have another installation of WordPress in a subdirectory (exampleB.com), you’ll need to first convert examplea.com to a multisite install, and then export exampleb.com and import it as a new site in examplea.com.

          I don’t understand your problem with examplec.com though, unless you just haven’t created the site and added the domain in the domain mapping menu in Network Admin?

  38. Hi. I just had a disaster experience with dreamhost. I knew they don’t support wildcards, but also read and was told by their support that I could install multisite with subdirectories, instead of subdomains. So I did. Then I had problems with domain mapping because “parking” at dreamhost is different than “parking” elsewhere, eg, bluehost, where I have WPMU installed, but their servers are down a few hours a month, minimum.

    Instead of parking the domain, I was told by a dreamhost rep who monitors the wp.org forum, to host it fully. I did. But the new domain was on a different DNS, so the mapping did not work. The rep fixed this, and the mapping worked. When it happened a week later (after a considerable amount of work fixing paths that had changed, etc), I was told that the DNS of new domains would be assigned to a different DNS, and that it wasn’t a problem. Annoying, as I’d just stated it was a problem and waited a day to be told otherwise. Now I’m told I can upgrade to a VPS. I’m not sure why they think I’d pay them more money when I was told that this could be done in the beginning. Now it can be done for more $? Now that I’ve invested lots of time in this install?? Wow. So, because the info isn’t out there, DOMAIN MAPPING is not possible on shared dreamhost plans.

    You say it’s possible on hostgator and recommend them? Is it possible on shared hosting? The “baby” plan (As “hatched” allows only one domain)?

    Thanks in advance!

    • Hi Cocco, yes wildcard subdomains are fully supported on WordPress shared hosting, but as you rightly point out, you’ll need a plan that allows for as many domains as you need to park on WordPress Multisite. I have numerous clients and my own sites that I have done this with on HostGator, so they’re absolutely my recommendation for shared hosting.

  39. Hi Dave thanks for the advice, I now have the mutisites working, I do have one concern now though. All my site now live at the root folder (parked domains) – how do you go about separating content for each site as there are no individual folders like before with Addon sites, do you utilize the child theme option to organize you site content?

    • Hi Russell, there are two different ways to interpret “content”: there’s the text that forms all of your posts, pages, settings etc. and those are stored in separate database tables (as they would be with two separate installations of WordPress). The other way you can interpret “content” is your uploads: that is, all of your images and documents that you upload. All of that content is uploaded to separate folders under wp-content/blogs.dir. All of your themes and plugins reside in the same common folder, and you can create child themes if you want to.

  40. Hi Dave,

    I am trying to make the WPMU work as you described, on a WP version. The only difference I did was to set the SecondaryDomain.com as “Addon domain”, pointing to the same directory as MainDomain.com. They are both in the same account, so they have the same IP in the Aname record, which should be ok. I also set the SecondaryDomain.com in Settings>Domains as the primary domain.
    The problem is that, when I try to access any page on SecondaryDomain.com (including homepage), it redirects to MainDomain.com . Do you have any idea what could be the problem?

    • Without going through what you’ve done, not really. Any reason you couldn’t add it as a Parked Domain instead of an Addon domain? In Settings > Domains, are both domains pointing to the correct site ID?

  41. This was a fantastic tutorial, kudos! It seems to have worked as intended but when I visit the URL for the mapped domain (in this case aviolinslife.org) it takes me to the subdomain URL: http://aviolinslife.frankalmond.com

    Shouldn’t the browser be showing the primary domain of aviolinslife.org?

  42. I am trying to setup a new, second site via the multisite tool as a subdomain. Our older, existing site (www.example.com) is working fine in the multisite tool.

    From what I understand, there are only 2 things I need to do:

    1) Add an A record via DNS on my Windows Server 2008 for this new domain. http://www.site2.example.com.

    2) Add the domain using the plugin and making sure my site ID is correct.

    Then I can see the dashboard and start making my second site right?

    Thanks!

    • Yes, that should be about the extent of it. Bear in mind that your subdomain is actually just http://site2.example.com, without the www.

      • It worked! Here is quick recap for others like me. Before you add your second wordpress site:

        1) Change your admin panel over to the network multisite tool. You first and primary website should be there. The primary site was already being hosted from our local server.

        2) Create a A Record as a subdomain in DNS for Windows 2008 R2 on local server

        3) Add your second site in the multisite tool per the instructions in this post.

        Thanks for the post!

  43. Thanks for excellent guides on setting up WP Multisite with domain mapping! Just one thing before I get into setting things up – does this still work the same with latest version of WP (3.5.1)?

  44. Thanks for such a great writeup! Everything worked out well except for a bug I suppose? I added my primary domain but sometimes I get a redirect to the main network site.

    Using http://www.domain.com & http://www.domain.com of the new domain works but when linking to the directories:

    http://www.mainnetwork.com/domain/ works
    http://mainnetwork.com/domain/ doesn’t work

    Any reason behind the http version not working?

    thanks!

  45. Hi Dave,

    your guide to WP Multisite has inspired me to switch my existing WordPress site portfolio (over a dozen sites) over to Multisite. My additional sites are all separate .com subdomains running on the same hosting account (Hostgator) ie under the master domain directory, ie master site abc.com and subdomains: eg def.com xyz.com etc.

    When I try to add the subdomains to the parked domains list (there are no domains listed there at present), it refuses and says: “Error, domain is already configured”.

    Looking under subdomains the domains are listed as “not redirected”. Under add on domains they are also listed but also as “not redirected.

    Do I need to remove these domains from subdomains or add on domains first, in order to then add them to the parked domains list?

    • That’s exactly right. You need to remove them elsewhere on the account first so that they can be added as parked domains. It’s a fail safe in CPA el that prevents you from causing DNS conflicts.

      • Thanks for that Dave.

        I had the redirect loop problem for the website of my primary domain (where the MU is installed). I could login to the WordPress admin and MU interface, but the website itself was in a redirect loop http://www.domain.com to domain.com. I couldnt work out how to solve this.

        It would also be good if there was a way to get MU to recognize existing WordPress installations ie database so we don’t have to manually transfer everything.

        In the event I decided to chicken out and deinstall MU at least for now.

        I think installing MU on a dozen or more domains would be too risky for now. I need to find out a bit more about MU and how to handle the problems. I’m also concerned about potential security risks of having all your domains in MU, plus potential plugin compatibility problems. Maybe I’ll come back to it later!

        • It takes some time and a methodical approach, but it’s quite easy to do, and once it’s all done, it makes your life much easier. I don’t know what security problems there could possibly be, and plugin issues aren’t likely these days. Let me know when you’re ready to give it another go ;)

  46. Hi again Dave,

    as an update to my previous comment…

    I’ve just deleted the existing domain in question from the Hostgator add on domains list. Then I was able to add it to the parked domains list without any problem.

    Next I created the domain in WPMU. There was a problem here though. It doesnt seem to accept .com names.

    So I had to enter the domain name without the .com as WPMU refused to create it otherwise. Then in the Network -Domain section I then added it with the .com in the domain name. (the domain exists under public_html as domain.com.

    I now see a brand new WordPress installation when I point the browser to the domain… which isn’t what i wanted. I have an existing WP installation on the domain which I want to keep using, not have it replaced it with a brand new empty domain.

    I’m not sure where it gets the idea from that this is a completely new and empty domain. I looked under public_html, one level higher and also in the domain.com folder itself and I cant see any folder for this new installation.

    I need it to recognize the existing domain.com WordPress site…

    Is there something else I have to do here?

  47. Hi I wonder if you could offer some advice please? I’ve installed and setup a handful of sites using a multisite install (sub domains) and all is working well…the problem I have is that I’d now like to create some pages for my root website but when I browse to the root.com all I get is my admin control panel for my multisite install…..Is it possible to have my parent website active on my root domain….hope that makes sense? many thanks

    • Yes, you should absolutely be able to have an active website on your root domain. It’s bizarre that it is redirecting to your admin panel. Sounds like there’s something else at play.

  48. Hi Dave,
    My host is Hostgator but the structure of my website is quite different. I install the multisite on the subdomain of my main domain, for example:

    dstore.com.tw (main)
    – s1.dstore.com.tw (subdomain of main domain, Multisite)
    – dlabco.s1.dstore.com.tw (created by multisite)

    dlabco.s1.dstore.com.tw is the domain created by multisite. All the sites work perfectly.
    But when I want to map the other domain such as ‘dlab.co’ to dlabco.s1.dstore.com.tw, that doesn’t work.
    I’ve set the parked domain, but the root directory is public_html/ by default, and that will redirect ‘dlab.co’ to dstore.com.tw , not dlab.s1.dstore.com.tw . I’ve tried to modify the root directory to ‘ public_html/s1 ‘ , but I don’t have the authority to change it, neither do the online support man from Hostgator.

    Is there any other method to resolve my problem ? Or did I do something wrong ?
    Thanks !

    • I think that generally speaking, WordPress Multisite only works if installed in the root directory of a website. I think that if you’re very proficient in DNS and htaccess, then there may be ways around that, but I wouldn’t know how to go about it.

  49. Hello, I’m studying this configuration.

    I’m going to do a blog network with wordpress multisite and the plugin “WordPress MU Domain Mapping” to get all the main.com blog / site on site.com. I have some questions.

    - To do this configuration, you need a multi-domain hosting plan?

    - Or just a plan that does not support multi-domain?

    - If I should take from one provider to all top-level domains without hosting plan configuring the DNS. And then you took another provider with the main domain hosting space (does not support multi-domain). The configuration work?

    - With the “WordPress MU Domain Mapping” in the address bar will appear main.com / or site.com site? And in the paths of the images?

    Thank you very much!
    - Alessandro from Italy :)

  50. Sorry if I have explained myself badly.

    - http://Www.main.com (I mean the root domain on which you will install wordpress MU)

    - http://Www.main.com/site1, http://www.main.com/site2 … They are the sites that are created in the directory by wordpress mu

    - http://Www.site1.com, http://www.site2.com …. These are the domains that register, with no space hosting, which must point to sites created by wordpress mu with the mapping configuration.

    I should record http://www.main.com including space at the hosting provider A. And then register all domains (www.site1.com, http://www.site2.com ….) with another provider B.

    I hope that you can clarify your thoughts, because currently I am very confused. Thank you :)

    • Yes, that makes sense. First, you’ll need to install multisite using subdomains, not subdirectories.

      You’ll need to take a hosting plan with main.com, and all of the other sites (site1.com, site2.com etc.) can be registered anywhere, but you don’t need to arrange hosting for them: just point the A record to the IP address of main.com

  51. Ah, there is the obligation of subdomains? Why? The mapping of the domains does not work with a wordpress multisite done with the directory structure? I thought I could use the directory structure to simplify configuration.

    Did you mean to say that the domains (site1.com, site2.com etc.) I can record them on a different provider where main.com register?

    Excuse me, but, using a translator, it is very difficult to understand and make myself understood.

    Thank you for your help.

    • Yeah, the domain mapping plugin only works with subdomains.

      You can get your other domains from a different registrar, but it’s not a requirement. You can either do them all from the same place, or you can buy every single domain from somewhere different.

  52. Your explanation is the clearest I’ve yet found – thanks much for posting this. I’ve gotten through all the steps and have all my sites working, except for one hang up.

    The network admin site is mysite.net (this will not have a public page.)

    I started out using explicit subdomains for each site as suggested, e.g., alice.mysite.net, bob.mysite.net, etc. I have domains registered alice.com, bob.com, etc. I set these up as parked domains under the mysite.net account.

    WPMS responds correctly to incoming urls, that is http://alice.com gets the page that was setup under alice.mysite.net.

    But, the permalinks for site alice are still using the explicit subdomain: alice.mysite.net/pagename, etc.

    I want to hide all traces of the WPMS configuration for the sites – how can I do that?

    TIA

    • Try doing something simple: in each site, go to Settings > Permalinks and just click Save. This will flush your rewrite rules and allow you to start from scratch. It should hopefully then churn out the correct URLs.

  53. Great tutorial…although I couldn’t get it to work until I watched the YT video and saw what was being clicked. Missed a key part of the process that after a few hours of reading and re-reading, was resolved in 5 mins with the video. http://www.youtube.com/watch?v=IElX74ZFVvs

Leave a Reply