WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
Primary vs. secondary domain used for www? (10 posts)

  1. Strategerizer
    Member
    Posted 2 years ago #

    When setting up domain mapping for a subsite, do I need to add both the www. and the non-www. URLs?

    In other words...

    Say I want my subsite at http://subsite7.supersite.com to be deployed and accessible at http://www.client7.com.

    Do I need to set up mapping for both, so "active domains for this blog" show as:

    http://www.client7.com
    http://client7.com

    ...and set the www. one to be "primary"??

    Do I need to set up the second one (non-www) at all? (Can traffic going to non-www be directed to www based on some settings at the registrar?

    Thanks!

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. Mossill Montgomery
    Member
    Posted 2 years ago #

    wow, I was just having this issue also. Did you find a solution ?

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    When setting up domain mapping for a subsite, do I need to add both the www. and the non-www. URLs?

    No. If you want DM to pick up both www and non then only map the non www version of the domain.

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    If you want to force the non www domain to the www the map the www and add a rewrite rule to your .htaccess to rewrite the non www to the www.

  5. Mossill Montgomery
    Member
    Posted 2 years ago #

    When I put in "domain.com", it works. But www jumps to the non-www.

    I want the www to remain that way. Is this possible ?

  6. Strategerizer
    Member
    Posted 2 years ago #

    @Ron, I am not sure I understand your second answer. I think what you are saying is to have only one mapping set up in WP, right?

    Using the names in my example I would have mapping set for http://client7.com and that's it.

    Ans if I want the www. version to be the main website (http://www.client7.com) I would need to edit the .htaccess for that subsite??

    I wouldn't be able to just map to http://www.client7.com directly??

    Thanks.

  7. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    @Strategizer - I'll rephrase

    If you want to force http://client7.com to the http://www.client7.com then map http://www.client7.com and add a rewrite rule to your .htaccess to rewrite the http://client7.com to http://www.client7.com.

    You can also do the http://client7.com to http://www.client7.com redirect in your DNS.

  8. Strategerizer
    Member
    Posted 2 years ago #

    @Ron - thanks for the clarification... I think I got it, or at least part of it.

    The following setup seems to be working. Does it look good to you? I guess this is too important to not be done right....

    1. At domain registrar: I set up the domain (DNS) for the subsite owner to point to the right IP address of my multisite install

    *.client7.com --> xx.xx.xx.xx (ip address of my multisite)
    @.client7.com --> xx.xx.xx.xx
    www.client7.com --> xx.xx.xx.xx

    [ignore "http://" whihc is added automatically by this forum engine]

    2. On server using cPanel: Parked user's domain (client7.com) on the server

    3. In WordPress Domain Mapping: Set up domain mapping for that subsite to add "client.com" as a domain and made it primary.

    This seems to be working fine and looks right. The site will be shown when a visitor goes to either:
    http://client7.com
    http://www.client7.com
    http://random-string.client7.com

    All versions will actually go to http://client7.com (without www)

    Now, if the user wants their primary web address to have the www... so all of the go to http://www.client7.com

    I simply add http://www.client7.com in WordPress Domain Mapping and just set it to be the primary ; that seems to be working (all traffic resolves to http://www.client7.com) Do I need to do anything else? (e.g. Park http://www.client7.com on the server too? Do anything else on the DNS side?)

    Additionally I am thinking about removing the hard-wired dependency on the IP address and use the CNAME option instead but that is also somewhat unclear. If you have any insight on that, would be great!

    In the DNS settings for client7.com will I need to simply point to supersite.com, like so below?

    *.client7.com --> supersite.com
    @.client7.com --> supersite.com
    www.client7.com --> supersite.com

    [ignore "http://" whihc is added automatically by this forum engine]

    (or to some subdomain like redirect.supersite.com which in turn points to the xx.xx.xx.xx ip address of the supersite?)

    At least on Network Solutions DNS panel it looks like I cannot set the above; it is giving me an error that A records already exist. But if I have to delete the A record in order to create the CNAME, the site will break after I delete the A and before the CNAME is propagated...

    Thoughts?

  9. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    In the DNS settings for client7.com will I need to simply point to supersite.com, like so below?

    That works. What I was referring to above was a redirect which is different than what you are doing. What you have will send both the www & non www traffic to your WP install. If you set up the redirect then the non www will be redirected to the www at the DNS and all the requests coming into your WP install will be for the www.

  10. Strategerizer
    Member
    Posted 2 years ago #

    Thanks for the clarification; much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic