How do I put my root domain under cloudflare?


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’.

If the user does not forward the traffic, then any traffic to will be accelerated and protected by CloudFlare (and shown in the statistics) and any traffic to will not be served by CloudFlare.

If you are using .htaccess to do redirections, here is how you implement a redirect:

   `RewriteEngine On
   RewriteCond %{HTTP_HOST} ^$ [NC]
   RewriteCond %{SERVER_PORT} ^80$
   RewriteRule ^(.*)$$1 [R=301,L]`