WordPress Multi Site Domain Mapping on Shared Hosting

Before you start, you’ll need:

  • WordPress installed in your root directory.
  • To follow these directions from the Codex to enable Multi-Site.
  • The WordPress MU Domain Mapping Plugin – trunk version – from step 1 of this tutorial. Follow the instructions for steps 1-3 there to enable the plugin and get it working.

Step #4 is where things get tricky, and it’s also where things may be different for your own server. This is what is especially difficult about using Multi Site – there is no set formula that is guaranteed to work for everyone.

With that said, these are the steps I took to enable WordPress Multi Site on a shared hosting plan.

  1. Create your sub-site as a sub-domain from the wp-admin panel of your main domain (ie, seconddomain.primarydomain.com). You do this by going to Super Admin > Sites > Add New. Make sure that you can log in and that everything works. I don’t recommend making too many customizations at this point, because it could take a couple of tries to get everything working correctly.
  2. Point the DNS of your second domain name at the name servers of your primary domain. Don’t forget this step, or all you’ll end up with is “Server cannot be found”! This was my mistake, and it took me 2 days to realize it. (Yeah, I can be dumb as a rock sometimes!)
  3. “Park” your secondary domain on top of your primary domain name using your web host’s cPanel. This points your second domain to your first domain without the need to worry about any settings, which is why it’s better than trying to add it via an Add-On Domain. If, at this point, you try to visit seconddomain.com in your browser, it *should* redirect to your primary domain. If it doesn’t, you know you have a problem.
  4. Now you can go back to Otto’s handy-dandy instructions and map your domain name. Essentially, you log into the secondary site and go to Tools > Domain Mapping. This step is what turns seconddomain.primarydomain.com into seconddomain.com.
  5. I recommend you read through the rest of Otto’s tutorial [linked above] before you try any of this.
  6. Keep in mind that you will need to go in and separately set the DNS and “park” EVERY domain name you wish to map this way. This is the drawback of not using the method described in the next paragraph.

Most of the tutorials I read through kept talking about adding A records or CNAMES. Which is a nice way to do it, but essentially requires that you be on a VPS or at the very least have a static IP address. That’s not a feature that’s usually possible on a shared hosting server, though, so that makes it hard to do. Luckily, with the method described above, you shouldn’t need to mess with any of that, even if you WILL need to set up each domain name separately.

Now for some disclaimers:

  • This post is offered without any sort of warranty at all, so follow these steps at your own risk. I won’t be responsible if you mess up your site or your server.
  • With that said, I can try to help if you’re having trouble but I am by NO MEANSĀ  an “advanced” user of WordPress. I’ve merely picked up a few things in the 4+ years I’ve been using it.
  • WordPress Multi Site is NOT really recommended for a shared server install. This is because your provider will get very upset with you if you start creating hundreds of blogs under your shared plan. If, however, you are like me and merely have 4 or so low-traffic blogs that you’d like to keep updated with a minimum of fuss, then this method could work for you(*). But if you are unsure at all whether this will work on your hosting plan, please contact your provider and ask first.
  • And with THAT said: if you *do* use the above post in order to do something crazy like start installing hundreds of blogs, I WON’T be held responsible for that either. Your hosting provider could – and would be completely justified if they did – disable your site entirely if you abuse it. Be smart, and don’t be a dick.
  • (*) If you do only want to host a handful of your own blogs, you’ll want to go into Super Admin > Options > Registration Settings and set “Allow new Registrations” to disabled. This should be off by default (at least it was for me), but it doesn’t hurt to make sure.

I don’t think I’ve forgotten anything, but feel free to ask questions if you think there’s something missing. (It’s late, and I’m tired, so anything is possible.) And for my regular readers, if you’ve read this far: Wow. I’m impressed. Remind me to buy you a drink the next time we meet. Also: we’ll be back to our regular book-blogging mischief tomorrow. Thanks for reading.

10 Replies to “WordPress Multi Site Domain Mapping on Shared Hosting”

  1. Is it possible to do this if you have a separate domain registrar for your domains? An “add-on domain” is something of a host-only term. I have my domains registered with a separate registrar than my host (its cheaper), so is there a way to make it work with this? Or do I need to figure out the CNAME route?

    Thanks for the post, great info!

    1. Completely possible. I have that same set up myself (domains registered with Company X while hosting is done with Company Y).

      The domain registration and the domain hosting are completely separate. You'll need to go to your registrar and point your DNS servers to whatever your hosting provider told you they should be, and then use your hosting provider's control panel to "add-on" that domain. It's NOT possible to do with separate *hosting* companies, but as long as you remember to change your DNS servers, you can register your domain name(s) anywhere you like.

      Essentially, once you've done this and someone visits your domain, your registrar will tell them "look over there!" (that's the DNS part) and then your hosting company will say "yep, we have it, you need these files over here" (and that's the "add-on" part). That's a very, very basic summary, but that's the general gist.

      Hope you get it working!

      1. Kiara,

        I have setup wordpress 3.0.1 multisite with subdomain method. Trying to follow the otto tutorial to map my other domains registered with Copmany X to my Company Y share hosting. I've added an A record at Company X DNS to poiint to my IP at hosting Y. From what I read, and also mentioned in your step 3, "parked" domain is prefered, so I added my otherdomain.com as a parked domain on my mainsite.com. It didn't work. From what I found, when I visited my otherdomain.com, it was redirected to "otherdomain.com/mainsite.com". Not sure why but from time to time, some sub domains on my mainsite, such as demo.mainsite.com were incorrectly redirected to demo.mainsite.com/mainsite.com and my hosting fixed them by correcting some misconfiguration that they don't disclose to me. Now the parked domain is also incorrectly redirected, but my host insisted that "since you have wordpress multisite, parked domain won't work because it is redirected to otherdomain.com.mainsite.com" and changed that to an addon domain for me. Now otherdomain.com is showing my mainsite.com, which is fine but there is also a subdomain of otherdomain.mainsite.com created for me, which is also redirected to mainsite.com, so now I cann't access the admin screen of my subsite by otherdomain.mainsite.com to do the domain mapping. I'm still in talk with them and I think they probably messed up the redirection of parked domains.

        Sorry to post such a long comment, I'm just wonder why in this comment reply you're saying an "add-on" should be added, opposed to "parked"? What other things I should do if I can't do the "parked" method?


        1. I'm not sure if I can help, but I'll certainly try. Here's what I know: I have 2 domains mapped to my primary one using this method. One I did by "add-on" and one "parked", both done through my cpanel. Both work – there doesn't seem to be any difference. Now here's what I THINK: either use the static IP OR the "park/addon" method (if you do the latter, don't forget about your nameservers). I don't think you need both. That may be your problem.Unfortunately, that's my only idea. But do stop back & let me know if that helps!

          1. Clarification: You should be able to do parked or add-on domain, whichever works best for your site. Just remember to change your dns nameservers to point to your hosting account. If your hosting instead has a static IP address, you should be able to use that instead of nameservers and I *think* that then you wouldn't need either add-on or parked domains. But I'm not familiar w that method so I'm not positive on that. Also, I agree. Sounds like your host did the redirect incorrectly.

          2. Thanks for your reply. Finally got it sorted out. It was an error I made in wp-config.php. I have two lines in my wp-config.php that I added when I enable multisite.

            define( 'DOMAIN_CURRENT_SITE', 'itexpert4u.com' );

            define('NOBLOGREDIRECT', 'itexpert4u.com');

            The first line is correct, while the second line must have "http://", which should have been define('NOBLOGREDIRECT', 'http://itexpert4u.com');

            without that http://, any non-existing url will be redirect to "non-existingURL/itexpert4u.com'.

            My host and I kept looking at wrong directions so we couldn't fix it earlier. I suspected the redirect they setup in the system and they suspected the redirect in my .htaccess or my wordpress admin panel. Finally I tried disabling my WordPress and the redirect went away, so I knew it was my wordpress. After that it didn't take me too long to find the error. I also found through google someone else also made the same mistake by not having the "http://". Hope this comment can help anyone reads it.

            I thought about your suggestion of not even using either parked or addon, I think it might work for dedicated server hosting, but won't work for me as I'm on share hosting. And I think the addon domain method might work for sub-directory multisite, but I don't think it'll work for my sub-domain multisite.

            Thanks again Kiara!

  2. One more thing. I'm about to enable Multi-Site. Using your method, does it matter if I do subdomain or subfolder? Should either work just the same/as good? I don't see anything in Otto's guide that requires one or the other.

    1. That shouldn't matter for this. The differences are mostly due to server capabilities. If you're planning to use domain mapping, then whether they're folders or subdomains won't make a difference because visitors won't see them anyway.

      I used the subdomain method.

      Good luck!

Comments are closed.