Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Explainers · Explainer

What Is a CDN? A Plain Explanation

What Is a CDN? A Plain Explanation

Short answer

A CDN is a network of servers spread around the world that stores copies of your site's files close to visitors. When a visitor asks for a file, the nearest edge server answers if it holds a fresh copy, and only fetches from your origin server when it does not. It speeds up loads without replacing your host.

Key takeaways

  • A CDN stores copies of your files on edge servers near visitors, so pages load faster.
  • Your origin server still holds the originals; a CDN does not replace hosting.
  • Cloudflare's CDN reaches 340 locations and serves content within about 50 milliseconds of 95% of internet users.
  • Cloudflare's free plan includes the CDN at $0 per month as of November 2026.
  • Cloudflare does not cache HTML or JSON by default; a Cache Rule is needed for pages.
  • W3Techs reported in September 2026 that Cloudflare's CDN sits in front of 25% of all websites.

What is a CDN?

A CDN is a network of servers spread around the world that stores copies of your site's files close to visitors, so pages load faster.

CDN stands for content delivery network. Cloudflare's learning page defines it as a geographically distributed group of servers that caches content close to end users, and it lists the assets it moves as HTML pages, JavaScript files, stylesheets, images, and videos.

Your main server is called the origin. It holds the original files. The CDN servers are called edge servers, and they hold copies.

A visitor in another country gets the copy from the nearest edge server instead of waiting for a response from your origin across the world.

A CDN does not replace your host. Cloudflare's page states that a CDN does not host content and cannot replace the need for proper web hosting, but it does cache content at the network edge, which improves performance. Your host still stores the originals and runs WordPress.

How does a CDN work?

A CDN works by answering a visitor's request from the nearest edge server when it holds a fresh copy, and by fetching the file from the origin only when it does not.

The request follows 4 steps. First, the visitor asks for a page, and DNS routes the request to a nearby edge server. Second, if the edge server holds a fresh copy, it sends it at once, which is called a cache hit.

Third, if it does not, the edge server fetches the file from the origin, sends it on, and keeps a copy, which is called a cache miss. Fourth, the copy stays until it expires or someone clears it.

Distance is the main saving. Cloudflare says its CDN serves content from close to end users, within about 50 milliseconds of around 95% of the internet-connected population as of November 2026. Shorter distance means less waiting before the first byte arrives.

CDNs also shrink files on the way. Cloudflare's page notes that CDNs cut the amount of data transferred with minification and file compression, and they speed up secure connections by reusing TLS connections. Those steps help on every load, not just the first one.

What does a CDN cache and what does it skip?

A CDN caches static files by default, such as images, CSS, JavaScript, fonts, and video, and it usually skips HTML pages unless you tell it to cache them.

Cloudflare's docs on default cache behavior state that Cloudflare only caches based on file extension and not by MIME type, and that the Cloudflare CDN does not cache HTML or JSON by default.

Its default list covers extensions such as JPG, PNG, WebP, CSS, JS, MP4, PDF, and WOFF2, plus the site's robots.txt file.

It also skips a file when the origin says not to cache it. Cloudflare's docs state that it does not cache a resource when the Cache-Control header is private, no-store, no-cache, or max-age=0, when a Set-Cookie header exists, or when the request method is anything other than a GET.

File typeCached by Cloudflare by default?Notes
Images (JPG, PNG, WebP, AVIF)YesServed from the nearest edge server
CSS and JavaScriptYesIncludes fonts such as WOFF2
Video and audio (MP4, MP3)YesLarge files have size limits
PDF and documentsYesCached by extension
HTML pagesNoNeeds a Cache Rule to cache
JSON responsesNoNeeds a Cache Rule to cache
robots.txtYesCached even though it is text

When no cache header is present, Cloudflare applies its own default edge TTL: 120 minutes for status codes 200, 206, and 301, 20 minutes for 302 and 303, and 3 minutes for 404 and 410. All other status codes are not cached by default. Cache Rules let you change those defaults per URL.

Why use a CDN for WordPress?

A CDN helps a WordPress site in 4 ways: faster loads, lower bandwidth bills, better uptime, and stronger protection against attacks.

Faster loads come from distance, as covered above. Lower bandwidth bills follow because the edge servers answer most requests, so the origin sends far less data. Cloudflare's learning page lists reducing bandwidth costs as a core benefit, since every origin response consumes bandwidth.

Uptime improves because the network spreads the load. If one edge server or data center fails, traffic moves to another one. Cloudflare describes load balancing, intelligent failover, and Anycast routing as the features that keep a site online when hardware fails or traffic spikes.

Security improves because the CDN sits in front of the origin and can block bad traffic before it reaches your server. Cloudflare's page lists DDoS mitigation, fresh TLS certificates, and a web application firewall as part of that protection.

The scale is easy to see in the numbers.

W3Techs reported on September 4, 2026 that Cloudflare's CDN now sits in front of 25% of all websites, up from 19.6% one year earlier and 3.9% ten years ago. Among the top 1 million sites, 52% use a CDN and 41.9% use Cloudflare.

How much does a CDN cost?

A CDN for WordPress can cost nothing to start, since Cloudflare's free plan includes the CDN at $0 per month, and paid plans add features rather than basic delivery.

Cloudflare's CDN page lists 4 plans as of November 2026. Free costs $0 forever and fits personal or hobby projects. Pro costs $20 per month when billed annually, or $25 per month when billed monthly.

Business costs $200 per month when billed annually, or $250 per month when billed monthly. Enterprise is priced by contract.

Other CDNs charge differently. Some bill per gigabyte of data served, so a busy site pays more than a quiet one. Cloudflare's standard plans do not charge per gigabyte for CDN traffic, which is why its free plan works for small sites with no usage bill to watch.

Size limits still apply on the free tiers. Cloudflare's docs set the cacheable file limit at 512 MB for Free, Pro, and Business customers, and 5 GB for Enterprise customers by default. A file larger than that is not cached, so very large downloads still come from the origin.

Our guide on how much a CDN costs for WordPress compares the main options in detail.

How do you set up a CDN for WordPress?

You set up a CDN by creating an account with the provider, pointing your domain's nameservers at it, and letting it sit in front of your site.

For Cloudflare, the steps are: create a free account, add your domain, and change the nameservers at your domain registrar to the pair Cloudflare gives you.

Once DNS has updated, traffic flows through Cloudflare's network, and its edge servers start caching your static files. No WordPress plugin is required for the basic setup, though Cloudflare offers one for extra controls.

A second route is a plugin that rewrites your file URLs to the CDN hostname. WP Super Cache, for example, includes basic CDN support that rewrites the URLs of files in wp-content and wp-includes so they point at a different hostname.

That route suits CDNs that pull files from your origin on first request, which is called origin pull.

Our guide on how to set up a CDN for WordPress walks through the Cloudflare setup screen by screen.

Our guide on Cloudflare cache rules for WordPress shows how to cache HTML pages, which are skipped by default.

How do you check if the CDN is working?

Check the response headers of a static file, such as an image, and look for the CDN's cache status header.

On Cloudflare, the header is CF-Cache-Status, and its values tell the story: HIT means the edge server answered from its cache, MISS means the file was fetched from the origin this time, and DYNAMIC means Cloudflare never considered caching it, which is the normal result for an HTML page with no Cache Rule.

Load the same image twice: the first load may show MISS, and the second should show HIT.

A second check is the IP address your domain resolves to. Once Cloudflare is active, your domain points at Cloudflare IPs rather than your host's IP. Online DNS tools show that change within minutes of the nameserver update, though full DNS spread can take longer.

Also compare load times before and after, using the same page and the same test location. Our guide on how to speed up WordPress explains how to measure speed without fooling yourself with a single reading.

What mistakes should you avoid with a CDN?

Do not assume the CDN caches your HTML pages, because most CDNs skip HTML by default and your pages will still come from the origin.

That is the most common surprise with Cloudflare. Its docs state plainly that HTML is not cached by default, so a site that adds Cloudflare and sees no speed gain on pages usually needs a Cache Rule that makes HTML eligible for caching.

Test the CF-Cache-Status header on a page before you conclude the CDN is not working.

Do not forget to purge the CDN cache after a design change. If you replace a logo or a stylesheet and the old one still shows, the edge servers hold the old copy until it expires.

Purge the single changed URL first, since that is the smallest fix, and purge everything only when many files changed.

Do not stack two CDNs in front of the same site, and do not run a page caching plugin that fights the CDN cache.

One cache layer per job keeps purging simple. Our statistics guide on CDN usage statistics shows how common each provider is, which helps when you pick one and want plenty of setup guides to follow.

Frequently asked questions

Can a CDN replace my web host?

No. A CDN copies your files to servers near visitors, but your host still stores the originals and runs WordPress. Without the host, there is nothing for the CDN to copy. Think of the CDN as a delivery layer on top of hosting.

Is a CDN worth it for a small WordPress site?

For most small WordPress sites, yes, because Cloudflare's free plan includes the CDN at $0 per month. You only need a paid plan when you want extra features such as image optimization, more firewall rules, or a support contract.

I changed an image but the old one still shows. Why?

Purge the changed URL from the CDN cache, then reload the page. If the old file still shows, also clear your browser cache and any page cache plugin. Purging one URL is enough when only one file changed.

Does a CDN help if all my visitors are in one country?

Yes, but the benefit is smaller when your visitors and your server are in the same city. A CDN still helps with traffic spikes and attacks, and it still cuts the load on your origin server, so the gain is real even for local sites.

Can a CDN make my site slower?

It can slow the first visit to a page, because the edge server must fetch the file from the origin before it can cache it. Repeat visits are faster. A CDN never makes a cached file slower than the same file from the origin.

Sources

  1. What is a CDN? Cloudflare
  2. Cloudflare CDN Cloudflare
  3. Default Cache Behavior Cloudflare Developers
  4. 25% of all websites now use Cloudflare as CDN W3Techs
  5. Prevent unnecessary network requests with the HTTP Cache web.dev

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.