Use 301 Redirects to Properly redirect www urls to non-www urls
- by Seth Carstens
- August 6, 2012
In the “.htaccess” file in the root of your website you need to add the following code to the TOP of you file.
|
1 2 3 4 |
# Handle duplicate content with redirects RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^(.*) http://%1/$1 [R=301,L] |
