Duplicate Content with Google [Solved 301 Redirect]

4 replies
For those that aren't aware. The same exact domain starting with .www and no .www for google means 2 different pages with duplicate content. You must go into your .htaccess file on your host and add 3 lines to fix this else Google crawler sees duplicate content and ranks you very far down.

The 3 lines for a 301 redirect are as follow... of course put your domain instead of the one below. In the case below you want Google to see only your .www domain.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.yourdomain.com$
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301]


You're Welcome,

Bernard St-Pierre
#301 #content #duplicate #google #redirect #solved
  • Profile picture of the author webapex
    Thanks for the sample code, .httaccess can be tricky for some.

    Some hosts also have www handling in their control panel, for example Dreamhost has under their Manage Domains:Webhosting, Edit:

    Do you want the www in your URL?
    * Leave it alone: Both http://www.YourDomain.com/ and http://YourDomain.com/ will work.
    * Add WWW: Make http://YourDomain.com/ redirect to http://www.YourDomain.com/
    * Remove WWW: Make http://www.YourDomain.com/ redirect to http://YourDomain.com/

    If I may add, when checking backlinks in tools like yahoo site explorer, you should try both www and no www versions of your domain, ideally only onew form will have links.
    Signature

    “An expert is a person who has made all the mistakes that can be made in a very narrow field” Niels Bohr

    {{ DiscussionBoard.errors[3184649].message }}
  • Profile picture of the author coluden
    I guess it takes some time to work. Tried it but got an error.
    Thanks for the info though.
    {{ DiscussionBoard.errors[3184682].message }}
  • Profile picture of the author Jun Balona
    Thanks for the tip alcymart.

    I did have difficulty redirecting my site (I have used redirect on cpanel and all I get is an error) so your advice was some great help.
    {{ DiscussionBoard.errors[3184728].message }}
  • Profile picture of the author MikeLiving
    I had a site hosted on Yahoo up until last month. I didn't have access to a .htc access file so I couldn't do a 301 redirect for the www. non www. issue. I ranked it on page one just fine even though I had what the industry calls "duplicate content."

    Again, is the sky really falling?
    {{ DiscussionBoard.errors[3184989].message }}

Trending Topics