CloudFlare can only accelerate and protect CNAMEs, not A records, which often includes the root domain. If traffic goes to a root domain and you want to accelerate and protect the traffic using CloudFlare, you can add a redirect to ‘www’ in your .htaccess file. Simply create or edit your .htaccess file in the public_html directory in your account. Replace the values with your real domain name.

 

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

Was this answer helpful? 14 Users Found This Useful (982 Votes)