Websites and Tech

Content Delivery Network (CDN)

Also called CDN, edge network

A network of servers in several countries that serves your site's files from the location nearest each visitor.

Quick facts: Content Delivery Network (CDN)

Category
Websites and Tech
Also called
CDN, edge network
Level
Intermediate
Affects
Loading speed for distant visitors, hosting load, resilience during traffic spikes
Where to see it
Cloudflare and similar network dashboards, PageSpeed Insights, your hosting DNS settings
In this article4
  1. How a CDN works
  2. Why a CDN matters
  3. Common mistakes with a CDN
  4. How to act on it

How a CDN works

Your site lives on one server in one country, called the origin. Every request has to travel there and back, and distance costs time no amount of hosting power can remove. A content delivery network puts copies of your files on machines in many locations, then answers each request from whichever one is closest to the person asking.

Traffic reaches the network first because your domain points at it rather than straight at the origin. If the nearest location already holds the file, it replies immediately. If not, it fetches the file from the origin once, keeps a copy, and serves everyone after that locally. Images, stylesheets and scripts are the easy wins because they rarely change; whole HTML pages can be held too, but only with clear rules about when a stored copy expires.

Why a CDN matters

It matters most when your visitors and your server are far apart. A business in Kathmandu selling to Australia, the UK or the Gulf is asking every page to cross oceans, and a network with a presence near those buyers cuts the wait before anything appears on screen. The same applies in reverse to a foreign-hosted site serving Nepali customers.

There is a second benefit that has nothing to do with speed. Because the network stands in front of your origin, it absorbs traffic spikes and filters obviously malicious requests before they reach your hosting. For a small site running a campaign, that buffer is often what keeps it up on the day the campaign works.

Common mistakes with a CDN

The commonest is expecting it to fix a slow site. A network shortens the journey; it does not make an overweight page lighter or a badly built database query quicker. If the origin takes a long time to produce a page in the first place, visitors still wait for that.

The next is caching HTML without a purge rule, so edits appear on the site and not on the network, and staff spend an afternoon convinced the site is broken. Certificate handling is another trap: with a network in front, the secure connection is terminated there, and a mismatched setup produces browser warnings on a site that was working the day before. Finally, some networks report visitor traffic themselves, which does not match what your analytics records — they are counting different things.

How to act on it

Start by asking where your buyers actually are. If they are all in one city and your server is in the same country, the gain is small and other work will pay better. If they are spread across countries, a network is one of the few changes that helps every page at once.

Set long storage times for images and scripts, short ones for pages, and make purging part of your publishing routine. Check the secure certificate immediately after switching, and test a form submission and a checkout rather than only a homepage. Fix the origin as well: server caching and lighter pages compound with the network instead of competing with it. If you are moving hosts and adding a network at the same time, treat it as one planned hosting migration with a rollback plan, not two casual switches on a Friday.

Do and do not

Do

  • Check where your buyers are before paying for one
  • Give images long storage and pages short storage
  • Test forms and checkout right after switching over

Do not

  • Expect a network to rescue a heavy, slow site
  • Cache pages without a rule that purges edits
  • Compare network traffic counts with your analytics figures

Questions people ask about this

Does a small local business need a CDN?

Usually not urgently. If your customers, your server and your market are all in the same country, the distance a request travels is already short, and money is better spent on lighter pages and better hosting. A network becomes worthwhile as soon as a meaningful share of your visitors sits in another region.

Will a CDN improve my Core Web Vitals?

It can improve the part that depends on distance, particularly how quickly the first bytes of a page arrive and how fast images appear for distant visitors. It does nothing for layout that jumps around as things load, or for scripts that block the browser. Treat it as one contributor rather than the fix.

Can a CDN break my website?

It can, in predictable ways. The usual causes are a mismatched security certificate, page caching applied without a purge rule so edits never appear, and rules that store pages meant to be personal. All three are configuration choices rather than faults in the network, and all three are easier to catch if you test forms and logged-in pages straight after switching.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.