WordPress.org

Forums

[resolved] How Do I Get SubDomains and Domain Mapping to Work Properly? (18 posts)

  1. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    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

  2. 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?

  3. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    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?

  4. 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 :)

  5. AdamsAutoAdvice
    Member
    Posted 2 years ago #

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

  6. TCBarrett
    Inactive
    Posted 2 years ago #

    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.

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

  8. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    I have the subdomain correctly set under "Subdomains" with HG.

  9. HG. HostGator?

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

  10. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    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.

  11. 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?

  12. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    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/

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

  14. AdamsAutoAdvice
    Member
    Posted 2 years ago #

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

  15. w3bgrl
    Member
    Posted 2 years ago #

    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!

  16. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    w3bgrl, THANK YOU! I can create subdomains now. :D

  17. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    Ohhh! I can't seem to get the domains to map properly. I made sure the domains point to the correct DNS, added them under "Parked Domains" in cPanel, and set the primary domains in the individuals sites dashboards. Now the domains I setup in Multisite are not working.

  18. AdamsAutoAdvice
    Member
    Posted 2 years ago #

    Checked the domains this morning and they are working now. I realized I had to wait for the DNS to update with my host.

    Soooo excited I have WP MultiSite working now! I appreciate everyone who commented and provided help.

Topic Closed

This topic has been closed to new replies.

About this Topic