WordPress MU Domain Mapping
Still not working... How to redirect non-www to www on mapped domains? (4 posts)

  1. Brian
    Posted 3 years ago #

    This has been addressed in other threads here, but the solutions are not working for me.

    Let me explain my setup more clearly:

    I have a multisite network built around maindomain.com. I have clients websites on my network, which initially get client1site.maindomain.com, client2site.maindomain.com, etc. I then use domain mapping to map the client's own domains to the sites.

    I'm using CNAMES and not A Records (IP address) to point clients domains. The reason is, I don't want clients to be tied to my servers IP address, just in case I ever decide to move servers I don't have to ask every client to change their A Record setting.

    Here is what I'm doing for each client's domain mapping:

    Add client1site.com as a Parked Domain in my cpanel.

    Set a CNAME at the client's registrar, pointing http://www.client1.com to client1site.maindomain.com

    In Network Admin > Domains, I add the following two entries:

    Site ID 34 (whatever the clients site ID is)
    Primary: Yes

    Site ID 34 (whatever the clients site ID is)
    Primary: No

    Now how do I ensure that client1site.com redirects to http://www.client1site.com?

    I have tried setting up a "Forward" at the clients registrar. Most of the time, this just doesn't work (every registrar is different).

    I have tried adding the redirect code to my main site htaccess (as described in this thread) but that doesn't affect the mapped domain at all.

    Please help :)


  2. Brian
    Posted 3 years ago #

    by the way - this forum added http:// to those www urls. Not me.

  3. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

    If the solution in the thread you linked to did not work then you may have added the code to the wrong location in your htaccess. Another possible issue is that rewrites are not enabled for that vhost.

  4. Brian
    Posted 3 years ago #

    Thanks Ron,

    I tried placing the code from that solution in every possible position in the htaccess file, nothing worked.

    Question 1: So the htaccess in the root level of the multisite installation does in fact affect redirects for mapped domains on the network (not just the main domain). Yes? (I wasn't sure...)

    Question 2: "rewrites not enabled for that vhost"... can you clarify? I have a managed VPS hosting. Should I contact them and ask them to enable redirects? Is there another way to check whether or not they are enabled?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic