What Is a CDN (Content Delivery Network)?

Category: Performance & CDN ยท Updated 2026-10-30

A CDN (Content Delivery Network) is a global network of servers that keeps cached copies of your website's files close to visitors. Instead of every request travelling to your origin server, it is answered from a nearby location, which lowers latency, saves bandwidth and absorbs traffic spikes.

How a CDN works

  1. A visitor requests a file, for example an image on your site.
  2. DNS routes the request to the nearest CDN location, called an edge server or point of presence (PoP).
  3. If the edge has a fresh copy (a cache hit), it returns the file immediately.
  4. If not (a cache miss), the edge fetches it from your origin server, stores it and sends it to the visitor.
  5. Later visitors in the same region get the stored copy until it expires, which is controlled by cache headers and TTL.

What a CDN caches

The easiest content to cache is static: images, CSS, JavaScript, fonts and video files. Many CDNs can also cache full HTML pages for sites that do not change per user, and some run small pieces of code at the edge. Dynamic, personalized pages such as a shopping cart or account area normally pass through to the origin.

Benefits of using a CDN

  • Speed: shorter distance means lower latency and faster page loads, especially for international audiences.
  • Lower origin load: fewer requests reach your hosting server, so the same plan can handle more traffic.
  • Availability: cached content can still be served during short origin problems.
  • Security: many CDNs include DDoS protection, a web application firewall and free HTTPS.
  • Bandwidth savings: data transfer from your host decreases.

When you may not need a CDN

A small local site whose visitors are all near the server may see only a modest gain. Even then, free CDN tiers are easy to add and often improve security. A CDN does not fix a slow database, heavy plugins or oversized images, so optimize those first.

How to set up a CDN

There are two common methods. With a reverse proxy CDN such as Cloudflare you change your domain's nameservers or DNS records so traffic flows through the CDN. With a pull zone you create a CDN hostname, for example cdn.example.com, and rewrite your asset URLs to use it, often through a plugin in WordPress. Always test that HTTPS, cache headers and purge options work as expected.

Frequently asked questions

What does CDN stand for?

CDN stands for Content Delivery Network. It is a distributed group of servers that delivers web content to users from the location closest to them.

Does a CDN make my website faster?

Usually yes, particularly for visitors far from your hosting server and for pages with many images, scripts and stylesheets. The gain is smaller for local audiences or for pages that cannot be cached.

Is a CDN the same as web hosting?

No. Web hosting stores your original site and runs your application, while a CDN keeps temporary copies of your content in many places. A CDN works in front of your hosting and does not replace it.

Are there free CDNs?

Yes. Several providers offer free tiers, including Cloudflare, and many hosting companies bundle a CDN with their plans. Free tiers are usually enough for small and medium sites.

What is a cache purge?

A purge removes cached copies from the CDN so the next visitor triggers a fresh fetch from your origin. You purge after changing files that were already cached, for example when you update a stylesheet or image under the same URL.

Does a CDN help with SEO?

Indirectly. Faster loading improves user experience and Core Web Vitals, which Google uses as ranking signals, and a CDN can reduce server errors during traffic spikes. It does not give a ranking boost by itself.

Related topics