A step-by-step guide to implementing Cloudflare to boost your website security & load time.
Your site load time & security is two essential elements for online success business. Not necessary for E-Commerce but any type of business including your personal blog.
Fast loading web page gives better user experience and boosts search engine ranking. Nobody like slow loading website, do you?
A little introduction about Cloudflare if not sure what I am talking about.
Cloudflare is CDN & Security company powering millions of website including Geek Flare. CloudFlare has more than 75% of market share in Alexa top 1 million sites.
That explain a lot and give enough credibility to use it. Cloudflare got 115 network POP (point of presence) across the world which means the request is always served from nearest location faster.
To show the difference in load time before and after, I’ve used my test URL with the following setup.
- I am using “techpostal.com” which is hosted on Site Ground under $3.95 monthly plan.
- I’ve setup WordPress with Maker Pro child theme of Genesis without any cache, security plugin.
- I’ve also disabled SG cache by Site Ground to avoid any caching for better consistency in the test.
Site load time before Cloudflare
Let’s see how much time it takes to load techpostal.com without Cloudflare. I used BlazeMeter to run a test for 5 minutes.
Let’s focus on these number (will compare the performance after Cloudflare)
- Average response time – 692.8ms
- 90% response time – 877ms
Onboarding your website to Cloudflare is quite easy, and you can get it started in just a few minutes.
The following, I’ve used their FREE plan and procedure will apply to any website including WordPress, Joomla, Magento, etc.
Let’s get it started…
- Create a Cloudflare account
- Enter your website and click “Scan DNS Records.”
- It will take a minute to scan existing DNS records, click continue
- You will see the existing DNS records for your website. If they look good then continue else you can modify it here.
- Select the plan and continue
- You will be asked to update existing name server record with Cloudflare. This you got to do at Domain registrar. If you are not sure, you can refer this guide.
- Until name server is updated, you will see the status as pending on Cloudflare dashboard.
Note: you may use the DNS record lookup tool to verify the NS record.
- Once updated, you will notice status is active.
This concludes your website is successfully routed through CloudFlare network and ready to take performance & security advantages.
The default configuration is ok but if you want to take maximum benefits, then you may considering doing the following.
HTTPS Rewrites – if you intend to use SSL then you got to activate “HTTP Rewrites” to ensure all resources are loaded over HTTPS and avoid any mixed content issue.
- Go to Crypto tab and turn on “Automatic HTTP Rewrites.”
Note: if you are using WordPress or Joomla then you may notice mixed content issue and page might be broken. To fix that, you need to use an additional plugin as explained here.
- Go to speed tab and select the checkbox
Rocket Loader – Rocket Loader solution is a trademark of Cloudflare which does many things like reducing the number of requests, loading scripts asynchronously, caching scripts locally, etc.
- Under speed tab, select Automatic for “Rocket Loader.”
Thea above essential configuration should be enough to accelerate.
Site load time after Cloudflare
I ran the test again with BlazeMeter and here is the result.
- Average response time – 609.3ms
- 90% response time – 628ms
You can see average response time is decreased by more than 10% and maximum (90% response time) by more than 25%.
Having web page load time decreased by using Cloudflare FREE plan looks promising. If you are looking for a quick win, you can give a try.
Cloudflare does have paid plan with more features like WAF, Image Optimization, Mobile optimization, etc.
So if you are serious about website optimization & security, then you may consider spending few dollars on paid plan or other solution like SUCURI, etc.