View Single Post
Old 10-03-2007, 05:44 PM  
StarkReality
Confirmed User
 
StarkReality's Avatar
 
Join Date: May 2004
Location: 4 8 15 16 23 42
Posts: 4,444
Quote:
Originally Posted by xsabn View Post
add these lines in your .htaccess if you want your http://yourdomain.com to become http://www.yourdomain.com

Code:
Options +FollowSymLinks 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] 
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
Exactly ! It works the other way round as well. Whatever you do, make sure you have one standard definition for every domain, because getting www.domain.com and domain.com indexed means duplicate content that can easily hurt your rankings. Just one "wrong" link without the code above in your .htaccess could mess with your SE traffic.

I personally prefer the www.domain.com, surfers are used to www, although it is, technically seen, a subdomain of domain.com.
StarkReality is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote