8 points · by mleonhard · 14y ago · 21 comments
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]You can't use a CNAME record for your root domain. This is a problem for me and lots of folks who run their web servers behind Amazon Elastic Load Balancers or other CNAME-based services. RootRedirect solves the problem nicely.
Amazon Route 53 solves this problem with an alias record, though your service may be easier to use or cheaper than what Amazon offers.
server {
server_name example.com;
rewrite ^ http://www.example.com$request_uri? permanent;
}For my business, I prefer paid services over a free ones. You never know when a free service will go down or the company bought and shut down.
Search engines penalize sites with the same content on their root and www domains. They treat the domains as separate sites with duplicate content and flag them as spam. Use RootRedirect.com to avoid this penalty and improve your site's SEO ranking.
There's no penalty, you're just forcing search engines to pick one version and potentially splitting the back-link equity that would occur if both www/no-ww resolve to a single location. Duplicate content should not be associate with spam either, since a VERY large majority of enterprise sites have this issue.
I added this for you, Ben. Please sign up! :D