I know and I use Cloudflare service for a client’s projects for years. Yet, I am not convinced to use them on my blog for several reasons.
Among those reasons, the most important one is I don’t want to switch the name server to theirs. Several days ago, I try it through the Cloudflare menu on Cpanel. I tried to switch using CNAME, but I could not figure out for the whole day.
I even open a ticket on my hosting dashboard on VeeroTech. Their supports are good and they’re trying to help me. But, since I have no more time to tackle this, I reverted changes and close the ticket, then tell them that everything is okay for now.
Then, today I notice the trends that traffic from outside of North America regions are steadily growing. The most noticeable were from the EU and Australia.
Yet, I know that this blog will not be fast enough to serve users from those regions because it’s not using any CDN services. I finally decided.
Why don’t I try to set up Cloudflare once again? This time, I go through directly on the Cloudflare dashboard and switch the name server to point to CF name servers.
It said it would take several hours to propagate. And I know that. Changing name servers will take a least 24 hours to propagate all over the world.
But my thought was wrong. I checked several minutes later, and I saw the name server already propagated to the CF name server. Cool
The next thing I do is making sure all of DNS records (CNAME, A, MX, and others) are imported on the CF DNS management dashboard. Once I am sure of it I did
- Check the e-mail. Make sure the MX records are working and I can send and receive e-mail correctly.
- Tweak the options on Cloudflare dashboard, which are available for free tier plan.
- Turn off the Shortpixel CDN provided by the Autoptimize plugin.
- Open two other browsers: Chrome and Safari, clear up their caches and check the site manually to make sure nothing was broken.
- Open GTMetrix, Google Pagespeed Insight, and Pingdom to do benchmark tests.
GTMetrix score for Pagespeed and YSlow are now both A. Google Pagespeed Insight tool also shows improvements for both mobile and desktop. Earlier, before using Cloudflare, the mobile score was around 65 and the desktop one was around 85.
After using CF, the mobile score is 95, and the desktop one is 96. What a great leap in the score. Not only that, when I tested it using Pingdom from Australia location, the page loads in 2 seconds. Before the switch, it loads in nearly 4 seconds.
Ok, enough with the story. Let’s get into the reasons why you should consider using CF like I do.
Think of it as a guard
Yes, think of Cloudflare as a guard that protects your site’s server. In case something is attacking your site, Cloudflare which sits in front of your site’s server will handle the attack. Thus, the attacks won’t reach your site’s server.
I read many cases where a web hosting terminated the service for a site owner because his site was under attack. Since it’s a shared web hosting, usually, such an attack will affect the other customers too. And the company usually didn’t want to do anything except terminated the customer’s site that’s under attack to save the rest.
As a middle man
Cloudflare will cache your site. If there’s a visitor tries to open your site, then Cloudflare will check if it has the cache on their side. If they have, then they will serve the request using that cache. This means the requests didn’t touch your server.
This can save a lot of resources. Remember that, even if your hosting company said your site bandwidth is unmetered it doesn’t mean unlimited. At some points, when your bandwidth usage crossed their maximum threshold, they’ll urge you to upgrade to the more expensive plan. Or, they will simply terminate the service for your site.
Cloudflare will give you a free CDN service, and serve your site from the nearest server from your visitor’s physical location. This is the key why using Cloudflare will help your site if its visitors are spreading around the world.
You can take a look on this map, to see those locations https://www.cloudflare.com/network/
Block the traffic based on user-agent
You can block the suspicious traffic or bots based on the user agent. For a free tier plan, they allow up to 10 user agents to be blocked.
Cloudflare provides us with comprehensive analytics. This is where we can see the requests that are cached by Cloudflare or uncached. Not only that, but there’s also an option to see the unique visitors and their county origin.
I know many web hosting now are supporting SSL certificate from Let’s Encrypt. However, in case your host did not support it, you can set up Cloudflare and it will issue SSL certs for your site’s domain.
Even better, there are options to enable the HSTS (HTTP Strict Transport Security) so the browsers will refuse to open your site if it’s not on https protocol.
With this, you can request your site’s domain for HSTS inclusion too. But before you did it, please read this first.
There are still many advantages to using Cloudflare, but I only listed the ones that are relevant to my case here. But, it doesn’t mean there are no drawbacks to use Cloudflare. There is one, as I notice so far: when they are down, your site will be down too unless you enable load balancing for at least $5/month.