Removing www from your URL
I learned a few things while using the websiteGrader service.
1. Chances are 92 out-of 100 that Ryan Stewart’s DigitalBackcountry blog has a better grade than your blog. Trust me on this.
2. Search engines see your website at www.yourwebsite.com as a different website than yourwebsite.com. And that’s not a good thing.
To fix issue number one you’ll just have to write about 25 posts per day, every day, for the rest of your life.
To fix issue number two you’ll just need to add two lines of code to your htaccess file.
Here’s what you do: In your htaccess file – located in the root of your server – add the following two lines of code:
RewriteCond %{HTTP_HOST} !^youwebsite.com [NC]
RewriteRule ^(.*)$ http://yourwebsite.com/$1 [L,R=301]
What that does is take any attempts to visit www.yoursite.com and send them to yoursite.com.
Here’s my htaccess file that fixes the problem as an example.
I’m not sure what this might do to sub domains if you have them. I did test and make sure that links such as: www.polygeek.com/videomaru/ still sent browsers to polygeek.com/videomaru/ and that seemed to work fine.
Note to Ryan: you beat me by one percentage point this time. But you just wait. You, just, wait!
