Complete Guide on How to Setup Cloudflare [Free CDN & SSL]

Searching for the step by step guide on the internet on how to setup Cloudflare CDN, SSL and Firewall on your website for performance & security? If yes then you are a lucky one. Today we’ll show you how to setup Cloudflare free SSL, CDN & Firewall to improve your WordPress website performance and protect from DDoS attack.

How to setup Cloudflare

Now to question is how to setup Cloudflare CDN, Firewall & SSL for your site?

If you are looking for an easy way to speed up your website then follow our this step by step guide. Cloudflare CDN setup is very easy. It takes a couple of minutes.

What is Cloudflare?

Cloudflare is a cloud-based CDN (Content Delivery Network), Firewall, DNS & SSL provider located in San Francisco, California, United States. They offer a free and premium CDN that speeds up your website along with a suite of powerful security features for small business websites. They have over 100 different data centers around the globe.

Their free plan is very popular to developers & small website owner. In this complete tutorial, we’ll guide you on how to use their free plan for free Cloudflare CDN, Cloudflare free SSL & Firewall.

How to Setup Cloudflare

Follow the step by step guide mentioned below carefully to setup Cloudflare properly:

Signup to Cloudflare

First of all, you need to create a new account on Cloudflare. To create a new account, visit the Cloudflare official website and click on the Signup button

Enter your email address & password and hit the Create Account button.

On the very next page, enter your domain name (without www or http://) which you want to connect with Cloudflare. and click on Add Site button. You can also do it from your dashboard by clicking + Add Site button (Top Right Corner)

And select Free Plan which is $0/month and click on Confirm plan.

Cloudflare will then scan your existing domain records. This will include your subdomains as well. This process is likely to take a few seconds. Once the scan is complete, you can verify that all records have been successfully transferred.

Note: The DNS records you want to be passed through Cloudflare will have orange cloud icon. The DNS records that will bypass Cloudflare will have a gray cloud icon.

Once you verify your DNS records, click on the Continue button

On the next and the final step of your setup Cloudflare, Cloudflare will provide you with two DNS nameservers (in my case that is & and they will ask you to update your nameservers. You will be asked to change your name servers and point them to Cloudflare nameservers.

You’ll need to replace your the DNS nameservers on your domain name management dashboard to the ones provided by Cloudflare. Just login to your domain registrar and replace the nameservers. Here is the step by step guide on how to change nameserver.

After changing nameserver, you need to go back to Cloudflare setup page and click on “Done, check nameservers” button to finish the setup.

Note: It may take up to 48 hours to change nameservers

Once activated, you will see the success message on your Cloudflare dashboard.

Your basic Cloudflare set up is complete, but there are a few essential settings you need to configure from Cloudflare dashboard. Follow below mentioned steps to setup Cloudflare for performance and security for your website.

Cloudflare CDN Setup

Once you changed nameserver, Cloudflare automatically starts caching your website and deliver through Cloudflare CDN. No need any additional setup for CDN but you can set up Cloudflare custom page rules (3 Page rules are free) to increase CDN cache hit and security.

Cloudflare Page Rules Setup

Cloudflare Page Rule is especially useful in securing critical pages like wp-content, login page, wp-admin area, etc.

Cloudflare free account allows you to set up 3 page-rules. If you want more page rules, then you need to pay $5 per month for every five additional rules.

To set up Cloudflare, First login to your Cloudflare Dashboard and goto Page Rules option and then click on Create Page Rule as you can see in the below image.

After that, you can set up the following three page-rules.

1. Force HTTPS

Page URL:



  • Always Use HTTPS

Note: Make sure HTTPS is enabled on your website before setting this page rule otherwise you’ll get TOO MANY REDIRECT ERROR. And set this rule at 1st place of all of these 3 rules. Check our guide on how to setup Cloudflare free SSL before set up this rule.

2. Secure your WordPress wp-admin page

Page URL:* or* (If you are using www version of your website)


  • Browser Inteqrity Check: On
  • Browser Cache TTL: 30 Minutes
  • Security Level: High
  • Cache Level: Bypass
  • Apps are disabled
  • Performance is disabled

And set order to last

Click on Save and Deploy

3. Set up Cache

Page URL:* or* (If you are using www version of your website)


  • Browser Cache TTL: a year
  • Cache Level: Cache Everything
  • Edge Cache TTL: 7 days

And set order to last

Click on Save and Deploy

That’s all. You have successfully set up three free page rules.

Set up Cloudflare free SSL

SSL (Secure Socket Layer) is the standard security technology for establishing an encrypted link between a web server and a browser. This secure link ensures that all data transferred remains private. It’s also called TLS (Transport Layer Security).

Cloudflare gives you multiple options for how you configure your SSL connection:

  • Off: No SSL active but it is not recommended
  • Flexible: All traffic is encrypted between your visitor browser and Cloudflare, but not between Cloudflare and your origin server.
  • Full: All traffic is encrypted between your visitor browser and Cloudflare & Cloudflare and your origin server. (Make sure, SSL installed on your server before change to Full otherwise your visitor will see a server down error)
  • Full (strict): Same as Full but with full authentication

Cloudflare Flexible SSL

Cloudflare Full SSL

To configure your Cloudflare free SSL settings, go to the SSL/TLS tab in your Cloudflare dashboard and use the drop-down:

Scroll down active Always Use HTTPS. That’s all.

Configure Caching

A proper caching configure can save a lot of bandwidth of your original server. Follow below mentioned steps to active caching.

a) Goto Caching Option and set Caching Level: Standard

b) Set Browser Cache Expiration to 1 year

c) Set Always Online™ On

And leave everything as default in this section.

Configure Speed

Goto Speed >> Optimization

a) Minify JavaScript, CSS & HTML under Auto Minify

b) Set Brotli On

c) Enable Rocket Loader™

Note: Check your website after activating this option. Activating this option may break your website.

Setup Firewall

Cloudflare free account allows you to set up 5 Firewall. Using a Firewall, you can block a specific country, secure your WordPress login and more.

Goto Firewall >> Firewall Rules to setup firewall

a) Protect WordPress Login URL

  • Click on Create a Firewall Rule
  • Enter Rule name (Anything)
  • Select Field: URI, Operation: equals & Value: /wp-admin
  • Click on Or
  • Again Select Field: URI, Operation: equals & Value: /wp-login.php
  • Select Challenge (Captcha) from Then Field

b) Block Country (Not Recommended)

If you want to block/allow/challenge any specific country then you can easily do it using Cloudflare Firewall rules

  • Click on Create a Firewall Rule
  • Enter Rule name (Anything)
  • Select Field: Country, Operation: equals & Value: Select Country (Austria in my case)
  • Select a suitable from Then Field
  • Click on Deploy

Play with their all available options.

That’s all. Hope this article helped you to learn how to set up Cloudflare free CDN for WordPress. If you liked this article then share this article or if you have any query then comment below. We’ll happy to solve them.

Give it a try and see if it improves your site’s page load times!

Recommended Posts

No comment yet, add your voice below!

Add a Comment

Your email address will not be published. Required fields are marked *