WordPress.org

Support

Support » Multisite » [Resolved] 3.0 Multisite Domain Headaches – Mapping DNS to subdomain?

[Resolved] 3.0 Multisite Domain Headaches – Mapping DNS to subdomain?

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

    Details:
    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.

Viewing 15 replies - 1 through 15 (of 29 total)
  • Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    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.

    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 11.11.11.11 (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 – 11.11.11.11. 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.

    Followup:

    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.

    Hmmm…
    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. 🙁

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    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

    http://plugins.svn.wordpress.org/wordpress-mu-domain-mapping/trunk/

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

    WordPress 3.0: Multisite Domain Mapping Tutorial

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

    Yes! The trunk version was the fix.

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

    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.

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    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.

    (doublepost) Stupid clicky button. 🙁

    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.

    Here’s a login so you can see what I mean:
    metagnosis.net/wp-admin
    Login: drone
    Pass: haltime

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

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    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/ ?

    Did you check the “remote logins” checkbox under the Super Admin Domain Mapping menu item?

    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.

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    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:

    http://blog.dembowski.net/wp-content/wordpress-mu-domain-mapping.zip

    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.

    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? 😉

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘[Resolved] 3.0 Multisite Domain Headaches – Mapping DNS to subdomain?’ is closed to new replies.