Hello and welcome to another tutorial. In this article, I will give you an example of how to set up a Content Delivery Network, in this particular case – Cloudflare.
1. What is a Content Delivery Network?
CDN providers have servers located around the world and enable them to cache resources (e.g. your website) throughout the world. This allows users who are requesting your page from another region than the originating one, to have a fast page load by being closer to an edge server of the CDN.
Cloudflare is a popular option due to a free plan that covers all the basic needs.
2. Cloudflare Setup
Let’s start setting up a new Cloudflare account! I will lead you through the sign-up process step by step and give you suggestions on which settings you will need.
Step 1: Create an account on Cloudflare.
Step 2: Add your website.
Step 3: After adding your page successfully, Cloudflare will ask you to change the nameservers in your hosting or registrar to the nameservers of Cloudflare.
Step 4: Go to your hosting solution page or registrar and change the existing nameservers to Cloudflare’s nameservers.
Example from HostGator:
Usually, it takes some time until the changes are successfully done!
Cloudflare will notify you about it in their dashboard.
3. How to configure Cloudflare
Step 1: In the “SSL/TLS” section choose the “Full” end-to-end encryption to assure full security.
Step 2: In the “Speed” section you can choose options like “Auto Minify” (reduction of file size of your source code) which most of your cache plugins are already covering and you only need to use one of them!
“Brotli” is similar to the GZIP compression, just a little more efficient.
Step 3: In the “Caching” section set the Caching Level to “Standard” which is the most aggressive caching of your page.
Set your “Browser Cache TTL” to 2 months.
Step 4: Under the section “Page Rules” – Cloudflare allows you to set up three-page rules for free.
Cloudflare suggests the following.
Page Rule 1:
Page Rule 2:
Page Rule 3:
Join Our Weekly Newsletter
Get our tutorials about blogging, hosting, Pinterest, how to drive traffic to your blog, caching, and image optimization. No charge. No spam. Only knowledge.