How To Easily Set Up Cloudflare CDN For Your Website?

We independently review everything we recommend. When you buy through our links, we may earn a commission. Learn More.

If you have stumbled upon this article, I am sure that, like everybody else, you also have a slow website that is simply killing your website’s reputation and looking for various opportunities to improve the performance of your website.

In this article we’ll actually take a practical approach on how you can set up Cloudflare CDN for your website which will eventually speed up your website.

How To Get Started with WordPress in 2023?

You might have read several techniques for improving your website speed and have implemented them as well. But when it comes to setting up a CDN, you were skeptical about taking the lead as it involves changing your website’s DNS, and there are a lot of other settings that need to be taken care of as well.

You want to try it but want an expert opinion or guidance to perform that step. Everybody wants to play safe, primarily when related to the website. Nobody wants their website to break or become unavailable due to the recent changes.

Well, setting up Cloudflare CDN for your website requires some technical know-how. But before actually speeding up things and improving the website’s performance, it is highly recommended to understand what CDN is and why your website needs a CDN.

Before any further ado, let’s get started.

What is a CDN?

CDN stands for Content Delivery Network. In layman’s terms, it is a group of computers or servers distributed geographically and works together to provide fast web content delivery to their users.

CDN utilizes what is known as caching, a process that stores copies of website contents in a cache or a temporary location so that CDN can serve them quickly to its users.

Let’s understand this differently, so every time you hit a URL in your favorite browser, it downloads a ton of data in the background so that it can be displayed appropriately to you on a screen. You might have noticed that if you open the same website a second time, it opens up immediately, but initially, it took a little time to open it up.

Ever wondered why? The moment you have opened the website, the browser has stored all the downloaded content in a cache, and that is why when you hit that URL again, it opens up pretty fast.

CDN does the same. It caches your website contents like images, videos, webpages in proxy servers. Because these servers spread geographically, users requests get served more quickly.

In an earlier post, I have talked about CDN more briefly. You might want to read it.

Why Your Website Needs a CDN?

If you have just started with your blog, you won’t need a CDN as your site won’t have any content or other files. But as you continue writing articles and storing more files, your site tends to get heavy and slow. And this is precisely the situation why your website needs a CDN.

CDN improves the website speed and overall performance of your website. It reduces latency to a great extent, and because of that, your viewers will be able to view your content quickly. CDNs take away a significant load from your server as the contents are served from proxy servers.

With that being said, let’s look at one of the best CDNs for WordPress available in the market: Cloudflare, and how we can leverage the free version of Cloudflare to improve our website performance.

How to set up Cloudflare CDN?

Setting up a Cloudflare CDN for your website requires a couple of steps. Let’s have a look at those.

1. Register for a free Cloudflare account

Navigate to Cloudflare and sign up.

Next, enter the domain name of the website you want to use Cloudflare with. And click on Add site.

setup Cloudflare cdn

On the screen, you will be prompted to choose the plan. For now, you can use the Free plan as this will be enough, to begin with. Once done, click on the Continue button.

Free Cloudflare CDN
Free Cloudflare CDN Plan

2. Review your DNS records

Once everything is done, Cloudflare will scan DNS records for your site.

By default, Cloudflare should have scanned each DNS record on the initial scan, But if you think some DNS records are missing, you can add them here. But, if you’re not sure how to add them, don’t worry, we can add them later as well. Make sure the orange cloud is visible next to your domain name. That means Cloudflare is enabled for your site.

Setup Cloudflare DNS

Finally, click the Continue button.

3. Replace Cloudflare nameservers with existing ones

Cloudflare provides you with a new set of nameservers that must be replaced with your existing ones on the next screen. We’ll see next how to do that.

set up Cloudflare cdn for your website

Now, if you’re confused with what nameservers are? It is a server that translates a domain name to IP address. Nameservers are an integral part of the Domain name System (DNS), or you can instead call it a “phone book” of the Internet. When you hit a URL in your browser, it automatically looks up the IP address associated with the server and connects to the URL.

After connecting your website to Cloudflare, it will direct filtered traffic to your website. Filtered traffic in a sense that:

  • Malicious threat actors constantly try to hack into networks by exploiting vulnerabilities or sending out malicious traffic. Cloudflare protects from such cyber threats and keeps your website secure by filtering out malicious traffic from the regular one.
  • Cloudflare also provides DDoS protection and Firewall-as-a-service that identifies malicious traffic patterns, vulnerability exploits and keeps your web-facing applications safe from attack.

To change your nameserver, you have to know from which hosting provider you purchased your domain. Changing the nameservers varies from different web-hosting providers, so you must know where your domain name is registered.

In our case, the domain was registered in NameCheap. So, let’s see how we can go ahead and change the nameservers in our domain registrar.

Navigate to Namecheap and login

Click on Manage next to your domain

Select Custom DNS under Nameservers

Replace existing nameservers with the ones provided by Cloudflare.

Finally, click on the right tick mark, and now you have changed your nameservers.

NameCheap DNS

Once you have replaced them with Cloudflare nameservers, it will take around 12-24 hours for propagation. Alternatively, you can check whether the DNS have been propagated or not to Cloudflare.


That’s it. If the DNS checker shows the Cloudflare nameservers, it has been successfully propagated.


Setting up a Cloudflare CDN for your website isn’t difficult as it seems. It just needs nameservers to be replaced with your existing ones. The full completion of the process will take around 12-24 hours.

I hope you like our guide, and if you have any issues setting up Cloudflare CDN for your website, do let us know in the comment below.

Leave a Reply

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

You May Also Like