Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Canonical Parked Addon Domains Sub Domains .htaccess

Discussion in 'General Discussion' started by richardmorris, Jul 15, 2013.

  1. richardmorris

    richardmorris Registered

    Jul 13, 2013
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    I want to make all of my parked and addon domains and sub domains canonical for better SEO on Google using the .htaccess file.

    I used the following lines but it only works for my parked domains and sub domains but not for my addon domains and sub domains, see below:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    Add on domains and sub domains failure: permanently redirects to Failure permanently redirects to Failure

    Parked domains and sub domains successful: permanently redirects to Success permanently redirects to Success


    One .htaccess file to control the canonical www in all of my parked and addon domains and sub domains.

    But I don’t know the correct lines of code to use in my .htaccess file to make this work?

    Please help.

    Thank you,
    Richard Morris
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may find more user input for custom rewrite rules directly from the Mod_Rewrite Forums.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice