Removing WWW - just not for SEO

This post is more than 18 months old. Since technology changes to rapidly, this content may be out of date (but that's not always the case). Please remember to verify any technical or programming information with the current release.

I used to think that I had to remove the WWW from my URL’s to stop having duplicate content. For example, if my website The Better Bachelor were to respond at both and, it used to be thought that this duplicate content would lower your search result quality. This would result in duplicate content.


(Remember, there used to be an issue with this with the trailing slash too - ie and would be duplicates)

It seems now - especially with the changes in the Google Webmaster Panel (where you can choose the WWW or the non-www to be the primary index), and by articles such as this one, the www’s no longer need apply.

However, I’m still lazy. I hate saying “double you double you double you dot the better bachelor dot com” Get rid of that other stuff…

So here’s the real meat of the article, however. I used to do this in my .htaccess file for each domain:

the old way

RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

This would make sure that the domain redirected with a 301 and was not processed anywhere else. However, after doing some more research, and running into the non www website at, there is a better solution. Let’s do it this way from now on:

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

Return to All Posts