7 Best WordPress CDN Services in 2024 (Compared)

We get thousands of global visitors every day on WPBeginner, so we know how important content delivery networks are for website performance.

A CDN is a service that can significantly speed up your website. It works by caching and serving your website content from the servers nearest to your user’s location, reducing your page load time.

While we use Cloudflare on our own site, we know there are lots of other great options for WordPress users. That’s why we have tested the top options on the market, paying attention to the location and number of data centers, pricing, and user-friendliness.

In this article, we will show you the best WordPress CDN providers to speed up your website.

Best WordPress CDN Services

Expert Tip: Are you looking for more ways to speed up your WordPress website? It might be time to call in the experts.

Our experts will do a full performance audit on your website and then optimize it for lightning-fast loading times. Check out our WPBeginner Site Speed Optimization Service today!

How Does a CDN Help WordPress Sites?

A CDN is a global network of servers that saves your website’s static content, such as HTML, CSS, and JavaScript files, in a cache. When a user visits your site, the CDN will serve the content from the server closest to the user, making it load faster.

With a CDN, your website will be much faster and less likely to crash when the traffic is high. This is because your site will rely on multiple CDN servers (called edge servers) instead of just a single origin server to deliver your content.

Here are some benefits of using a CDN:

  • You get a faster page load speed. CDNs can decrease latency, or the time it takes for a server to deliver content to a browser.
  • Your site will also be more SEO-friendly. This is because Google prioritizes web pages with good user experience, such as how fast your pages load.
  • You get better uptime. CDNs use load balancing, so when one of the edge servers fails, the others can cover for it and keep the site running.
  • You can make your WordPress website more secure against distributed denial of service (DDoS) attacks. The CDN will absorb and route the attack’s traffic to the network of servers to avoid overwhelming the origin server.
  • You can reduce your WordPress hosting’s bandwidth usage, meaning you won’t need to upgrade to a more expensive hosting plan.

For these reasons, many WordPress website owners use CDNs to make their sites faster and more secure. So, let’s take a look at some of the top WordPress CDN services and how they stack up against each other.

Why Trust WPBeginner?

At WPBeginner, we have 16+ years of experience in running WordPress websites, optimizing them for speed, and reaching readers all over the world. We have also thoroughly tested each of the CDN services mentioned in this article.

For more details, just see our editorial process.

1. Bunny.net

Bunny.net CDN service

Out of all the CDN services we have reviewed, Bunny.net is the best WordPress CDN on the market. Their WordPress plugin is easy and fast to set up, so you can start using the CDN right away.

Our team has been using Bunny CDN on OptinMonster because their pricing is very affordable for small businesses. If you are based in North America, then the pricing is just $0.01 per GB.

Not sure how much the total will be? Bunny.net has a handy calculator you can use.

Bunny.net's monthly bill calculator

They also have data centers worldwide, so you can reach users anywhere they are based. Simply select one of its 123 PoP (point of presence) locations across North America, South America, Asia, Africa, the Middle East, and Oceania.

Bunny.net knows that beginner WordPress users may be new to CDN services. That’s why they provide 24/7 customer support through live chat to help their customers, and they typically respond within an average of 5 minutes.

Pros of Bunny.net:

  • User-friendly control panel to manage your CDN features, like activating your free SSL certificate in one click or clearing your cache to keep your content updated.
  • Wide network coverage with its 123 and growing PoP locations.
  • Video CDN to load videos faster.
  • Up to 80% image optimization to reduce the size of your image files.
  • 99.99% global Service Level Agreement, which means if your website is down, you will be eligible for credits to offset any loss caused by the outage.
  • Real-time analytics to help you pinpoint performance issues on your website.

Cons of Bunny.net:

  • There is no free tier, though there is a 14-day free trial.

Why we recommend Bunny.net: This high-performance CDN service is one of the best options for beginner WordPress users. Despite their affordability, Bunny.net has everything you need to make your website faster and offer a better user experience.

2. Cloudflare

Cloudflare CDN's landing page

Cloudflare is known as the best free CDN for small business WordPress websites. With a global network of 310 cities and 120 countries, you can rest assured that your site will always be online.

Setting up Cloudflare CDN in WordPress is easy. All you need to do is sign up for a plan, add your website to Cloudflare, and replace your domain’s nameservers with Cloudflare’s.

Cloudflare’s free plan also includes unmetered DDoS protection. This means Cloudflare will detect and mitigate DDoS attacks without limiting the traffic volume that can be protected.

We actually use Cloudflare for their paid security and CDN services on WPBeginner, and we have been very happy with their fast performance, huge CDN network, and excellent uptime.

For more details, you can see why we switched from Sucuri to Cloudflare.

Pros of Cloudflare:

  • Cloudflare’s global network coverage is vast.
  • The CDN has a built-in web application firewall to protect users against not just DDoS attacks but also other threats, like email spammers.
  • Simple bot mitigation to differentiate legitimate bots, like search engine crawlers, from malicious bots like DDoS attackers or phishing campaigns.
  • Special tools to handle dynamic content caching and delivery to make your site faster.

Cons of Cloudflare:

  • There is no uptime guarantee for Free and Pro plan users.
  • Direct support is only available for paid plan users.

Why we recommend Cloudflare: We use a paid Cloudflare plan on WPBeginner for our security and CDN needs. Overall, we appreciate how fast the Cloudflare CDN is, along with its advanced firewall rules to keep our website safe.

3. Sucuri

Sucuri's CDN landing page

Sucuri is one of the most popular website security companies out there. Besides offering powerful website security features, they provide an easy-to-use CDN that’s optimized for WordPress.

To use Sucuri’s CDN, you need to sign up for one of their website security platform plans, which includes a web application firewall (WAF).

You can then add your site to the WAF, activate the firewall by changing your site’s DNS settings, and choose a CDN caching option. Besides speeding up your site and preventing DDoS attacks, the WAF also blocks spam and malware.

Sucuri’s data centers are vast, with locations in North America, Europe, and Asia. They also have CDN edge servers operating on Amazon Web Services in Australia and Brazil.

Pros of Sucuri:

  • According to Sucuri, they can improve website performance by 60%.
  • Multiple caching options, so you can choose the one that suits your site’s needs best. These include minimal caching, which is great if your site has lots of dynamic content (e.g., personalized text).
  • Automatic SSL certificate installation for your firewall server to protect your data as it is being transmitted.
  • Automatic malware removal, meaning Sucuri will delete any malware that it detects right away.
  • For small business owners, Sucuri offers a basic firewall with CDN plans that start at $9.99 per month.

Cons of Sucuri:

  • You cannot use the CDN alone as you have to purchase it with Sucuri’s main security features.

Why we recommend Sucuri: Sucuri is a great option if you are looking for a combination of WordPress security features and a CDN. It’s also pretty affordable, making it an excellent choice for small businesses.

4. KeyCDN

KeyCDN's homepage

KeyCDN is another good option for a WordPress CDN service. It has a user-friendly CDN Enabler plugin that can automatically rewrite your website URLs to serve them through the CDN.

With the CDN Enabler plugin, you get more control over how your CDN works. For example, you can select what type of files need to be served using the CDN to focus on only the essential elements of your website.

KeyCDN's CDN Enabler plugin

You can also instantly purge your CDN cache right from your admin area. As a result, you can keep your website content up-to-date.

KeyCDN’s network of servers is spread across the Americas, Africa, Europe, Asia Pacific, and Oceanic regions. This way, your site always performs fast no matter where your audience is.

Pros of KeyCDN:

  • High-performance CDN with support for HTTP/2, GZIP compression, IPv6 support, and image processing, all of which are important features that contribute to faster load times.
  • Instant CDN purge right from the CDN Enabler plugin to easily update your website content.
  • Pay-as-you-go pricing with a low minimum charge of $4 per month.
  • Free 14-day trial with no credit card required.

Cons of KeyCDN:

  • Despite the low minimum charge, you must purchase a minimum of $49 worth of credit to use KeyCDN.

Why we recommend KeyCDN: This CDN service’s wide network coverage, easy-to-use plugin, and affordable pricing make it worth recommending for small business owners who are just starting out. Just remember to have at least $49 worth of credit in your account to use it.

5. RocketCDN

Rocket CDN's homepage

RocketCDN is a WordPress CDN service offered by the same team as WP Rocket, one of the most popular WordPress caching plugins. That plugin has powered over 3 million websites, so you know you are in good hands with RocketCDN.

RocketCDN is powered by Bunny.net, which means they also have a global network of over 120 edge locations. However, what makes them different is their respective pricing models.

Instead of a pay-as-you-go scheme, RocketCDN comes in a single plan costing $8.99 per month. This already includes unlimited bandwidth for all regions, so you won’t have to worry about hitting any data caps or slow speeds due to limited resources.

When you activate RocketCDN, they will automatically adjust the settings of your website to ensure that it runs smoothly and quickly. These settings include Gzip compression and serving assets over HTTP/2.

Pros of RocketCDN:

  • Monthly pricing with unlimited bandwidth, which can be a good option if you don’t want the hassle of calculating your own resource usage.
  • Easy WordPress setup, as you only need to install their plugin and activate their API key.
  • Everything is enabled for you once the CDN is active, from Gzip compression, and HTTP/2 support, to serving all images using CDN.
  • Automatic canonical header setup so that search engines know which version of your website to show even though some of your assets are served using a CDN address.

Cons of RocketCDN:

  • Compared to other CDN solutions on the list, RocketCDN’s features may seem too basic.
  • No free trial.

Why we chose RocketCDN: Many WPBeginner users use WP Rocket for their websites, and RocketCDN is one of the best solutions to complement this caching plugin.

6. Imperva

Imperva CDN

Imperva is a cyber security company that offers many website and application protection solutions, including a CDN. They have 62+ data centers with 10 TB per second capacity, which is very high.

If your site receives 1 million visitors per day, and each visitor downloads 1 MB of data, Imperva could handle all that traffic without breaking a sweat.

Additionally, Imperva has self-service customization. This means you can decide how content is cached or traffic is routed based on factors like device type and user location. This feature can help optimize your website’s performance and reduce costs.

Pros of Imperva:

  • Large bandwidth capacity to handle high traffic volume, making it perfect for online businesses.
  • Self-service customization feature to configure how the CDN behaves to optimize performance.
  • 99.999% uptime guarantee with a 3-second mitigation SLA, which means downtime is extremely low, and Imperva promises to fix any issue within 3 seconds.

Cons of Imperva:

  • The self-service customization feature may be too advanced for the average WordPress user.
  • There is no fixed pricing, and you have to contact their team for custom pricing.

Why we chose Imperva: When reviewing Imperva, we were thoroughly impressed by their high-performance CDN and advanced features that not all CDNs provide. We recommend Imperva if you have a growing, multinational business.

7. Amazon CloudFront

Amazon CloudFront's homepage

Last but not least, we have Amazon CloudFront. It’s a powerful WordPress CDN service for people who use Amazon services like Amazon SES and Amazon Web Services (AWS).

That said, despite its name, this WordPress CDN solution works with many other hosting providers, not just AWS.

When you use CloudFront, you will also get the AWS Shield Standard automatically enabled. This technology is like a more comprehensive version of DDoS protection, securing your website against attacks at all network layers.

Amazon CloudFront has 600+ points of presence in 90 cities across 47 countries, so its CDN service has vast coverage. It also offers a free tier that allows you to send 1 TB of data from CloudFront each month at no extra cost.

Pros of Amazon CloudFront:

  • Seamless integration with AWS services, so it’s a great option if you already use them.
  • A global network of servers, with hundreds of points of presence worldwide.
  • Robust security features at the edge servers to protect your content from DDoS attacks, malware, phishing, and other threats at all levels.
  • Generous free tier plan, as 1 TB of data transfer can serve approximately 1 billion web pages.

Cons of Amazon CloudFront:

  • Not the most beginner-friendly setup.

Why we chose Amazon CloudFront: If you run WordPress on AWS, then you already have a great WordPress CDN service at your disposal. The vast network and generous free-tier plan also make CloudFront worth recommending.

Bonus: Use a Hosting Provider With Free CDN

These days, many WordPress hosting providers come with their own custom CDN solutions. This way, you won’t have to pay extra to make your website fast and secure.

Hostinger, for instance, has a built-in CDN available for Business plan users or above. It includes features like WebP image compression, CSS and JavaScript minification, and a handy under-attack mode to fight rapid DDoS attacks.

Hostinger's built-in CDN

SiteGround also has an excellent CDN feature designed specifically for users who receive traffic from multiple countries. The team behind it has reported that loading speeds have increased by 20% on average.

While a free plan is available, they also have a premium plan with unlimited monthly bandwidth.

On the other hand, some hosting providers like Bluehost and WP Engine have integrated third-party CDN services like Cloudflare.

Which Is the Best WordPress CDN Provider for Your Site?

After carefully evaluating all these top WordPress CDN services, we believe that Bunny.net is the best WordPress CDN on the market. It has a wide global network coverage and offers a great set of features at a reasonable price.

For people on a tight budget, Cloudflare’s free CDN plan can do the job. It comes integrated with popular web hosting providers like Bluehost and WP Engine. Plus, you get unmetered DDoS protection.

If you want a CDN focusing on security, then Sucuri is the one for you. Besides multiple caching options, you can get a powerful WAF with automatic malware removal and SSL installation.

WordPress CDN Services: Frequently Asked Questions

Now that we’ve covered the best WordPress CDN services, let’s cover some frequently asked questions about using a CDN.

Which CDN does WordPress use?

The WordPress software does not use any CDN as it is only a content management system that requires a hosting service to run. Instead, the user has the freedom to choose any CDN service they prefer.

How do I choose a CDN for my WordPress website?

To choose a CDN for your WordPress website, you can consider your website needs, your own budget, and the platform’s ease of use.

If you need a beginner-friendly CDN with affordable pricing, then look no further than Bunny.net. On the other hand, if your website handles a lot of sensitive data, then you may want a CDN with a good set of security features, like Sucuri.

Can I use Cloudflare CDN with WordPress, and how does it compare to other CDN services?

Yes, you can use Cloudflare CDN with WordPress. In fact, many hosting providers like Bluehost and WP Engine have Cloudflare integrated into their dashboards, so you can immediately use it.

While Cloudflare CDN is free, it has great unmetered DDoS protection. However, there is no direct support.

Does CDN increase website speed?

Yes, a CDN can increase your website speed and make it faster. It will cache your website content into multiple servers spread worldwide. When users visit your site, the server closest to them will deliver the content.

That said, many factors affect website speed, so we recommend implementing other best speed optimization practices as well. For more information, check out our ultimate guide to boost WordPress speed and performance.

Ultimate Guides to Boost Your WordPress Site Performance

We hope this article helped you find the best WordPress CDN solution for your website. You may also want to see our ultimate WordPress performance guide or our expert pick of the best website speed test tools.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 7 Best WordPress CDN Services in 2024 (Compared) first appeared on WPBeginner.

5 Reasons Why WPBeginner Switched From Sucuri to Cloudflare

At WPBeginner, we used to use Sucuri for a long time as our website firewall, security, and CDN solution. We recently switched to another firewall and CDN service, Cloudflare.

At WPBeginner, we are transparent about the technologies we use behind the scenes. We have consistently shared that expertise and knowledge with our users for the last 14 years.

In that tradition, we’ll share why we switched from Sucuri to Cloudflare and what performance and security gains we achieved.

Note: This article is part of our WPBeginner Insider series, where we introduce you to the products we use at WPBeginner. We publish WPBeginner Insider every other Thursday.

Why we switched from Sucuri to Cloudflare

Background Story

Before we talk about the switch, let’s briefly talk about Sucuri and Cloudflare and what services they provide to website owners.

They are both website security and performance services and offer DNS-level website firewalls and CDN solutions.

What is a website firewall?

A website firewall acts as a security checkpoint between your website and its traffic. It detects and blocks malicious requests like attackers, bots, malware, hackers, and more.

Now, some firewalls work on the server level. However, they are less efficient because the malicious requests may have already reached your server by the time they are blocked.

Sucuri and Cloudflare are both DNS-level firewalls. They re-route your website traffic through their servers and block them before they reach your site.

What is CDN?

A CDN (Content Delivery Network) is a global network of computers spread around the world.

Normally, when a user visits your website, they send their request to your hosting server. It takes more time for users to see your website if they are in a different geographic location.

A CDN service solves this problem by sending static and cached data of your website to the user from a much closer server. This will make your website load faster for all your users.

About Sucuri and Cloudflare

At WPBeginner, we used to use Sucuri for a long time as our website firewall, security, and CDN solution.

It is one of the best WordPress security plugins and has helped us secure WPBeginner against Brute Force attacks.

Cloudflare is the industry leader in CDN and website security industry. Over the years, it has grown incredibly, and so has its technology stack, infrastructure, and expertise.

Recently, we moved from Sucuri to Cloudflare CDN, and here we’ll share the reasoning behind that decision.

Reasons Why We Switched from Sucuri to Cloudflare

At WPBeginner, we always recommend our users choose a solution that fits their needs.

We use the same principle in our business by investing in tools and services that fulfill our needs.

Over the last several years, WPBeginner’s needs outgrew Sucuri. Several reasons made us decide to finally switch over to Cloudflare.

Here, we’ll explain each one of them so that you can get a behind-the-scenes look at how we reached that decision.

1. Faster and Largest CDN Network

Cloudflare is one of the world’s largest CDN networks. With servers in 310 cities across 120+ countries, Cloudflare directly connects to over 13,000 networks, including every major ISP, cloud hosting provider, and enterprise service.

Cloudflare global network

This means Cloudflare is the nearest server to users’ locations and often the fastest with the lowest latency.

In easier words, Cloudflare is like a fast lane to the internet.

At WPBeginner, our users are from all over the world. Switching to Cloudflare meant reduced latency, faster page loads, and great performance no matter where our users come from.

In comparison, Sucuri has a smaller CDN network with servers spread across strategic locations. It did help speed up website performance, but not as much as Cloudflare, which has more servers across the globe.

Being able to deliver our content to more people, faster, made Cloudflare the obvious choice.

2. Better Granular Firewall Rules

A website application firewall like Sucuri and Cloudflare automatically detects and blocks malicious attacks at the DNS level.

Larger websites are more frequently targeted by hackers with malicious intent.

Those attacks are sometimes more sophisticated than common DDoS / brute-force attacks.

Because of that, we needed more control over the firewall and attack-blocking rules to combat this.

We are now on the Cloudflare Enterprise plan and have ‘Layer-3 Network DDoS Protection.’ We have access to many pre-made rulesets like Cloudflare WordPress, CF PHP, and more at this level.

We now have extensive options and granular control over what firewall rules we use, which helps us protect and block even larger and more sophisticated attacks before they can reach our servers.

3. Centralized DNS Management

DNS (Domain Name System) is crucial for translating human-readable domain names into IP addresses that computers understand.

Normally, the web hosting company or domain registrar handles DNS management for websites.

How domain name system works

If a website is hosted in New York, and a user types in the domain from Tokyo, the request will take longer to resolve due to the distance between the DNS servers.

It is a negligible performance sacrifice for smaller websites. However, slow DNS resolution is a noticeable performance issue for larger and more popular websites like WPBeginner.

Previously, we used Sucuri with Constellix to improve performance. Constellix is a DNS server company with servers across the globe to ensure faster resolution of DNS regardless of the user’s geographic location.

Switching to Cloudflare gave us centralized DNS control and the ability to control DNS permissions better.

It also gives us a performance bump due to Cloudflare’s larger DNS server network, routing rules, and short TTLs.

This means when someone types in WPBeginner.com in their browser, the DNS resolution takes place much quicker because the response is closer to their location.

4. Uptime Reliability

This is a pretty major reason that we switched from Sucuri to Cloudflare. We noticed that occasionally, Sucuri would have regional outages, especially in Europe.

This would require our DevOps team to route European traffic away from Sucuri and direct it to our servers, which isn’t ideal from either a security or performance standpoint.

Imagine an outage occurring simultaneously when our website is under a DDoS attack. This could potentially degrade our website performance for users in other regions as well.

Cloudflare is more reliable in this regard.

They have a larger network, more data centers, and regional connectivity, all of which add more redundancy to their infrastructure, ensuring uptime.

This uptime reliability is crucial for performance and a big relief for our DevOps team.

5. Better DNS Analytics

Monitoring our website traffic using Google Analytics helps us make data-driven decisions about our business.

However, this data does not include information about DNS requests and their resolutions because website analytics tracking begins after the DNS resolution.

Access to DNS analytics helps us understand DNS requests and queries to our DNS servers. We can also see which requests were blocked, where they originated, and more.

Sucuri simply didn’t provide much of this information. Cloudflare has a handy DNS Analytics dashboard. They also offer an API to the Enterprise users to fetch data from their DNS logs.

Like the granular control of rules, being able to pull DNS logs and monitor requests and queries helps provide the best service we can to WPBeginner users.

Sucuri vs. Cloudflare – Which Do We Recommend?

Both Sucuri and Cloudflare are great solutions for the security and performance of a WordPress website. We would not have used Sucuri for as long as we did, if it weren’t a solid service.

You can take a look at our detailed comparison of Sucuri vs. Cloudflare for more information.

Which one do we recommend? It depends on your business needs and requirements.

For instance, if you are starting a blog or small business website, Cloudflare free CDN would be a great starting point.

It gives you access to basic website security and CDN network. Even at the free level, this improves your website performance and security.

On the other hand, if you can spend a little or have a limited budget, we will recommend the Sucuri website firewall. They are cheaper than Cloudflare’s more expensive plans and still offer a robust security solution to WordPress users.

Lastly, if your business can support it, we recommend upgrading to a Cloudflare Business or Enterprise plan. It will give your website a significant performance boost with enterprise-grade security and reliability.

We hope this article helped you learn the process behind our decision to switch to Cloudflare. You may also want to see our WPBeginner Insider case study of why we switched from Mailchimp to Drip for email marketing.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 5 Reasons Why WPBeginner Switched From Sucuri to Cloudflare first appeared on WPBeginner.

How to Setup Cloudflare Free CDN in WordPress (Step by Step)

Do you want to use the free Cloudflare CDN on your WordPress site?

Cloudflare is one of the best WordPress CDN services available in the market. They offer a free CDN that speeds up your website along with a suite of powerful security features for small business websites.

The challenge is that many entry-level users are not able to use Cloudflare because they think it is hard to set up.

In this guide, we will walk you through a complete Cloudflare setup in WordPress to help you improve your website speed.

How to Setup Cloudflare Free CDN in WordPress (Step by Step)

What Is a CDN?

A CDN or content delivery network is a system of distributed servers that helps deliver your website files faster to users based on their location.

Typically, a web hosting service serves your website visitors from a single location. All the users access the same server, no matter where they are located.

This can cause a delay in content delivery for users living further away from your website’s central hosting server.

That’s why CDNs set up multiple edge servers in different locations around the globe.

These CDN servers cache static content from your website’s origin server and present it to users when they visit your WordPress website.

Content Delivery Network (CDN)

When there is a user request, the CDN server closest to the user’s location will handle it.

For example, if someone in the USA wants to access a UK-hosted website, then a CDN server in the USA will serve that request, not the main server in the UK.

With a CDN, all the user requests are handled by the nearest CDN servers. This reduces the physical distance between the visitors and your website’s server.

As a result, a CDN improves your website performance and speed for all users regardless of their geographic location.

A faster website also improves the user experience and can give your website a slight boost in SEO rankings. Using a CDN also reduces the load on your primary server and protects it from crashing during traffic spikes.

If you want to learn more, then see our guide on why you need a CDN for your WordPress blog.

What Is Cloudflare CDN?

Cloudflare CDN

Cloudflare is one of the most popular free CDN providers available on the internet. It is a large network of globally-distributed servers that automatically cache static content and deliver dynamic content quickly.

On top of a CDN service, Cloudflare is also a cloud-based website firewall and a distributed proxy server. It monitors all incoming traffic to your website and blocks suspicious traffic even before it reaches your server.

They offer a free basic plan that’s suitable for small business websites and blogs. They also offer paid plans starting at $20 per month.

Cloudflare is an excellent choice for small businesses looking for a free CDN. However, if you want to fully utilize all of Cloudflare’s features, then you will need the Business plan, which costs $200 per month.

Note: We do not use Cloudflare on WPBeginner. Instead, we use Sucuri as a website firewall and CDN. This firewall has the double benefit of improving speed and security. You can learn more in our comparison of Sucuri vs. Cloudflare.

With that being said, let’s take a look at how to set up Cloudflare Free CDN in WordPress. You can use the quick links below to jump to the different parts of the tutorial:

Setting Up Cloudflare CDN in WordPress

To begin, you need to visit the Cloudflare website and click on the ‘Sign Up’ button.

Visit Cloudflare website

On the next page, you need to enter your email address and password to create a Cloudflare account.

Simply enter the information required, and then click on the ‘Sign up’ button.

Create Cloudflare account

When you finish signing up, you will see a thank you page confirming that your Cloudflare account has been set up.

The next step is to add your website to Cloudflare. You should click the ‘Add a website or application’ button to get started.

The Cloudflare Thank You Page

You can now enter your website into the ‘Enter your site’ field.

Make sure you only type your site’s domain name, such as example.com. You don’t need to type the full URL or any extra characters.

Enter Your Website's Domain Name

On the next screen, you will be asked to choose the type of Cloudflare plan you want.

For this tutorial, we will choose the free Cloudflare plan. Then, click the ‘Continue’ button.

Select Cloudflare free plan

After that, Cloudflare will show you a list of all DNS records their systems found. These will include your subdomains as well.

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

You need to review the list to make sure that your primary domain is active on Cloudflare with an orange cloud icon. Simply click the ‘Proxy status’ toggle to change the status.

Verify DNS Records to Set up Cloudflare

Once you have verified your DNS records, just click on the ‘Continue’ button at the bottom.

During the next step of your setup, Cloudflare will ask you to update your nameservers. You will be asked to change your nameservers and point them to Cloudflare nameservers.

Change to Cloudflare nameservers

Note: Changing nameservers can take some time to propagate throughout the internet. During this time, your website may become inaccessible to some users.

You can change nameservers from your domain registrar account, like Domain.com.

Or, if you got a free domain from your web hosting provider like Bluehost, then you will have to change the name server by logging in to your hosting account.

For the sake of this tutorial, we will be showing you how to change the nameservers from the Bluehost control panel.

While the process is similar across hosting companies, you can always ask your hosting provider for detailed instructions for their control panel.

Once you are logged in to your Bluehost cPanel dashboard, go to the ‘Domains’ section, and select your domain name. After that, click on the ‘Name Servers’ tab and the ‘Edit’ button.

Edit nameservers in hosting cPanel

Next, you need to select ‘Custom’ and enter the nameservers provided by Cloudflare.

Then, click the ‘Save’ button.

Save new Cloudflare nameservers

After that, you need to go back to the Cloudflare setup page, and click the ‘Done, check nameservers’ button to finish the setup.

It will now check your new nameservers automatically.

Check Cloudflare nameservers

That’s it! It will take a few minutes to update your domain nameservers and activate Cloudflare.

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

Cloudflare success message

In the meantime, the Cloudflare Quick Start Guide will open automatically, and you can use it to customize your Cloudflare settings. We will show you how in the next section.

Note: The above screenshots show the Bluehost control panel. Your nameserver settings may look different if you are using a different hosting provider.

Configuring Cloudflare With the Quick Start Guide

The Cloudflare Quick Start Guide should have opened automatically after you clicked on the ‘Done, check nameservers’ button above. This setup wizard will help you improve the security and performance of your website.

The first setting is ‘Automatic HTTPS Rewrites’.

Cloudflare Automatic HTTPS Rewrites

This will help you avoid the mixed content error in WordPress. It does this by automatically changing ‘http’ to ‘https’ in the URLs of all resources and links on your site that can be served with a secure ‘https’ URL.

This setting is on by default. We recommend you leave it on and click the ‘Save’ button.

The next setting is ‘Always Use HTTPS’.

Always Use HTTPS

Some users have reported issues when using this setting with Cloudflare. This setting is disabled by default, and we recommend you leave it that way. We will show you how to redirect from HTTP to HTTPS using the All in One SEO plugin later in this article.

Now you can click the ‘Save’ button to move on to the next option.

The next setting is Brotli compression.

Brotli Compression

Cloudflare can use Brotli compression to unlock 15-20% speed improvements. This setting is on by default, and we recommend you leave it on.

Make sure you click the ‘Save’ button to store this setting.

Now you will see a summary of what you have configured with the Quick Start Guide.

Cloudflare Quick Start Summary

You should see:

  • Automatic HTTPS Rewrites: ON
  • Always Use HTTPS: OFF
  • Brotli: ON

You have now completed the Quick Start Guide and can click the ‘Finish’ button. However, there are still some additional important settings that need to be configured.

Configuring Additional Important Cloudflare Settings

Your basic Cloudflare setup is complete, but there are a few essential settings you need to configure to keep your WordPress site secure.

1. Secure Your WordPress Login Page

You can set up page rules to customize how Cloudflare works on specific pages on your site. This is especially useful for securing critical pages such as the login page and wp-admin area.

The Cloudflare free account allows you to set up 3 page rules. If you want to add more page rules, then you need to pay $5 per month for 5 extra rules.

First, you need to click the ‘Rules’ option in the menu on the left of the page. After that, you can click the ‘Create Page Rule’ button.

Cloudflare Page Rules

Now you can set up 3 different page rules. You can start by creating a rule that secures your WordPress login page.

Simply add the following settings below to secure your website:

  • Page URL: example.com/wp-login.php*
  • Settings: Security Level – High
Secure WordPress login page

When you are done, just click ‘Save and Deploy’ to store and activate the rule.

2. Exclude the WordPress Dashboard from Cloudflare

You will be returned to the Page Rules page, where you can see your first rule listed.

Now you can create a second rule to exclude the WordPress dashboard from Cloudflare caching and enable high security.

Click the Create Page Rule Button

You’ll need to click on the ‘Create New Rule’ button to create your second rule.

After that, you need to type the following settings into the rule. You can click the ‘+ Add a Setting’ button to add new rows for additional settings:

  • Page URL: example.com/wp-admin*
  • Settings: Security Level – High
  • Cache Level – Bypass
  • Disable Performance
  • Disable Apps
Exclude WordPress dashboard

When you are done, make sure you click ‘Save and Deploy’ to add the new rule.

3. Configure SSL Certificate Settings

Another important setting is the SSL certificate available in the ‘SSL/TLS’ menu on the left.

Set SSL certificate settings

Make sure to click the ‘Full’ radio button if you are already using SSL.

If you don’t have an SSL certificate, then see our guide on how to get a free SSL certificate for your website.

Once you are done, Cloudflare will provide the essential green padlock in your visitors’ address bar to signify that your website is secure.

4. Redirect from HTTP to HTTPS Using All in One SEO

We mentioned earlier that we don’t recommend using Cloudflare’s ‘Always Use HTTPS’ feature. A great alternative is to use the All in One SEO plugin. It’s the best SEO plugin for WordPress, used by over 3 million sites.

The first thing you need to do is activate and install the All in One SEO plugin. For more details, see our guide on how to install a WordPress plugin.

After that, navigate to All in One SEO » General Settings and then enter your license key into the ‘License Key’ box and click ‘Connect’.

Enter AIOSEO license key

You can find your license key in your account profile on the All in One SEO website.

Next, navigate to All in One SEO » Redirects and then click the ‘Full Site Redirects’ menu navigation option.

AIOSEO Full Site Redirect

You will need to scroll down the page until you find the ‘Canonical Settings’ toggle. You should click this toggle so that it turns blue.

Next, turn on the ‘Redirect from HTTP to HTTPS’ toggle. This will create a redirect from HTTP to HTTPS, making sure that your visitors always have a secure connection to your website.

Using AIOSEO to Force HTTPS

When you are done, make sure to click the ‘Save Changes’ button at the bottom or top of the screen to store this setting.

Optimizing Cloudflare for WordPress Using a Plugin

Cloudflare offers a dedicated WordPress plugin for one-click WordPress-optimized settings.

The plugin lets you quickly set up Cloudflare on your WordPress site, add web application firewall (WAF) rulesets, automatically purge the cache, and more.

To get started, install and activate the Cloudflare plugin on your website. For more details, see our step-by-step guide on how to install a WordPress plugin.

Once done, you need to visit Settings » Cloudflare in your admin panel to configure the Cloudflare settings.

On the settings page, you will see a ‘Create Your Free Account’ button and a sign-in option for existing accounts. Simply click the ‘Sign in here’ link.

Cloudflare plugin settings

On the next screen, you will need to enter your Cloudflare email and API key.

Click the ‘Get your API key from here’ link.

Entering API Credentials Into the Cloudflare Plugin

This will bring up a popup for your account area on the Cloudflare website.

Make sure you are on your ‘My Profile’ page, and then click on the ‘API Tokens’ tab in the left sidebar.

After that, go to the ‘Global API Key’ section and click on the ‘View’ button.

Get global API key

This will open a popup and display your API key.

Simply click on the key to copy it.

Click to Copy the Global API Key

Next, you need to come back to your WordPress dashboard and enter your email address and API key.

Then, click the ‘Save API Credentials’ button.

Save Cloudflare API Credentials in WordPress

After that, the Cloudflare settings will appear on your dashboard.

From here, you can apply a single-click WordPress optimization, purge the cache, enable automatic cache, and more.

To optimize your WordPress site, just click the ‘Apply’ button next to ‘Apply Default Settings’.

Apply to optimize WordPress

Next, click on the ‘Settings’ menu option.

Here you will find more site optimization settings.

Cloudflare for WordPress Settings

You can scroll down on this screen to find the ‘Security’ section.

By default, the security level is medium. To improve your website’s security, you can select ‘High’ from the dropdown list.

Change WordPress security level

We hope this article helped you to learn how to set up Cloudflare free CDN in WordPress. You may also want to see our ultimate WordPress security guide and our expert picks for the best WordPress security plugins to further protect your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Setup Cloudflare Free CDN in WordPress (Step by Step) first appeared on WPBeginner.