Posts RSS Comments RSS 60 Posts and 137 Comments till now

Remove www Duplicate Content

So for some random reason Google sees versions of your domain with and without www as unique content.

This is bad because Google hates duplicate content and it will rank both seperately.

To cure this we mod_rewrite once again using the following code.

Place this in your .htaccess file right after RewriteEngine On.

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

It redirects all non www urls to www using a 301 redirect which Google is ok with.

If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: Remove www Duplicate Content

One Response to “Remove www Duplicate Content”

    Pingbacks/Trackbacks

  1. […] www Redirect If you want an easier way of doing the redirect than Remove www Duplicate Content you can install a Wordpress plugin that does the exact same […]

Trackback this post | Feed on Comments to this post

Leave a Reply

Close
E-mail It