What are the benefits of using CloudFlare?
Quite a few things, all of them being free to use:
- your website is now using one of the fastest DNS servers
- your website is reachable via https://yourdomain.com
- your website is blazing-fast and cached on servers all over the world
- your website is resilient to DDoS-attacks and other spikes of traffic
Using CloudFlare: performance comparison before and after
Here's the raw data:
|before enabling CloudFare - WebPagetest|
|after enabling CloudFlare - WebPagetest|
|before enabling CloudFlare - PageSpeed Insights|
|after enabling CloudFlare - PageSpeed Insights|
How to configure CloudFlare?
- Sign up at cloudflare.com
- Follow CloudFlare setup
- Add your domain
- Make sure they imported all DNS-entries for your domain (about half of them missing in my case). Also make sure the "Status" of each entry is an orange cloud-icon. That means that all traffic is going through CloudFlare's server. Only if you enable this you'll benefit from the features offered by CloudFlare - otherwise it's just a plain DNS server.
- Change nameserver at your domain registrar
- Configure cloudflare
- Default settings are mostly fine, I turned down "Security Level" to "Low" because I want to avoid false positives where some of my visitors have to enter a captcha before reading my blog...
- Wait for the DNS changes to kick in (1-2 days), see if everything still works fine and then give "Rocket Loader" a try. Set it to "Automatic", force-reload your website and see if everything works as expected.
- Create a "Page Rule" for "yourdomain.com/*" (e.g. "tomtasche.at/*") and set "Custom Caching" to "Cache everything"