Blog / How the internet works /

CDNs explained for small websites

Your website lives on one server, in one place. A visitor on the other side of the world has to wait for every file to travel all the way there and back.

A CDN is the usual fix. Here’s what it does, and whether your small site needs one.

What a CDN is

CDN stands for content delivery network. It’s a group of servers spread across many countries that keep copies of your site’s files and serve them from whichever location is closest to the visitor.

Think of a bookshop with one warehouse. Every order ships from that warehouse, however far the customer is. Now open pickup shelves in ten cities, stocked with your popular titles. Customers collect from the nearest one. Your warehouse (the “origin” server) still exists, but it’s not doing every delivery.

What it speeds up

A CDN is best at static files: images, CSS, JavaScript, fonts and video. These don’t change per visitor, so they’re easy to copy and serve from anywhere.

Many CDNs can also cache whole HTML pages, which helps a lot for blogs and brochure sites, but needs more care on pages that change per user, like carts and account areas.

The result is lower latency (less waiting for the first byte) and less load on your hosting. I covered the basics of what these terms mean in what is a CDN and do you need one, and the wider caching picture in caching explained: browser, server and CDN.

What else it can do

Depending on the provider, a CDN also:

  • Absorbs traffic spikes, so a sudden rush doesn’t flatten your server.
  • Filters bad traffic: bots, floods, known attackers.
  • Handles HTTPS certificates and supports newer protocols such as HTTP/3.
  • Compresses and resizes images on the fly.
  • Hides your origin server’s address, which makes direct attacks harder.

That’s why services like Cloudflare are popular with small sites: the free tier bundles speed and some protection. I wrote about it in Cloudflare explained: what it does for a small website.

What a CDN won’t fix

This is the part people skip.

  • A slow backend. If your WordPress site takes four seconds to build a page because of heavy plugins, a CDN may mask it for cached pages, but logged-in users and checkouts still hit the slow origin.
  • Giant images. A CDN delivers a 4 MB photo faster, but it’s still 4 MB. Resize first.
  • Bad hosting. A CDN is a layer on top, not a replacement.
  • A badly designed page. Render-blocking scripts and layout shifts stay.

Fix the basics first, then add the CDN. Page speed on a budget: what to fix first has the order I’d follow.

Do you need one?

Ask three questions.

  1. Where are your visitors? If almost everyone is in the same country as your server, the gain is smaller. If readers are spread across continents, it’s bigger. For African audiences in particular, distance to European or American servers can be noticeable, which I discussed in hosting a WordPress site in Africa: latency, CDNs and data centres.
  2. How heavy is your site? Lots of images, video or downloads benefit more.
  3. How much traffic do you get? Tiny sites can run without one, but even small ones often benefit from the security and caching extras.

For many small sites, the honest answer is “it probably helps a bit, it’s cheap or free, and it’s low risk if you set it up carefully”.

How a small site can use one

The easy route

Some platforms already include a CDN. Shopify serves your store through one. Most hosted website builders do too. You don’t have to do anything.

Through your host

Many WordPress hosts bundle a CDN or integrate with one. Check your dashboard.

A separate service

You point your domain’s nameservers to the CDN provider (the “proxy” approach), or you serve only static files from a CDN address. The first is simpler for non-developers and gives more features. The second is gentler if you don’t want to change DNS.

If you go the DNS route, understand what changes before you click. DNS, SSL and Cloudflare: what site owners should know is a good primer.

Things that go wrong

  • Stale pages. You update a page but visitors still see the old one because the CDN cached it. Learn how to purge the cache.
  • Caching things that shouldn’t be cached. Carts, checkouts and account pages need exceptions.
  • SSL mismatches. Using the wrong encryption mode between the CDN and your server can cause redirect loops or errors.
  • Forgotten settings. Page rules or “always online” features that behave oddly months later. Keep a note of what you switched on.

After any change, test: homepage, a blog post, login, checkout, and a form. Then check your site speed with a real tool, not a feeling. PageSpeed Insights, WebPageTest and GTmetrix are a fair place to start.

Key takeaways

  • A CDN serves copies of your files from servers close to the visitor.
  • It helps most with images, scripts and global audiences, and adds some security.
  • It won’t fix slow code or oversized images.
  • Start with what your host or platform already includes.
  • Know how to purge the cache and what to exclude.

FAQ

Is a CDN the same as hosting?

No. Your host runs your site. A CDN sits in front of it and delivers copies.

Will a CDN help my SEO?

Indirectly, through speed and reliability, if speed was the problem.

Is the free tier enough?

For most small sites, yes, to begin with.

Which part of your site is heaviest right now: images, scripts or video? Start there before you buy anything.