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:
RewriteCond % ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301
Redirect non-www to www:
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 https://craigryder.com and https://www.craigryder.com . I will go into this more later or if anyone requests more info.