Home / Articles / Web Tools / Increasing Website Speed With Cloudflare (Simple Setup Guide)

Increasing Website Speed With Cloudflare (Simple Setup Guide)

Why Do Website Owners Use Cloudflare?

Cloudflare is most well known for its Content Delivery Network (CDN). This helps websites lower web page loading speeds. The primary way this is done is via caching. However, Cloudflare also integrates several other technologies to help improve overall performance and security.

If you’re new to Cloudflare, be assured that the default settings you get are fairly reliable. However, since all websites tend to be configured differently, some fine-tuning may get you better results.

This simple guide aims to help you find the most optimal settings for your site.

Summary

For those who aren’t interested in a deep dive or have cold feet, you can just make a few minor tweaks. Leave most of the default settings and only check the following:

  • DNS – Only enable proxy for your domain name and WWW record. Toggling the proxy on for anything else may give you errors, especially if the record is pointing to an external server.
  • SSL/TLS – Set to FULL
  • Speed – Set Brotli to ON

In case you are new to Cloudflare, here's everything you need to know about the product.



Considering Cloudflare CDN?
Cloudflare Enterprise Add-on is included in all Cloudways' Premium Plans at just $4.99/mo per domain – which is much cheaper than you buy directly at Cloudflare (Cloudflare Pro cost $20/mo). To order and save money, visit Cloudways online.


Starter Guide to Cloudflare Settings

Cloudflare control panel
The overview of Cloudflare control panel. The tabs located above are the different settings you can make.

Since there are many options in the Cloudflare control panel, I’ll only be addressing those that need specific attention. Unless your site requires otherwise, leave anything else on the default settings.

Before You Start

If you’re planning to improve your site performance using Cloudflare and this guide, do so incrementally. This will help you more easily roll back any potential issues arising from changes you might make.

1. DNS

Once you’ve switched your Nameservers over to Cloudflare, this tab should self-populate from your records. 

Normally you should not have to change the settings here. However, I do recommend you set your domain name and WWW record to Proxied. These are usually the A and CNAME records.

To change the Proxy status, click on the grey cloud. Once it’s proxied the cloud icon should turn orange. Enabling proxy for those will help mask your server origins.

2. SSL/TLS

Overview – While not really helpful in increasing your site performance, a wrong setting here may have unintended effects. Specifically, unless you know what you’re doing, using the ‘Full (strict)’ mode may cause your site to stop working. Unless you have a reason not to, set this option to ‘Full’ and leave it that way.

Edge Certificates – Enable  ‘Always Use HTTPS’, ‘Automatic HTTPS Rewrites’. The latter is particularly helpful if you find yourself facing problems with your SSL status due to mixed content errors.

3. Firewall

Cloudflare firewall
The Firewall section lets you view events and set custom rules.

The Firewall section is mainly for use in customizing security for your site. I recommend that if you want to use Firewall Rules, observe your web traffic for some time first. As you go you will soon notice what looks suspicious or not. 

If you feel that certain IPs or IP address ranges are suspicious you can try blocking them by adding a rule. Add the IP address and include an action to take if anyone from the IP tries to access your site. Unless you’re certain it’s malicious or a bot, then set the action to ‘Challenge’.

Also read: 6 Things Must-do to Secure Your Website

4. Speed

This section will of course be of most interest to most users. Unfortunately, it contains a few paid choices. Still, some options are useful depending on how you’re running your site.

If you’re using AMP then enable AMP Real URL. This will help you avoid showing your mobile visitors strange AMP-ed urls. AMP tends to add some strange extensions to your URLS and enabling this fixes that issue.

Brotli helps with compression so make sure you enable that. Rocket Loader on the other hand technically sounds good, but I find that it tends to cause problems, especially with WordPress sites.

Minification is of course awesome but usage depends on how you’re already set up on your site. If you’re already running code minification with your site, then don’t enable it here. Minification is good, just don’t duplicate the function.

Also read: 8 Tips to Speed Up Your Website

5. Caching

By right caching should work ‘as is’ but there’s something here you need to use from time to time. If you make changes to your site and notice it doesn’t show online yet then come here and purge your cache.

6. Network

By default, HTTP/2 should be forced on but if you notice it isn’t and is off, turn it on. HTTP/3 is theoretically a lot better so if the option is available to you do try it out. It’s faster and more reliable than HTTP/2 while retaining the good characteristics.

Also read: 7 Tools to Stress Test Your Website

7. Scrape Shield

The only thing of note here on free plans is Hotlink Protection. While in theory it looks easy, it often needs a bit of tweaking on your web host before it’ll work properly. More often than not it will cause more headaches than it’s worth.

Instead of using this, I recommend you set up hotlink protection at the server level.

8. Apps

This is useful in many cases but the most outstanding way I think it fits in if you’re using a WordPress site. These rely heavily on plugins to extend features which is great, but it also increases your server load.

Instead of running them off your server, make use of Cloudflare’s apps instead. There are a fair number of them available for almost everything, from supporting PayPal payments to entire online store apps.

Final Thoughts: It Takes a Bit of Everything

There are various schools of thought when it comes to website performance improvement. Some place a heavy focus on TTFB, while others may look towards reducing resource usage or optimizing the site in other ways.

Personally, I feel that in order to truly get a green light in performance, you need to work at a little bit of everything. Most performance improvement tweaks give you very small boosts to speed or efficiency.

Only by combining them will you get truly satisfactory results. However, I will say that a CDN like Cloudflare helps you go a long way in a single package. Aside from this, what you need to seriously pay attention to is your web host.

This is something that you can’t control after you’ve signed up for it. Because of that, doing a bit more research can save you a lot of stress when it comes to server response speed or anything else you rely on your web host for.

Also Read

Photo of author

Article by Timothy Shim

Keep Reading