The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

add www to web site domain

Discussion in 'General Discussion' started by tazosmr, Jan 24, 2013.

  1. tazosmr

    tazosmr Registered

    Joined:
    Jan 24, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    hello. Instead of CN records, there seems to work this solution:

    In your FTP root (maybe in public_html) should be a file called .htaccess, then open it and add this code into it (problably after the first line, bofore other rules start) .



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

    ( if there is not such file, then create a simple new text file with notepad and upload to the website root directory, and rename it to .htaccess )


    This is 301 (which is permanent redirect), and then after a few weeks the site will be visible with www in Google search engines anymore.
     
  2. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page