Support » Plugin: WordPress MU Domain Mapping » Pointing no submain to WWW

  • Resolved drokkon


    I have a problem getting people who type my domain without the www to get forced to my www subdomain.

    1. From my registrar, I have A records pointing, and to my IP address.
    2. From my registrar, I have CNAME records pointing, and to,, and, respectively.
    3. In WHM, I have and parked on top of
    4. In “Domain Settings” I have and pointed to their respective blogs.
    5. In .htaccess in public_html (my WordPress root), I have the following lines of code (in addition to the other code, including “RewriteEngine On”):
    rewriteCond %{HTTP_HOST} ^ [NC]
    rewriteRule ^(.*)$$1 [R=301,L]
    rewriteCond %{HTTP_HOST} ^ [NC]
    rewriteRule ^(.*)$$1 [R=301,L]
    rewriteCond %{HTTP_HOST} ^ [NC]
    rewriteRule ^(.*)$$1 [R=301,L]

    Basically, this is working when someone types in “” or “” But I get weird behavior otherwise:

    1. Typing in just actually brings me to for some reason.
    2. Typing in just gives me a cPanel/WHM “Default Website Page”

    Does anyone have any ideas where I’m going wrong? Thanks!

    PS: For what it’s worth, the forum is automatically adding “http://” to anything that I prefix with www. Please note that I did not mean to add http anywhere, so I don’t have “http://” typed into the domain settings or anything.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m having the same problem here.

    As a quickly solution, I added the domain twice under Settings > Domains. Once with and once without the ‘www’, both with the same site ID and that works.

    Problem is that the user will browse on the domain constantly that they entered the site with and this could cause problems with scripts and other things.

    If you have a solution here other than a hard redirect, please post back 🙂

    I guess if you create 2 records under Settings > Domains with the same site ID, one with ‘www’ and one without ‘www’ and you make the one with the ‘www’ Primary and the one without the ‘www’ not primary, it will redirect as needed 🙂 Try it out

    ID Domain Primary
    8 No
    8 Yes

    Thanks, Antonie. I should have mentioned that I tried that initially. It worked for (which was redirecting to for some baffling reason), but not for, which is still pointing to a default CHM/cPanel page.

    I’ve traced both of these domains all the way back through the process and, as far as I can tell, they are set up identically!

    Well, domains are like that, aren’t they? I gave it another day and it started working. How odd.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pointing no submain to WWW’ is closed to new replies.