Support » Multisite » Multiple Domains, One Site

Multiple Domains, One Site

  • It should be simple, and I have read many posts with no results.

    I have multiple domains that post to the same directory on my server (where the wp is). The problem is all the links redirect to the main domain. I need it so the domain name does not change.

    Example: sitea.com siteb.ca sitec.info
    When I click a link in sitea.com it will go to sitea.com/newpage
    When I click a link in siteb.ca it will go to siteb.ca/newpage
    When I click a link in sitec.info it will go to sitec.info/newpage
    Rather than:
    When I click a link in sitea.com it will go to sitea.com/newpage
    When I click a link in siteb.ca or sitec.info it will still go to sitea.com/newpage

    I don’t need the page to be different per domain, it needs to be all the same but keep the domain visited!


Viewing 8 replies - 1 through 8 (of 8 total)
  • You would do this by placing the below code in wp-config.php

    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

    See Codex: Editing WP-Config.

    BIG WARNING: Making the change you are describing will significantly hurt your search engine rankings. WordPress forces a single domain because that’s correct behavior for online content. If you set up many domains for one set of content, at the very least research setting up rel=canonical tags.

    try using MU-Domain-mapping plugin

    The MU Domain Mapping plugin would not work in this situation, because @darkxpunk is running a single site, not a network. MU Domain Mapping only allows configuration in the Network Admin, which does not exist in a single-site install.

    If @darkxpunk isn’t running a network, he’s in the wrong subforum.

    And @pdclark‘s warning is not only correct, but super important. This is a BAD IDEA. You don’t want to redirect and keep the old URL, you want to legitimately redirect.

    Good point @ipstenu. I had only ben looking at @darkxpunk‘s wording, not the subforum. Either way, unless he jumps in with more info, he has three correct answers now, with the most important being “hey… don’t do that.” 😉

    @pdclark, I think you should trademark “hey… don’t do that.” 🙂 It is a powerful, necessary and repetitive response on forums. I like it better than “you’re doing it wrong”.

    I’m looking to do something pretty similar myself as I’m setting up WordPress for an enterprise whose naming standards dictate that the front-end have a different URL to the back end:

    ng.live.platform.organization.net – should serve wp-admin (or at least the site) over SSL-Akamai.

    http://www.organization.org.ng – should serve the non-encrypted site through Akamai.

    Any thoughts?

    jcpeden – You should make your own topic, but be aware, I don’t know if anyone’s done this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple Domains, One Site’ is closed to new replies.