Digital Technology & Websites

What a CDN Does and Whether Your Website Needs One

A plain explanation of content delivery networks and caching: what a CDN speeds up, where it can go wrong, and how to decide if your website needs one.

A content delivery network (CDN) keeps copies of your website’s files on servers in many locations, so each visitor is served from a server closer to them. For most business sites it is a sensible, low-effort speed and resilience upgrade, especially for static content. It is not a cure for a heavy page, and it adds one more service to understand.

What a CDN actually does

MDN’s CDN glossary entry describes a CDN as a group of geographically distributed servers that store duplicate copies of data, with each request served by the server closest to the user. That reduces latency, because distance affects how long data takes to arrive, and it reduces load on your own servers. MDN adds that whole websites, especially static sites made only of HTML, CSS and JavaScript, can be served from a CDN.

Think of your hosting as the warehouse and the CDN as local shelves stocked with copies of popular items. A visitor in Perth need not wait for a response from a server on the other side of the world.

How caching fits in

A CDN works through caching: storing a copy so it can be reused. MDN’s HTTP caching guide distinguishes private caches (in the visitor’s browser) from shared caches, which serve many users. CDNs are a kind of managed shared cache, controlled through the Cache-Control header and vendor settings.

Three ideas are enough for a business owner:

  • Freshness: a response is fresh for a set time (max-age). After that it is stale and must be checked again.
  • Versioned files: images, scripts and stylesheets with a version in their file name can be cached for a very long time, because a new version gets a new name.
  • Personal content must not be shared: MDN says personalised responses should be marked private to keep them out of shared caches, and warns that a cookie alone does not make a response private.

Do you need one?

Situation CDN usefulness
Static or mostly static marketing site High: easy to serve entirely from the edge
WordPress site with many images Good: offloads images and files, often with built-in caching
Audience spread across countries Good: reduces distance
Logged-in dashboards, carts, bookings Limited: personal pages generally cannot be cached shared
Small local audience near your server Modest gains

Many modern hosts already include a CDN. Check before buying one separately. If your host serves your site from a single data centre, see hosting options for business websites.

What can go wrong

MDN’s glossary lists the trade-offs plainly:

  • Third-party dependency: if the CDN fails or is blocked in a region, your site may malfunction.
  • Security risk: a compromised CDN could serve malicious content. Subresource Integrity is one countermeasure for third-party scripts.
  • Extra connections: loading libraries from a third-party CDN adds lookups, and modern browsers do not share caches across sites, so the old argument that a visitor already has your library cached no longer holds. MDN suggests self-hosting your own static assets as an alternative.

From the caching guide:

  • Stale content: a long max-age is effectively out of your control, because HTTP offers no standard way to delete entries from intermediate caches. Managed caches such as CDNs offer purge tools, so use them when you publish a correction.
  • Misconfigured headers: without explicit headers, caches may apply heuristics. Set them deliberately.

A CDN may also interact with regional rules. Serving into mainland China, for instance, can trigger filing requirements; see ICP filing and hosting for China.

A simple adoption checklist

  1. Measure first. Use your performance reports to see whether server response time or distance is the bottleneck. Core Web Vitals are a good starting point.
  2. Optimise the page itself. Images and scripts matter at least as much as delivery.
  3. Confirm whether your host or platform already includes a CDN.
  4. Set cache rules: long lifetimes for versioned assets, short or no caching for HTML that changes.
  5. Exclude anything personal or transactional from shared caching.
  6. Test after launch, including after a content update, to confirm changes appear.
  7. Know how to purge the cache and who holds the account login.

Limits

A CDN does not replace good hosting, and it cannot make a slow page light. Architecture matters: sites built as pre-rendered files suit CDNs naturally, which is one point in the comparison in Astro vs WordPress.

Where Radiance Impact fits

Radiance Impact’s Technology division builds business websites and landing pages and provides maintenance and care, including the practical decisions around hosting and delivery. To talk through your setup, contact us or see the Technology page.

Sources