WordPress.org

Support

Support » Multisite » [Resolved] How Do I Get SubDomains and Domain Mapping to Work Properly?

[Resolved] How Do I Get SubDomains and Domain Mapping to Work Properly?

  • I got WP Multsite properly installed which I am pretty happy about. However, I can’t seem to get SubDomains and Domain Mapping to work properly.

    I want the subdomains;

    site1.mysite.com
    site2.mysite.com

    to redirect to

    site1.com
    site2.com

    I setup the Wildcard Domain with my host, but I don’t see setting up subdomains as an option. I would appreciate any suggestions or tips.

    -Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • There’s no such thing as a Wildcard ‘domain’ for any host (that would imply that any URL it gets it would parse, which would slow your site down a lot).

    BEFORE you mess around with domain mapping, make sure that you have subdomains working. Gotta do things in order 😉

    So. Does site1.mysite.com work?

    No, site1.mysite.com does work. It gives you an option to create a new subdomain suchh as mysite.com/whateversite.

    I meant that I setup the Wildcard DNS in my host like this

    *.mysite.com

    Did I do something wrong?

    WildCard DNS is not the same as WildCard SubDomains

    DNS says ‘Hey world, anything.mydomain.com goes to mydomain.com!’

    Subdomains says ‘Hey server, if you get a request for anything.mydomain.com, send it through the code I put at mydomain.com’

    Normally a subdomain actually looks in a different folder you see. So if you want WildCards, where anyone can make a subdomain and it’ll magically work, you need both wildcard subdomains and DNS.

    It doesn’t sound like you did the WildCard Subdomain.

    Of course, it also sounds like you’re not using Subdomains because mysite.com/whatever is subfolders

    Subdomain is whatever.mysite.com

    You can’t really have both 🙂

    Sorry, I meant the subdomains (site1.mysite.com) are NOT working. I just checked and I did do the WildCard subdomain.

    For wildcard subdomains you need to
    1. Configure your DNS to point at your server (eg a * A record pointing to your server’s IP address).
    2. Configure your webserver software to pick up all subdomain requests. This varies depending on software used.

    Once you have done both, install domain mapping plugin. Create a blog and assign domain mapping.

    If you set up wildcard subdomains correctly, then anything.mysite.com would seamlessly redirect to mysite.com

    So if that is not happening, you did it wrong 🙂

    I have the subdomain correctly set under “Subdomains” with HG.

    HG. HostGator?

    If you go to anything.yourdomain.com, where do you end up? What page do you see?

    If you type in “anything.domain.com” it will redirect to the main site. Currently the MultiSite Setup creates subdirectories and not subdomains.

    Yes, HG means HostGator but I will be migrating to Site5.

    Alright 🙂 We’re going in the right direction at least!

    Back to this:

    No, site1.mysite.com does work. It gives you an option to create a new subdomain suchh as mysite.com/whateversite.

    Is it still telling you that new sites will be mysite.com/newsite?

    The main site that is running WP Multisite.

    Singing Dogs

    Here is a test site I created so you can see and there is no confusion.

    http://singingdogs.net/testsite/

    Okay. That’s not a subdomain, as mentioned before, so the obvious question is what’s in your wp-config.php for Multisite?

    Here is what’s in my wp-config.php file via PasteBin.

    You must have accidentally selected Subfolders on the Network Setup rather than Subdomains.

    Under the Multisite area, your code should be this:
    define('SUBDOMAIN_INSTALL', true);

    Not

    define('SUBDOMAIN_INSTALL', false);

    HTH!

    w3bgrl, THANK YOU! I can create subdomains now. 😀

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] How Do I Get SubDomains and Domain Mapping to Work Properly?’ is closed to new replies.
Skip to toolbar