I always have trouble remembering the proper way to redirect my www.craigryder.com to craigryder.com so in the spirit of me posting stuff here so I won’t forget it, here it is.
Redirect www to non-www:
RewriteEngine On
RewriteBase /
RewriteCond % ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301
Redirect non-www to www:
RewriteEngine On
RewriteBase /
RewriteCond % ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
It is important to understand that there is a difference to the search engines between http://craigryder.com and http://www.craigryder.com . I will go into this more later or if anyone requests more info.