« URL Rewrites | Home | Pogo said it well … “We have found the enemy and he is us.” »
Dub Dub Dub or domain.com?
By admin | September 4, 2008
It has often come up about whether a site should be known as www.site.com or just site.com … you should be one or the other, but my advice is to be www.site.com … case closed.
But, people are going to type your site in as site.com over and over. I’ve even seen sites listed as wwww.site.com and also site.com on the engines, although the major engines today deal with this better. I still believe strongly that you should redirect anyone who types in site.com to www.site.com.
Here is how to do it. Open your .htaccess file (you are on an Apache Linux system right?) and add this to the file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site\.com
RewriteRule (.*) http://www.site.com/$1 [R=301,L]
That’s it … just those three lines of code is all it takes to Permanently Redirect anyone who types in site.com to www.site.com. Nice, easy and the appropriate, accepted by the engines, way to do it.
Cheers!
Topics: Uncategorized |

Comments
You must be logged in to post a comment.



