[resolved] 3.0 Multisite Domain Headaches - Mapping DNS to subdomain? (30 posts)

  1. Bob Jones
    Posted 6 years ago #

    Ok, so I'm sure this is a straightforward problem with a simple solution.
    I need to map http://www.domain.com to subdomain.anotherdomain.com, and domain-two.com to subdomaintwo.domain.com on my "Network" install. As in, I have multisites enabled...I realize that the lingo has changed from MU to 3.0.

    I installed 3.0 because my next project is a series of WordPress-powered sites...around 6. While setting it up under 2.9.2, I realized how much time I was wasting setting up so any separate installs of wordpress when all of the sites are on the same server.
    So I set up 3.0, enabled multisites, and spawned 4 sites.

    I have a VPS, DNS Wildcards, and subdomains set up for the network.

    So, I want to do the above: map http://www.domain.com to subdomain.anotherdomain.com, and domain-two.com to subdomaintwo.anotherdomain.com.

    Seems like something that should be built-in with all the multisites options, but perhaps I'm missing something. Although, I guess the power of WordPress is the power of the plugin. :)

    After searching a bit, I took a look at WordPress MU Domain Mapping, but I still can't figure this out. I tried talking to my webhost about this, but they said they didn't really have any clue and that I should ask for help here.

    More details:
    My main domain has an IP address for an A name, and the domain itself as a CNAME. So, do I set up Domain Mapping with a server CNAME address or IP address? On my second domain, which I want to map to the subdomain, do I set up the CNAME or A name to point to...what exactly?

    So confusing. :(

    I realize that I'm asking for help with the plugin and the general problem, but I was hoping to not have to resort to a plugin for a solution. It seems like an issue that I wouldn't be alone in.

  2. You're probably not far of, but we'll need more info to check your work. Specifically the DNS records you are trying to use. But there are a few things you may want to look at.

    First: does your multisite install work with just subdomains and no domain mapping?

    I mean if your main site is http://domain.com/ and you create blog1.domain.com blog2.domain.com etc. does that work? You should have an A record for mainsite.domain.com (CNAME also works) and a wildcard entry for *.mainsite.domain.com

    Once that's sorted out with your Apache2 vhost config, DNS wildcards, etc., then follow Otto's Multisite Domain Mapping Tutorial.

  3. Bob Jones
    Posted 6 years ago #

    jdembowski - Yes. Subdomains work fine.

    However, I don't fully understand your next part...the DNS for my main domain is set as:
    * CNAME domain.org <-- wildcard!
    A (not really the ip, but you get the picture)

    And the secondary domain has its DNS with the A name being the same as the first domain - They're both pointed at the same server.

    It does not create records for *.subdomain.domain.com when I make the new site. It just starts working.

    Here is the sub-site created through the WordPress control panel: http://metagnosis.dreamrevolution.org/
    Here is the main: http://dreamrevolution.org.
    So that works.

    I would think that the A of metagnosis would need to point to dreamrevolution.org...but as my host support said, why? They're pointing to the same IP anyways.

    Also, odd thing is that when I enter a domain to be mapped on the metagnosis.dreamrevolution.org page, it doesn't do anything. Like, it says that it adds it, but it doesn't show up anywhere. And it lets me add it over and over giving me the same success message. But it doesn't seem to do anything. It doesn't show up as mapped under SuperAdmin > Sites or under the options on the site itself under Domain Mapping...but that could just be a plugin incompatibility with WordPress 3, even though other people seem to be able to get it to work.

  4. Bob Jones
    Posted 6 years ago #


    Made some progress. Mapped the domain successfully to the main domain. So metagnosis.net takes me to "http://dreamrevolution.org/wp-signup.php?new=metagnosis.net" for some reason.

    So, now I'm thinking this is a plugin issue. For some reason, it just will not let me add a mapped domain at all. It keeps saying it did, but nothing happens. Also, my databases for mapping are never updated. they just sit there - alone and empty. :(

  5. Well your DNS is setup correctly, and the subdomain setup is working fine, so it's got to be the domain mapping plugin.

    The version that is downloadable wont work, you'll need to download the trunk version from


    Follow the instructions from Otto's page and that should get you working.


    Those instructions are what I used to get my multisite and domain working.

  6. Bob Jones
    Posted 6 years ago #

    Yes! The trunk version was the fix.

    Thank you so much, jdembowski. I overlooked that fact initially. >.<

  7. Bob Jones
    Posted 6 years ago #

    Never mind...logins are totally borked.

    Trying to go to metagnosis.net/wp-admin leads to http://metagnosis.net/wp-login.php?redirect_to=http://metagnosis.net/wp-admin/&reauth=1

    Which means when I login, nothing happens.
    Seems related to this Trac issue, except logging out, clearing cache, restarting browser, etc doesn't work. Tried from a different workstation, different browser.

    Still no go. Can't log in no matter what. Main site login still works though. Just not the subdomains.

  8. Have you tried some of the basics such as disabling all of your plugins?

    The domain mapping plugin will be in "Must-Use" which you can't disable, so except for that one, give deactivating the other ones (if any).

    Once that's done, clear all your cookies and try logging into one of your sites.

  9. Bob Jones
    Posted 6 years ago #

    Yes. All plugins are disabled. It doesn't even give me an error...just redirects without logging in. I can't even log in with superuser.

    Going to SuperAdmin > Sites > Metagnosis > Backend doesn't allow me to go to the panel. Just takes me to the same /wp-login.php?redirect_to=http://metagnosis.net/wp-admin/&reauth=1/. All settings are just like the multisites tutorial.

    Funny thing is that all the regular subdomain logins work. Just not the mapped domain login.

  10. Bob Jones
    Posted 6 years ago #

    (doublepost) Stupid clicky button. :(

  11. Bob Jones
    Posted 6 years ago #

    Here's a login so you can see what I mean:
    Login: drone
    Pass: haltime

    Nothing. No error message, just a constant redirect to sign in.

  12. I see what you mean. I can log into your main site but not the Metagnosis site.

    Can you disable the domain mapping plugin and login using the non-mapped URL http://metagnosis.dreamrevolution.org/wp-admin/ ?

  13. Did you check the "remote logins" checkbox under the Super Admin Domain Mapping menu item?

  14. Bob Jones
    Posted 6 years ago #

    jdembowski - Yes. I can. Works fine. Only when the domain becomes mapped is there an issue.

    Should I post this in the plugin forum for this plugin?

    andrea_r - Yes. I've tried that AND having the "redirect admin page" option alone checked. No dice.

    A weird behavior is that when I map the domain, but haven't set the Metagnosis blog to have its URL be metagnosis.net from the SuperAdmin > Sites, it redirects to this address: http://dreamrevolution.org/wp-signup.php?new=metagnosis.net
    But metagnosis.dreamrevolution.org goes to the main Metagnosis site. Trying to go the the admin page after mapping, but AGAIN - before I change the url in SuperAdmin > Sites, it also redirects to the wp-signup.php page. Is that default behavior?

    The part that's throwing me for a loop is the no-error part. Login with incorrect name or pass sends me to an error message on wp-login.php. Correct login sends me to wp-login.php?redirect_to=http://metagnosis.net/wp-admin/&reauth=1. :(

    Any other details/hacks/accounts you all need, feel free to ask.

  15. Should I post this in the plugin forum for this plugin?

    I don't think that will be necessary, the ones who help check all the forums. And Andrea_r knows more about MU/MS than (probably) anyone...

    I apologize in advance for being repetitive, and you may have already tried this. I still think it's that domain mapping plugin.

    Try deleting all your copies of the sunrise.php and domain_mapping.php and remove the reference in wp-config.php define( 'SUNRISE', 'on' );

    Once that's done, use svn to download a fresh copy of that plugin into a temporary directory. In UNIX/LINUX/BSD land that's

    cd wp-content/
    svn co http://plugins.svn.wordpress.org/wordpress-mu-domain-mapping/trunk/ wordpress-mu-domain-mapping

    Or you can download the zip file I created from that SVN check out:


    Copy sunrise.php to your wp-content/ directory, edit wp-config.php adding define( 'SUNRISE', 'on' ); and copy domain_mapping.php to wp-content/mu-plugins.

    If that doesn't work, then I'm out of ideas.

    Good luck.

  16. Bob Jones
    Posted 6 years ago #

    Ok...So it's totally fixed. I think I know what the problem was, but I decided to go to subfolders rather than subdomains anyways.

    It seems that even though I manually placed stuff in the .htaccess folder, WordPress overwrote them with some really dumb rules. Replaced .htaccess and off we went!

    Works a charm. Thanks for all your help troubleshooting j_dembowski and andrea_r. I see you around in the forums quite a bit and you're super-helpful. :) Yay, community!

    EDIT: Actually, that's not it. Seems that it's just with a subdomain install. Did a subdirectory install and everything is fine. Tried to go back to a subdomain install and it started acting up again.
    Would really love subdomains, but this works - so...why not? ;)

  17. mimo811
    Posted 6 years ago #

    Hi I've the same problem.....

  18. josey_wales
    Posted 6 years ago #

    Aargh, I got through this entire post and I though it was going to solve my problems. The issues @erissiva was having are just like my own.

    WordPress 3
    Domain Mapping Plugin Version 0.5.2

    I check the truck change log and don't see any changes since this version.

    1) This site did start locally before I pushed out to live server environment.
    2) I did try to switch to sub-dir & change htaccess mentioned by @erissiva but no luck.

    Everything seem to be working (sub domains resolving) before I try to use the mapping plugin. Odd?

    Any ideas, thanks in advance.

    I'm back to getting:
    ... when I try to access the mapped domain.

  19. That means it can't find that domain in the database anywhere.

    Did you go to the backend of subdomain.mysite.org/ to ther Tools -> Domain Mapping menu and map the domain?


  20. mjvolson
    Posted 6 years ago #

    In your wp-config.php file, see where you've pasted the define( 'SUNRISE', 'on' ); directive.

    It cannot be at the end of the file. Needs to be before the last require_once:

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
  21. NathanShaw
    Posted 6 years ago #

    Here's how I got Multisite Domain Mapping to work...

    3 days of experimenting, getting error messages, time lost and frustration...

    Use the Trunk version available at
    and pay attention to the guidelines on that page.

    If your multisite wordpress installation is set up on an add-on domain on your host (I use hostgator), then I couldn't get it to work by using parked domains, so I re-installed everything, new database, new wordpress, and then I added the network to use directories (instead of the freakish nightmare of subdomain wildcards).

    To set up the htaccess file, I used FileZilla ftp but it added dodgy code in the file which I could not see. On going into File Manager via my cpanel I could see the dodgy code and could then paste in the required network rewrites.

    The directory called blog.dir really is a directory called blog.dir and not just blog.

    Once it's all set up, go into each site you create into the backend and from there add the domain you want to map to.

    Forget all the a record dns settings mumbo jumbo, and just do what any normal person would do to set up a domain to work on their site. Add the nameservers that your host gives you.

    Then, add your desired domain as an add-on domain (not parked domain - providing you are using the directory set up rather than the subdomain setup) and whilst adding the add-on domain, set the root directory to the root directory of your wordpress multisite installation (and not the new site directory that are createing).

    I really hope these notes helps save some people hours of lost time and frustration.

    And please bare in mind today's date of August 22 and be wary of amends to the plugin and what not.

    This thread had some noteworthy points:

    You can do it!

    Gavriel Shaw
    (now also running a multisite network from http://mind-matrix.com)

  22. That's only because you're using an add-on domain. :) It really does work best when it's the main domain on the account. Especially if you will be mapping lots & lots of domains.

    (and yes, we have had this mentioned in the forums before. ;) )

  23. ThePLD
    Posted 6 years ago #

    ...Not trying to take over the thread, but this might (or might not) shed some light on the issue??

    We have setup 3.01 with subdomain based sites and are experiencing the same (or similar) issue. Meaning, everything works great except logging into the backend of the sites. We get the login screen but it simply loops and will not allow us to login.

    What's interesting is that we are NOT using the plugin (no wildcard access) but rather setup everything manually.

  24. ThePLD
    Posted 6 years ago #

    I will move my question to a new post as this appears to be resolved.

  25. ivounnerry
    Posted 6 years ago #

    @JAN DENBOWSKI - thank you very much.. i thought the trunk version from are the same with WP plugin.. i'm having trouble on it since yesterday because I couldn't figure out why domain mapping and domains options don't appear on my Super Admin menu..

    thank you very much to your post..

    it really help me a lot..
    im having headache fixing that domain mapping prob..

    thanks again..

  26. mediajolt
    Posted 5 years ago #

    I have finally figured out how to get multi-site domain mapping working... But I do have one question.

    Currently, when I try to load my mapped subdomains, like this:


    It gets re-routed to this:


    Is it possible to set it up so that it keeps the "www" ?

  27. Did you set up the domain in WordPress as http://www.domain? If not, I believe WP automagically redirects to non-www (which is shorter and friendly). There's no technical reason NOT to do so, your sites will work fine without www and they'll still be SEO friendly.

  28. Actually, you can also map the www-version of the domain to the same site, as the non primary.

  29. DrLightman
    Posted 5 years ago #

    I'm running 100+ blogs succesfully with domain mapping and WP3 multiste, but this last site I've added is driving me nuts -.-"

    mainsite: main.com
    blog added: remapped.main.com
    remapped to: vww.remapped.com

    There are entries in:

    wp_blogs (vww.remapped.com,/) yes I use www for all, more dumb-users-firendly :|

    wp_domain_mapping (reference to table above,vww.remapped.com,1)

    wp_131_options has siteurl and url "http://www.remapped.com/"

    And still, when I type vww.remapped.com, I get:


    And it opens a form with the username "vwwremappedcom" without dots, email blank, even if I disabled.

    (used vww in place of www to avoid damn url autoparsing)

  30. studyguidevn
    Posted 5 years ago #

    I have got the same issue when configured my multisite, the problem was because of your first setting up, I mean with www. or without www.

    Now I have successfully configured the multisite with a dozen sub-site as:

    You can visit my du hoc site and drop me a private message if need help:


Topic Closed

This topic has been closed to new replies.

About this Topic