Cloudflare is a content delivery network that provides DNS, DDoS protection, and security services. It spans 194 cities in more than 90 countries.
Also, if you are looking for an easy way to enhance the security and speed of your WordPress site, Cloudflare is a great solution.
In this article, I’ll show you how to setup Cloudflare for your WordPress.
So let’s get started…
Brief Descriptions of The Content
What is Cloudflare
Cloudflare is one of the world’s largest networks that make websites more faster and more secure.
Cloudflare CDN group of servers that delivers your website’s files faster to the users based on their geographic location. It is widely used. It solves a very important problem: latency.
In addition, It has a firewall feature. It monitors all traffic coming to your website and stops suspicious traffic before reaching your server.
They offer both free and premium plans. Its basic plan is free and suitable for small business websites and blogs. However, its paid plans starting at $20 per month.
Why You Should Use Cloudflare
Cloudflare works between client and server. It creates cache version of your website on its own different server and distributes to visitors by the nearest Edge server. As a result, your site loads faster.
It also provides security by protecting from malicious activities like DDoS attacks, malicious bots, and other bad activities.
What are Pros and Cons of Cloudflare CDN
Benefits of Cloudflare
1. Free CDN
It easily integrates with your blog or website. When you setup Cloudflare, it caches your static file (CSS, JS, Images).
Using Cloudflare CDN, you can increase your blog’s loading speed up to 50%.
2. Minification
It minifies unwanted files from your website that does not need your blog.
Cloudflare minimizes the size of the web page by removing unnecessary files and the webpage becomes faster than ever.
To improve website loading speed, click on the Speed tab and enable CSS, Javascript, and HTML.
3. Free SSL
SSL is also one of top SEO ranking factors. HTTPS sites get better rank in SERPs.
Cloudflare offers free SSL certificates.
If you are running a small business then you can take advantage of Cloudflare’s free SSL certificate. You do not have to pay for this. It offers a free flexible SSL certificate for the lifetime.
4. DNS propagation
When you change the hosting, you do not wait for DNS propagation. Go to your Cloudflare Dashboard, and change your server’s IP address. By doing this, your domain name will immediately point.
5. Saves Bandwidth
Cloudflare scans spam traffic and saves your bandwidth. This is also a great benefit of using Cloudflare.
Many people say that their traffic decreased when they started using Cloudflare. The main reason for this is that Cloudflare blocks spam traffic.
6. Image Optimization
You can reduce image size by 60% with the help of Cloudflare. If you use a lot of images on your blog, you can optimize your image using the Polish feature of Cloudflare.
But if you want to use the Cloudflare’s polish feature then you have to upgrade from free to a paid plan.
7. Performance and Protection
Cdn makes your site 200% fast, and Cloudflare is a CDN that provides security with improving your blog performance. And this is essential for any online business (small and big).
Cloudflare protects your website from attack and makes a safe environment for your website.
Disadvantages of using Cloudflare
1. Some Bug in SSL certificate
Setup of Cloudflare free SSL is very easy and beginners can also easily install on their blog or website but sometimes there is a problem in it and even after fixing does not work properly.
2. No Live Chat
Cloudflare does not support live chat and many times they respond to your mail within 1-2 business days. Most CDN support live chat but Cloudflare does not.
How To Install Cloudflare On WordPress
First, visit Cloudflare official site and sign up for it. Here is a complete guide – Create a Cloudflare account and add a website
After sign up, enter your website’s URL and hit on Being Scan.

Cloudflare will scan records. It takes a few seconds to complete the process. After scanning, a new page will open where you will need to click on the Continue button.

Next, choose the Cloudflare pricing plan and hit on Continue. Its Basic plan is completely free. You can also choose a paid plan to get more great features.

Now Cloudflare will give you two Nameservers to point your Domain on Cloudflare.

Add these Nameservers to your Domain. For this, go to the domain settings and add these nameservers in the Nameservers option. (Delete all existing Nameservers and use only Cloudflare Nameservers for your domain).
After entering Nameserver, go to your Cloudflare Account and click on Recheck Nameservers.
Note: It can take 5 minutes to 24 hours to live your site on Cloudflare.
Now, you have successfully setup Cloudflare for your site.
Basic Cloudflare Settings For WordPress
- Configure SSL – SSL/TLS tab has options to enable free SSL.
- Create Firewall Rules – You can protect sensitive data of your website by creating Firewall Rules that stop hackers from accessing them.
- Create Page Rules – Page Rules optimize specific URLs for performance and security. You can create up to 3 page rules for free.
- Configure The Speed Tab – You can minify HTML/CSS/JavaScript, optimize images, accelerate delivery of dynamic content, enable Brotli (similar to gzip), and improve the paint time for pages which include JavaScript.
- Enable Hotlink Protection – Find in scrape shield tab, prevents people from copy-pasting your site images and save bandwidth.
- Rate Limiting (Paid Feature) – Prevents spammy crawlers from hitting your site too much (find in Firewall >> Tools tab).
Cloudflare Tabs Settings
1. Overview
This tab contains some quick links which are the most important Cloudflare settings.
Security – Shows a quick overview of your site analytics. Also, have a quick link to enable SSL, firewall, etc.
Performance – Speeds up your WordPress site by activating minifying files, Brotli, Railgun, Rocket Loader, hotlink protection, image optimization, accelerated mobile links.
Quick Actions – Allows to take any action quickly such as Purge Cache, DNS Settings, Under Attack Mode, Development Mode and more.
2. Analytics
In the Cloudflare’s Analytics tab, you can see your site’s stats such as Traffic, Security, Performance, DNS, Workers.

3. DNS

DNS records (aka zone files) are instructions that provide information about a domain including what IP address is associated with that domain.
Right now you have nothing to do here. Because we have already added our site to Cloudflare.
4. SSL/TLS
If you have not purchased SSL for your site, you can use Cloudflare SSL for free. Just check the Flexible option.

Next, click on Edge Certificates option and configure the settings by screenshot.

In the screenshot, I checked the following options.
- Always Use HTTPS – Redirect all requests “HTTP” to “HTTPS”. This applies to all HTTP requests to the zone.
- Minimum TLS Version – You can also change the Minimum TLS Version for your site.

- Opportunistic Encryption – Opportunistic Encryption allows browsers to benefit from the improved performance of HTTP/2 by letting them know that your site is available over an encrypted connection.
- Onion Routing – Allows routing traffic from legitimate users on the Tor network through Cloudflare’s onion services rather than exit nodes, thereby improving the privacy of the users and enabling more fine-grained protection.
- Automatic HTTPS Rewrites – Automatic HTTPS Rewrites helps fix mixed content by changing “HTTP” to “HTTPS” for all resources or links on your web site that can be served with HTTPS.
Leave other settings default on this tab.
5. Firewall
A firewall is a security system that monitors and controls network traffic based on a set of security rules.
If you want to create Firewall Rules for your site, just click on the Create Firewall Rules button.

Next click on Tools.

- Rate Limiting – Protect your site from malicious traffic or fake Google crawlers and spammy bots.
- User Agent Blocking – Create a rule to block a specific User-Agent from accessing your zone. It is mainly used if you are under attack from a specific user-agent.
6. Speed
Make your site faster by minification, image optimization (Polish + Mirage, Railgun, Rocket Loader, Brotli and more.

- Auto Minify – Minify HTML, CSS, and Javascript and reduce the file size of source code on your website.
- Brotli – Speed up page load times for your visitor’s HTTPS traffic by applying Brotli compression (similar to gzip compression).
- Rocket Loader – Improve the paint time for pages which include JavaScript (you can enable).
- AMP Real URL – Display your site’s actual URL on your AMP pages, instead of the traditional Google AMP cache URL.
7. Caching

- Purge Cache – Clears Cloudflare’s cache.
- Caching Level – Set how much static content Cloudflare will cache. Increased caching can speed up page load time.
- Browser Cache Expiration – Set cache of a visitor’s browser will expire after visiting the page.
- Always Online™ – If your server goes down, Cloudflare will serve your website’s static pages from cache.
- Development Mode – Temporarily bypass cache allowing you to see changes to your origin server in realtime.
8. Workers
Run JavaScript Service Workers in hundreds of Cloudflare data centres around the world. Modify a site’s HTTP requests and responses, make parallel requests, or generate responses from the edge.
9. Page Rules
Control your Cloudflare settings by URL. Just click on Create Page Rules.

Page Rules optimize specific URLs for performance and security. You can create up to 3 page rules for free. Here is a guide on Cloudflare official site – Must Use Page Rules for Everyone
Common Page Rules
- Always Online – If your server goes down keeps a limited version of your site online.
- Browser Integrity Check – Deny spammers from accessing your website.
- Browser Cache TTL – Instructs a visitor’s browser to cache a resource by setting the Cache-Control header’s max-age. Here is an official guide – Understanding browser cache expire TTL
- Disable Performance – Turns of auto minify, Rocket Loader, Mirage, and Polish.
- Edge Cache TTL – How long the Cloudflare edge servers will cache a resource before going back to your origin web server for a fresh copy.
- Cache Level – Amount of caching done by Cloudflare.
10. Network
Manage network settings for your website. Just follow the screenshot below.

11. Scrape Shield
Protect content on your site such as Email Address Obfuscation, Server-side Excludes, Hotlink Protection.

- Email Address Obfuscation – Display obfuscated email addresses on your website to prevent harvesting by bots and spammers, without visible changes to the address for human visitors.
- Server-side Excludes – Automatically hide specific content from disreputable visitors.
- Hotlink Protection – Protect your images from off-site linking.
12. Traffic
Control and manage your traffic.

- Argo – Argo is a service that optimizes routes across the Cloudflare network to deliver responses to your users more quickly, reliably, and securely. But it is a pay per usage.
- Argo Tunnel – Exposes applications running on your local web server on any network with an internet connection without manually adding DNS records or configuring a firewall or router.
- Load Balancing – Reduce latency by load balancing traffic across multiple servers or by routing traffic to the closest geolocation region.
13. Stream

Stream is a video platform for developers. Upload a video and Cloudflare will encode, process and deliver it on all browsers and devices. But it is a pay per usage.
14. Custom Pages

These are all paid features, quite expensive, and mostly used for large websites that let you upload custom HTML pages that are shown to visitors when your website has errors.
15. Apps
Cloudflare Apps are like WordPress plugins that are easily added to your website.

Setup Cloudflare With WordPress Cache Plugin
WP Fastest Cache
Just click on WP Fastest Cache >> CDN >> CDN by Cloudflare.

Enter your Cloudflare email address & API Key. Then click on Next button.

WP fastest cache will automatically disable minify option and rocket loader.

W3 Total Cache
Just click on Performance >> Extension and activate Cloudflare. Then click on Settings.

Next click on Authorize.

Now enter your Cloudflare email address & API Key.

Now your Cloudflare settings will appear here. From here you can also manage Cloudflare settings.
How to Clear Cloudflare Cache
There may be a time when you need to clear the Cloudflare cache.
Go to your Cloudflare dashboard, click on the “Caching” tab and then on Purge Everything.

Final Thought
There is no doubt that Cloudflare is the best CDN company that makes your site faster and provides an extra layer of security.
Furthermore, Cloudflare reduces server load and save bandwidth. It also serves the cached version of your web pages when your web server goes offline for maintenance.
Find this article helpful? Don’t forget to share!
Leave a Reply