Short definition

CDN — a distributed network of servers that delivers website files from a location close to the visitor, so pages load faster and the origin server handles less traffic.

Also known as: Content Delivery Network.

A CDN can shorten the distance between a visitor and website content. Instead of fetching every image, stylesheet or HTML response from one central server, an edge server can deliver a valid copy.

How does a CDN work?

On a cache miss, the CDN requests a response from the origin server and may store it according to its cache headers. Later requests can be served from an edge location. When content changes, the cached copy either expires or is purged. HTTPS, compression and protection against traffic spikes are often provided at the same layer.

What does this mean for a small business?

A CDN is useful for websites with visitors in several regions, many images or sudden traffic spikes. For a small local site, the gain depends on the origin server and file sizes. A CDN cannot make a heavy page lightweight; it only delivers the same files more efficiently.

What should you check when using a CDN?

  • align cache lifetimes with how often content changes, asset versioning, and any personalization;
  • use versioned filenames or content hashes for changed assets;
  • check that personal data is never cached publicly;
  • check after a release that stale HTML and images disappear when expected;

How it relates to other website choices

A CDN uses caching and usually sits between visitors and the origin server at the web host. With a static website, almost the entire public site can be delivered safely through the network.

Source and further reading

The MDN definition of a CDN explains the relationship between edge servers and the origin.