Donncha’s Domain Mapping plugin

One often requested feature is the ability to put a domain name on a sub-blog. Most people are unsure of what to call it, so I’ll tell you – domain mapping. :) While there has been a few ways to approach this in the past, it’s now easier with Donncha’s WordPressMU Domain Mapping plugin. It also just had an update, so if you have been using it, upgrade it.

Installation is easy, with one extra step. Drop the plugin file into the mu-plugins folder, and sunrise.php into the wp-content folder. Open up wp-config.php (in the root folder) and find the line like this:

// define( ‘SUNRISE’, ‘on’ );

It’s pretty far down there. Take those two // away from the front so the command will run.

Since we placed the plugin in mu-plugins, we do not have to activate it. You’ll find the menu for it under Tools. If you haven’t done the above step with the config & sunrise files, you’ll get a helpful error message.

One thing I want to point out right here is that you need to do this *while in the backend of the blog you want to map*. This plugin was designed so that the user of the blog in question would do this, not always the admin. If you’re at the main blog and you go to map a domain, you’ll re-map the domain of the *main blog*. (ask me how I found this out. LOL)

Fill out the fields, click the button. That’s not all though. The domain itself needs to know where to go.

I usually handle this two ways:
– add an A record pointing to the IP of my WPMU install (works if the IP address also resolves to the WPMU install)
or
– park the domain on top of the WPMU domain (better on shared hosts)

You can park the domain first, and then set it up in the backend. The order of these steps don’t really matter.

If you are looking for a paid solution, please consider the Professional Domain Mapping Plugin. It will completely hide the originating domain, and it also comes with an extensive PDF manual with step by step instructions (with screenshots!) for some of the top webhosts.

Comments

  1. I recently started using WordPressMU Domain Mapping plugin. It works great! One thing I noticed is that once redirected the plugin automatically removes the www (or sub domain).

  2. That’s kind of the point :)

    It takes subdomain.yourdomain.com and changes it to newdomain.com, while still being part of the same install.

    • Hi – I am learning a lot from your site – thanks.

      I am setting up multipe sites on WPMU but want them to all display their full www. domain – but I can’t get them to resolve to the http://www.domain.com – instead they are defaulting to the non-www versions.

      If I put an entry in the htaccess file I just get a loop and it times out.

      Is there any way to set WPMU domain mapping to display http://www.domain.com instead of non-www ?

      Thanks

      • OK I worked it out myself. I modified the actual plugin file to strip out the code which removes the www. This seems to work OK.

        • iain wright says:

          Richard,

          Would you mind sharing with me how you modified the plugin to allow for “www” addressses please?

          Also which file did you modify? It looks like the replacement happens in sunrise.php?

          Thanks in advance! :)

        • Hey Richard, Which code (and where was it) that you were able to do this?

          • Hi Sam/ Iain

            This space is getting a bit narrow! … I actually changed the domain-mapping.php file. Around line 303 I replaced …

            $domain = $this->db->escape( preg_replace( "/^www\./", "", $_POST[ 'domain' ] ) );

            with

            $domain = $_POST[ 'domain' ];

            Then similar changes in lines 430, 470 and 500.

            Please NOTE: a) I don’t know if there are any side effects of my changes as I don’ know the code well enough – but so far I have not found any – there probably are if you you wanted to host both www sites as well as wildcard sub-domains….and b) if there is a plugin update, it will obviously overwrite these changes so you would manually have to update the plugin whenever there is a change.

            Details of why I did the change are on my blog…

            http://www.searchgap.com/blog/hosting-multiple-domains-on-wordpress-mu/

            If you want the complete file just contact me through my website with your email address..
            Hope this helps.

          • PLEASE NOTE: These changes relate to the incsub (wpmudev) domain mapping plugin which is based on Donncha’s domain mapping plugin and available in the premium members area of wpmudev. I originally thought they were one and the same. I guess a similar change should also work on Dnncha’s plugin. Sorry if any confusion.

      • Was wondering what you guy were doing, as our domain mapping plugin (see tab up top) and Donncah’s (which Ron has also worked on) are both useable with WWW names without hacks.

        • Can you provide additional information on the ability to use www without hacks. I am using different versions of the domain mapping plugin, both yours, donncha’s and one offered by premium.wpmudev.org and can not get www’s to work. whats the secret?

  3. I’ve been trying to use this for a while now without success.

    I’d like to map blogs.library.lincoln.ac.uk/staff to librarystaff.blogs.lincoln.ac.uk

    Should this be possible? I’ve created a CNAME record to that effect, but it just redirects to the root address in my apache config which is learninglab.lincoln.ac.uk

    any comments appreciated. thanks.

  4. @Joss

    Is that install using subdirectories?

    @Andrea

    We are using this plugin on UMW Blogs as well. I love it, but I find that after someone maps a domain we have issues with the login and uploads. I have to manually go into the blogs options in Site Admin and change the Domian table, siteurl table, home table, and upload url table for everything to work perfectly.

    Anyone else have the same issue? Or might this be a specific quirk of our setup? Inquiring minds would love to know.

  5. Joss – can’t do that with the domain mapping plugin. You should probably just add a redirect in the .htaccess file.

    Jim – try the latest version. It redirects the Dashboard to the new domain which unfortunately logs the person out, but avoids problems with uploaded files.

  6. Hi everyone.

    Just trying to get my head around this.

    I have one blog on my domain and I want to start a second blog (different topic) but host in same space.

    Which lead me to wpmu

    I’m guessing I just a record http://www.domain.com and domain.com and get host to set up to accept domain to same space.

    Would then be possible to go to http://www.funys.net and get my mainblog and http://www.domain.com which will load what’s in http://www.funys.net/blog2
    If not is there a way I can do this? Thanks.

    • If you’re only ever going to have two blogs, WPMU may be overkill.

      But essentially, yes – you set up the first blog on WPMU. Then within MU, you add the second blog, then map the domain to it. On the server side, you park domain two in the same spot as domain 1.

  7. Hi Thanks. This sunrise.php is it an empty file I create?

  8. Got it. I used the dashboard plugin install and was oblivious to the extra files like sunrise.php bundled with the download. Thanks

  9. I’m using this plugin and it works great. The problem I’m having is one of our client’s LAN is set-up so that it needs the www on the domain in order to resolve. As a consequence, they can’t see their own company site on their lan. Is there a workaround for this where I can continue using the plugin for other sites but get this one to work? Someone mentioned .htaccess but I’m not sure what entry to make.

    Thanks,

    Robin.

  10. Hi,
    Does it work on lighttpd? I’ve tried it but it doesnt work.
    Cheers

    ps.
    lol love your antispam word :D

  11. This Domain Mapping tutorial has been very helpful. One thing, when you say:

    “add an A record pointing to the IP of my WPMU install (works if the IP address also resolves to the WPMU install)”

    If I want individual blog admins of my MU installation to be able to add domain mapping themselves once I’ve installed the plugin, how DO they “add an A record”?

    …If they’ve got their domain name registered with Dotster or Godaddy or whoever, are they able to add an A Record in their domain registration?

    Sorry for the confusion, can you please clarify?
    [rq=,,][/rq]

    • Yep, they sure can do that. In Godaddy, they need to go to their domain management page, select their domain and then click “total DNS records”. We want them to leave the nameservers as is.

      In the Total DNS records area, they can add another record – which is where they type in your IP and choose the record type. (A).

      Pretty easy. :)

      • Thanks for the opportunity to clear up some confusing and hopefully get mapped domains working. Case….
        Have shared reseller hosting with Host Gator.
        Have reseller domain filmmakersvillage.com
        Upgraded on 6/17 to 3.0 and added
        domain mapping plug in on 6.18.
        Configured ip address (from ping of filmmakersvillage) as the domian mapping IP address.
        Created new domain frustratedfilmmaker.com at godaddy and left DNS as default. went into total DNS changed @A record to point to shared webhost ip address for filmmakersvillage.
        However browsing to frustratedfilmmaker.com does not seem to resolve to the blog and I get the hostgator parked domain advertising site. What is the magic mojo that I missed? Any help is greatly appreciated.
        Dan

  12. Yes, they add the A record at their domain registry or where their DNS is hosted.
    [rq=476,0,blog][/rq]Geek of the week

    • (Re: Adding A Record)
      …OK, I see for GoDaddy how to add an A Record, and it appears that Dotster charges $10/year for “DNS Management” which I assume is how you do it with them. Not all registrars let you add a A Record apparently (?)

      If the domain name is hosted somewhere A Records can’t be added, there’s an alternate way of setting it up? …By having the blog user set DNS to the MU’s hosting company, and then adding that domain as a “parked” domain through CPanel by the MU main Admin?

      I’m sorry for the confusion, is the above correct? And is having CPanel the easiest way to accomplish the above, or it doesn’t really matter?
      [rq=,,][/rq]

  13. I just had the time of my life trying to figure out why this plugin would not work for me! And then, I tried a couple things…

    It was working and then stopped. So I went back to before and tried to see what may have caused the issue. I had recently installed a “upgrade” plugin provided at wpmudev.org and when I disabled that, it worked… for one of my sites anyway. When I reactivated it, the site still worked, so I am not sure if it just needed to clear something.

    However, I was having trouble getting another site to work with the mapping. I had it parked on the main install and added the domain to the plugin settings as I was supposed to. It would not work.

    So I went back into my cpanel to review the parked domains, and noticed the link for managing redirection. Just testing, I clicked the link and as suspected, nothing was there. However, I still clicked the “remove redirection” link and presto… the site now worked!

    So if you are having difficulty in getting this working, try those two items and see if they help you.

    On a side note, one of my concerns was with images and this plugin. I was concerned that when I enabled the plugin and mapped the domain that the images would pull from the wrong place. Good news… images come through with no problem. Anything uploaded prior to the mapping still have the subdomain as the URL, but it quickly pulls it using the right URL. And all the navigation links show up as the new domain instead of the subdomain in the page source, so SEO should not be affected.
    .-= Found By Design Websites´s last blog ..New Client: BA Eldridge Interiors =-.

  14. Donncha, thanks for the plugin; Andrea, thanks for the writeup.

    “If you’re at the main blog and you go to map a domain, you’ll re-map the domain of the *main blog*. (ask me how I found this out. LOL)”

    Er, I just did this [too]. Can you tell me how it might be undone?

  15. Hey Andrea, I really enjoyed you and Ron’s site and advice. I don’t have all the saavy needed to try The Donncha plugin. I am going to use you guys’ Multi Site Plugin.
    .-= MyNursing´s last blog ..Welcome to MyNursing.org =-.

  16. You mention that ‘This plugin was designed so that the user of the blog in question would do this, not always the admin.’ — I wonder if it wouldn’t be an idea for the future to change it so only the MU site admin can do it? I plan on adding this feature shortly, so I have no direct experience with it yet but I’m thinking it sounds a lot like it might be easy for an unassuming member to accidentally bugger up their domain mapping.

    Maybe I should actually install it before I rattle on though. :)

    • D. did it this way, as it’s similar to how it’s done on wp.com.

      It’s pretty easy to edit the plugin to have it show up under the Site Admin menu though. :D

  17. I’m been fighting WordPress MU / Domain Mapping for a few hours now.

    I have
    1 Host
    1 Main website / blog
    3 additional websites (and more to come when I figure this problem out).

    Given each copy of WP is around 10mb I’d have to have to install it for each domain. To my understanding this plugin should let me map blog.additionalwebsite1.com, blog.additionalwebsite2.com, etc somehow. When I installed WPMU I did choose sub-domains but wondering if I should of chosen sub folders since my additional domain websites are technically in sub folders anyway.

    Any help would be appreciated. I could be created 25 to 50 blogs/domains a year, so a solution that will scale with this is what I’m trying to find. I thought I found it with WPMU, but I don’t want website40.blog.mainsite.com to be my address, I want blog.website40.com

  18. Can anybody explain to me why the www get drops from the redirect and if there is a way to keep it?

    • I’m currently looking to put together a blog network for work and research purposes and this domain mapping stuff and multi-site are both interesting developments. Thanks for the updates.

      oh, Jack, if I’m stating the obvious, I apologise, but your problem sounds like either a permalinks issue or you have not set up cannonicaliztion (www vs. non-www) yet?

  19. LOL… I found your post because I did the same thing you did… I mapped the main blog accidentally.

    So, now my question is, how did you fix it? Did you have to do a re-install?

  20. Andrea or anyone,

    Do you know is this the same plugin that WordPress.com uses to map domains to their sub-blogs? Or do they have their own customized plugin?

    Also, will this allow you to map multiple domains to one sub-blog? ie. Orlando.com and CityOfOrlando.com

    Thanks,

    Ron

    • It’s similar to their, but not exactly the same.

      This one is only for a single domain to a single blog.

      • does the plugin that WordPress.com uses exist in the public domain for other wordpress.org/wordpress mu users to install?

        I’m trying to install Donncha’s Domain Mapping plugin on my 2.8.4a version of WordPress MU and I am having difficulties.

        Is there a work around, or do I have to install 2.8.2 version of WordPress Mu?

        Thanks,

        Ronald

        • This is the closet you’re going to get. Donncha works for wordpress.com.

          If you’re having difficulties, maybe I can help you with those.

          • when I click on Tools: Domain Mapping I get the error: Sorry, domain mapping only works on virtual host installs.

            I have googled the error, and find lots of your postings, but either they apply to earlier versions, or I can’t seem to locate the “Manage Tab”.

            Any advice, my site install in on Hostmonster.

  21. Right, this plugin only works if your blogs are in the format of subdomain.yoursite.com. If you have yoursite.com/blogname, then Donncha’s won’t work. Which is why you get that message.

    you’ll need one specifically to work with subfolder/subdirectory setups, like the one we have here:
    http://wpmututorials.com/simple-multi-site-plugin-e-book/

  22. Hey guys I have a MU install and went through all sorts of trouble just to get the sub-domains to work with Plesk… that is a whole other story, it works now, but when I try to remap the sub blog following the instructions nothing happens, I can’t even mess it up by remapping the main install, still nothing changes. Is there something natively in Plesk that makes this so complicated?

    I point the newdomain.com at the IP for my server, then I remap it in the backend of the subdomain.mydomain.com and nothing happens. I know the re-direct is working because the new domain now points at the Plesk generated place holder page on my server.

    Any ideas?

  23. Sorry about the double post, after I posted I had an epiphany and figured out how to fix it, I realized I needed to add an alias to the main install to make it work, not create a new domain in Plesk, but in the process I realized that a member would have to register their domain name, then redirect it to my IP then I would have to create an alias for it, and then they would have to map it. This is pretty inconvieneint for them, having to wait for me to create the alias, is there a better way to do this so that I am taken out of the essential process of remapping the domain? Or is this as good as it gets?

  24. If you are on a VPS or dedicated server, poke around plesk and see if you can find an option where you can set your default host. If you find it, set it to the domain that has your wpmu install.

  25. Hi

    I just installed DM plugin. It’s working fine but just for the main page of the blog. If I click any of the links (posts, pages, feeds, etc) it doesnt work. Page not found. All the links are broken.

    Any idea on how to solve it?

    Thank you!

  26. I just want to document my mistakes and errors here, somewhere on the Internet, in case it saves someone else a trouble!

    I was making it *too complicated!*.

    I went into the blogs list, and for each blog, under Site Admin > Blogs, I changed the Domain setting so that it was mapped-domain.base-domain.com (as it should be), I changed it to just mapped-domain.com.

    This is confuuuusing, because it actually DOES WORK, in most ways. And, I thought I *had* to do it! Oops! When you do something that is wrong, in this case — there was no documentation to tell me NOT to do it! So, it took me a long time to figure out that that was going on.

    Also, to reinforce what Andrea means about setting the mapping in the particular blog you want it to map to:

    You must go into the back-end for that particular blog, and add the domain in the Tools > Domain Mapping panel for that blog. So, if you’re wanting to map my-mapped-domain-1.com, you’d actually be going to my-mapped-domain-1.my-base-domain.com/wp-admin/ (of course, you can use the Dashboard to navigate there), and THEN go to Tools > Domain Mapping, and under Add New Domain, add my-mapped-domain-1.com there.

    MORE THAN LIKELY, you will only map ONE DOMAIN per sub-blog. This is part of where confusion arose for me — I thought you mapped all of the blogs at a sort of “Top Level” admin area, and it figured out what domain went with what subdomain. This is part of why I thought I had to change the first part — I thought this would be how it would know. Oh, well. Don’t do that, do it this way!

    Chris

    • With Donncha’s plugin, you have to do it from the backend of each blog.

      With ours (linked in the top menu) there is, in fact, one main admin area to map any domain from any blog.

  27. Minotauro says:

    Hello,

    I’m having some problems getting this plugin to work correctly.

    I’m trying to use this plugin on subdomain blogs.

    I create a blog (blog1.example.com)
    I map a domain to this blog (blog1.com)
    I set http://blog1.com as Primary Domain
    Go to Godaddy and add A record pointing the domain to the server IP address

    When I go to http://www.blog1.com I get the default godaddy parked page. When I go to blog1.example.com I ALSO get the godaddy parked page.

    From my understanding it was supposed to be the other way around. I thought going to http://www.blog1.com would show the contents of blog1.example.com. How do I accomplish this?

    Your help is appreciated. Thank you.

  28. I have installed the Domain Mapping plugin and am trying to set it up now for several of my blogs. One quick question, should I be setting the “primary domain” to be the one I want to have mapped to my wpmu subdomain site?

    mymapdomain.com (should I set this one as the primary domain?)

    …mapped to…

    subdomain1.wpmudomain.com

    Thanks,
    Ryan

  29. Hi,
    I’m reading all the documentation that i found but still confused. i created data.muhteviyat.com as a subdomain and i want to map with datamizindeyiz.com. i’m using direct admin page and several people also use the same ip that use. So, is shared hosting possible to use domain mapping plugin? I already point a record to my ip adress (bu exact the same ip adress that i use for my other domain which uses wpmu). but only thing that i see is welcome page of direct admin. Also if i make this domain primary, it doesnt work. any idea?

  30. Ok, so everything works great, but I can’t log in to the sub domains now. Isn’t that kind of … retarded? Or maybe I’m doing something retarded here. Thanks in advance! Wonderful tutorial!

    • If you mean the subdomains that are mapped, there is a setting in site admin -> domain mapping to allow that,

      • Ah, so that’s what the “Redirect administration pages to original blog’s domain” means…

        pardon me while I smack myself around a little.

        Thanks man ;)

  31. Thanks! I couldn’t get it to work by posting to the mu-plugins folder, but it worked like a charm in the standard plugins folder. i just had to activate it.

  32. I was going around in circles till I found you post. Nobody else seems to point out ->

    “…you need to do this *while in the backend of the blog you want to map*.”

    Cheers

  33. “park the domain on top of the WPMU domain (better on shared hosts)”

    What does this exactly mean? Could you clarify please? How can this be achieved on hosts WITHOUT Cpanel?

    Thanks a bunch!

    • Make sure Apache takes all requests for the mapped domain and sends them to the folder you installed WPMU in. Set up an alias. ;)

  34. Thanks for the quick response.
    I think I got it. :)

  35. Very sorry for picking this up again… but just don’t know where to begin…

    Can we get an example configuration?

    Something like this:
    1. Server CNAME domain: example.com
    2. Domain panel: Add CNAME record…
    3. …

    I understand that to some this is a walk in the park, but what about the rest of us? :)

    Thanks a million!
    T.

  36. Thanks for all your help! I’ve managed to set it up… As you sad it was a matter of setting an alias. Sorry for “cluttering” your blog. ;)
    Cheers!

  37. Hi, and thanks for the awesome plugin. I’m using it with success. But I have a small issue with Twitter Tools that I’m gonna explain now.

    My main domain is some main.com, then I have blog1.main.com, blog2.main.com, …

    I mapped all blogX.main.com to let say blog1.com, blog2.com, …

    But I’m not able to stay in blog1.com/wp-admin , it always redirects to blog1.main.com/wp-admin and so on.

    It would be not much of a problem, but dued to this, sometimes the ugly domain remains somewhere (blog1.main.com) and when I update my twitter with Twitter Tools, it uses blog1.main.com ! Not blog1.com as I’d like.

    How could I fix this? Thanks

  38. Can’t believe asap I post a question I have the answer, I simply changed domain and siteurl from site admin / blog / edit blog

  39. I’m having the same problem but don’t understand Mark’s solution.

    I set up one domain, http://speakclearlyonline.com, and the domain mapped to the admin area, easy. I don’t recall doing anything purposely to make it do that. Now, I’m setting up another domain, http://completeflake.com, but I’m getting http://flake.domain.com/wp-admin.

    Both sites are set up on the same main domain and the same wpmu install, so there shouldn’t be any difference, right?

  40. Oh, great. I just tried to follow what Mark said he did and now I can’t access the backend for this blog and another one. I get this instead:

    http://webhostplanet.org/wp-signup.php?new=flake

  41. Okay, problem solved after removing the redirection for the parked domain in cPanel, thanks to this comment: http://wpmututorials.com/plugins/donnchas-domain-mapping-plugin/#comment-933

  42. I’m sorry to have caused a bit of trouble, I’m glad you fixed in the end :)

    Be sure to clear cookies also, I had an endless redirect loop after I changed the siteurl while in the browser I was still logged.

  43. No problem, Mark. I’m glad I found this thread. I’m betting the ‘remove redirection’ idea will solve some other problems I’m having too. :)

  44. Hi,

    I just wanted to clarify something about your Simple Multi Site Plugin. That is totally separate from your Advanced Domain Mapping Plugin – is that right?

    My site is set up with sub-folders and is hosted on Rackspace Cloud Sites. I need a good domain mapping program that can work with both of those parameters.

    Also, I don’t want to give my clients the option to create their own sub-blogs, etc. I.e., I don’t want to give them Site Admin (or Super Admin) privileges.

    Is your Advanced Domain Mapping program a good solution for me?

    Thanks and be well,

    Moshe

    • andrea says:

      Yes, there are two plugins included. They work with a subfolder installation – so does Donncha’s.

      Rackspace Cloud – I haven’t tried domain mapping on that host. None of the available plugins handles the server-side setup. They only handle the mapping within MU. Our extra documentation covers the server-side and dns side of the setup.

      Clients creating their own blogs it outside the realm of this plugin. It’s a setting in MU, just disable registrations. The big difference with our plugin and D’s is that ours has one interface menu to map the domain. You do it for the client, they can’t do it.

  45. Thank you for your response – much appreciated.

    I am actually in the process of leaving Rackspace and moving over to a VPS – once I have my site up and running I’ll consider again which plugin to use.

    Thanks again and be well,

    Moshe

  46. Hi there. This comments board seems to be the place for a few eureka moments so i’m hoping I might get one here :)

    I have just bought and successfully installed the advanced domain mapping plug in. It’s performing it’s job, but I now cannot login to the backend of the mapped domains.

    I have tried creating a new user on the mapped domains but when I try and log in the page just reloads with this in the address bar: http://domainname.com/wp-login.php?redirect_to=http%3A%2F%2Fdomainname.com%2Fwp-admin%2F

    Any suggestions explanations? I have read every forum post going and can’t see a clear answer. Many thanks, Sam.

  47. Isn’t it possible to configure a custom path along with a domain mapping? I’m currently trying to map a blog from foo.blogs.example.com/ to http://www.foo.com/blog/ but can’t get any further than moving it to http://www.foo.com/

    Looking at sunrise.php tells me that path is always forced to be ‘/’. Changing this to ‘/blog/’ caused an infinite redirect loop (actually redirecting http://www.foo.com/blog/ to the exact same URL). Is there a way to patch the plugin to get this working with the configured path?

    Any pointers towards a working solution are very well appreciated.

    Cheers

    • You cannot domain map anything to a specific folder. This has less to do with WPMU and more to do with redirecting domains in general.

      • Hi Andrea, thanks for your reply.

        I don’t quite understand your point though. In vanilla WPMU it’s possible to configure a path/folder (i.e. ‘/blog/’ instead of ‘/’). So I don’t want the plugin to do that. I simply want it to keep this functionality while redirecting to a domain.

        As I’ve seen, path is hardcoded as ‘/’ in sunrise.php, overwriting any setting from the blog admin. I’d be willing to investigate in order to get this working. Though I suspect somebody did this for (a non-obvious) reason. If you tell me that reason, I’ll happily save myself some time.

        Cheers

  48. Hi,

    I was looking at doing the domain mapping but without pointing the A records.

    So I am in a market and I want to create useful and relevant blogs for each niche in the market… but I actually want them to be their own blogs without any redirect or changing of the A records (for SEO reasons)

    Any ideas?

  49. DrLightman says:

    Hi, the system is working fine with 100+ blogs in my system.

    But there is a “Unknown login key” error upon logout from the dashboard from every blog.

    There seems to be a problem writing into the domain_mapping_logins table, since in my table I’ve got only one record and with data that doesn’t makes much sense:

    id,user_id,blog_id,t = empty,0,35 ,0000-00-00 00:00:00

    Myabe there is somethin wrong going on with the writing of the date?

    Any idea on how to fix this?

    Thanks.

  50. Thanks for the instructions. The problem I am facing is that my wpmu install is setup on an addon domain on my shared hosting plan (with hostgator). The domain I want to redirect from is registered with Godaddy and I have pointed the A record to the IP listing in my hostgator cpanel. However, this resolves to the primary domain on my account and not my wpmu install. Ive even tried setting up the parked domain (without redirect) but am facing the same problem. If I setup a redirect on the parked domain it goes to the wpmu install but to the main site and not the subdomain.

    Please help me figure this out. Thanks!

  51. Hi!
    I need to setup 2 different sites (both WP powered), on 2 different domains, with different look and feels (www.domainA.com and http://www.domainB.com)

    HOWEVER they need to share the same content. In other words, both sites, will be reading off the same database for content.

    Is the “Domain Mapping” plugin what I need to do this?

    Meaning, should I install each blog in a sub domain or sub folder (such as subdomain1.main.com and subdomain2.main.com) and then map each sub domain to an independent domain:
    subdomain1.main.com mapped to: http://www.domainA.com
    and
    subdomain2.main.com mapped to: http://www.domainB.com

    Based on this, is the Domain Mapping plugin what I need? if now, what plugin will help me do this?

    THANKS!

  52. I was hoping you have a wise advice for my situation. Basically, I’ve been using WPMU for quite a long time and at that time the only plugin I found to manage multiple domains easily was this:

    http://www.jerseyconnect.net/development/multisite-faq/

    Since then, it always worked well: dropped in, worked. I have three domains on single install so far, with the last two added just with a click.

    Since I’d like to upgrade to 3.0, I was reviewing all the plugins and mu-plugins I have installed, and I’ve come across the Donncha’s plugin, which seems to be the suggested solution.

    Since I already have three domains (with their related blogs) running on the same installation, I was also wondering whether or not Donncha’s plugin will pick them up automatically.

    What do you suggest?

    • We’ve been working with Donncha’s DM plugin & our own DM & muli-site plugin for the last couple years. We haven’t kept up on other plugins that perform similar functions.

  53. Do you need to have a dedicated ip address to accomplish the domain mapping?

  54. This plugin really rocks!

    Everything seems to work fine, but I’ve just ran into one problem.

    On all domains mapped to the original domain the links point to subdomain.example.com instead of subdomain.com. Is there a way to fix this? Content must be available on only subdomain.com, links must point to subdomain.com only.

    Thanks for taking the time!

  55. I actually want to map the main site to another domain – I need to basically map the domain of our production server to our dev server, because our prod server won’t support wordpress (it’s a large university). I need people to visit our dev server without knowing it. Can i do this with this plugin?

  56. Dear people,

    I believe I have a problem with the fact that my multisite installation is on an add-on domain and not the webhost accounts main domain.

    My parked domains are simply pointing to my main domain instead of to the subdomain of my multisite installation.

    For example: http://www.domain.org/ is a parked domain

    http://sample.site.com/ is the multisite subdomain.

    The parked domain should be pointing to the subdomain.

    The domain mapping plugin is installed and I have mapped the domains according to site id.

    How can I trouble shoot this?

    thanks.

  57. I still failed use this pluggin. I want some one tell me about how tos a simplest way step by step from zero until end.

  58. DrLightman says:

    Hi,

    is there a way to remove the double-load of the index page? Whenever I load a domain mapped blog, it seems it loads twice before showing content, this just adds server load, and I don`t need this right now.

    I`m not able to understand the source if this internal redirection, and I`m asking here hoping the authors of this useful plugin could help me shed some light on it and maybe help me to disable it.

    using WP 2.9.2 and Domain Mapping 0.5.1

    • That redirection only occurs with logged in users. If you turn off remote logins, that will turn off the redirect for logged in users as well.

      Cookies are stored by domain, so if you have the remote login enabled, the browser has to be redirected through both the network’s domain and the mapped domain to set the cookies on the mapped domain.

      • Thank you for the explanation Ron, I never configured this option neither I knew what it did. Now I`m not sure if I can disable or not, I`ll do some tests.

  59. Hey everyone. Great post, tutorial, and plugin. Just want to say thanks all around.

    One thing that seems to come up a few times in this discussion, but never really explained by the ninjas, is getting a subdomain that it mapped to work if someone types subdomain.com into their address bar.

    Just so I can let you know all my steps:

    A. I have my main domain as the main account on a shared host (hostgator with cpanel)

    B. I created a subdomain and called it * and the root domain = maindomain.com and the document root is /public_html

    C. In my wp-config.php I have this rule define( ‘DOMAIN_CURRENT_SITE’, ‘maindomain.com’ );

    D. In my domain mapping options, I have it set to to server CNAME domain instead of the IP address (the ip doesn’t go to my main site if I type it in my address bar) and I’ve entered maindomain.com

    E. I’ve successfully parked 10 subdomains and added 10 subdomain.maindomain.com sites.

    F. I’ve successfully mapped each subdomain to work at http://www.subdomain.com.

    G. Here is where my trouble starts. If I navigate to subdomain.com or maindomain.com without the www I get an error “The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies.” – This seems like a big error to me. How can I force an attempt to navigate to a non www site go to the correct http://www.site.com address?

    Any help would be greatly appreciated.

  60. I’ve got a similar issue. I’ve successfully implemented a multisite installation of WP at the root level of http://www.becomebetter.com. I then added an additional site called “Test” that shows up at http://www.becomebetter.com/test/. Both sites work as “advertised” in that each has it’s separate dashboard, etc. The site is hosted at GoDaddy.com (yeah, I know – but this is just a dry run and I plan to move to a “real” host down the road).

    My problem comes in trying to add domain mapping. I have a separate domain name (www.betternotolder.com) that I purchased from GoDaddy that I’d like to map to http://www.becomebetter.com/test/.

    First, I’ve installed the Domain Mapping plugin and got it running with no problems.

    Second, I’ve added an A record to the DNS record of http://www.betternotolder.com so that it points to the root directory of my multi-WP install.

    I should be all set, right? However, when I load http://www.betternotolder.com into my browser, instead of loading the “Test Blog,” I get:

    Forbidden

    You don’t have permission to access / on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    Apache/1.3.33 Server at AppStuff Port 80

    Anybody have any hints as to what I should try next? Any help, suggestions, or comments, would be greatly appreciated.

    Hiram

    • Honestly, I suggest to move to a host that better supports multiple domains. I haven’t done much work on their servers, but even with that limited exposure, I wouldn’t use them for WP networks.

    • Did you actually map the domain in the backend of WordPress? :D

  61. Ron: I’ve pretty much come to the same conclusion. GoDaddy is great for domain registration, terrible for hosting. However, I want to make sure I understand all the ins-and-outs of multisite setup and operation before I move.

    Andrea: Yes I did. Here’s a screen shot of the Super Admin panel (ok, can’t past it in – image uploaded here: http://www.becomebetter.com/domain-map.jpg). As you can see, according to the panel, the domain is mapped. However, when I try to actually load it, either directly in a browser or in the Super Admin panel by hitting the “Backend” or “Visit Site” links, I get the aforementioned 403 error.

    From what I’ve researched on the Net, it might be a server side issue. Should I bother trying to mess with that or just go ahead and change hosts now? I’m planning to do that anyway. I’m considering a VPS account at HostGator – are they “WPMU-friendly?”

    Thanks in advance for the advice.

    Hiram

    • I would change hosts now becasue I wouldn’t want to waste time figuring it out on GD when it will be slightly different on HG anyway. And actually, they (HG)are not that bad.

    • Hey,

      Just wanted to chime in here. I have my network that I commented about above, running on a Hostgator server just fine. I have 10 domains. The main install, and 9 others all mapped to network sites.

      For my above issue, trying to get the non-www addresses to work, I just wrote an .htaccess rule for each site pointing the non-www back to the www address. I figured this out with some help on the wp.org forums. You can see the thread here:

      http://wordpress.org/support/topic/plugin-wordpress-mu-domain-mapping-non-www-mapped-domians-erroring-out

      My only issue is that in the section of any of the subdomains, it references the main site. I don’t thinks that’s good for SEO purposes.

  62. Hello

    I have wordpress MU (3.0) set up and configured on my server. I was wonder if there is anyway to map domains using multiple different IP adress. I have 10 IP address set up on my VPS. Is there anyway to use different IPs on new mapped domains?

    • Not easily, and there’s no good reason to do so.

      If you’re thinking SEO – it’s myth. You do not need each one on a separate IP. Think of shared hosts. ;) Unless you’re doing heavy interlinking (which is considered blackhat seo) then there really is no need at all.