A content delivery network (CDN) is a group of servers spread across many cities that keep copies of your website's files. Visitors are served from the location nearest to them instead of always travelling to your hosting server, which cuts load time for faraway visitors and takes load off your server.
Key terms
- Origin: your hosting server, where the real website lives.
- Edge / PoP: a CDN location that caches and serves content.
- Cache hit / miss: whether the edge already had the file or had to fetch it from the origin.
How a CDN works
- You point your domain, or a subdomain for assets, at the CDN, usually by changing nameservers or adding a CNAME.
- A visitor requests a page; DNS sends them to the closest edge.
- On a cache hit, the edge answers immediately. On a miss, it fetches the file from your origin, delivers it and stores a copy for the next visitor.
- Cache rules decide how long files stay at the edge, and you can purge them after changes.
What a CDN speeds up
| Content | Benefit |
|---|---|
| Images, CSS, JavaScript, fonts, video | Large: these are static and cache perfectly. |
| Full HTML pages | Large when page caching at the edge is set up correctly (for example QUIC.cloud with LiteSpeed Cache). |
| Logged-in pages, carts, checkout | Small: personal pages must come from the origin. |
Extra benefits
- Absorbs traffic spikes and many DDoS attacks.
- Modern protocols (HTTP/3) and image optimisation at the edge.
- Hides the origin IP when all traffic goes through the CDN.
Do you need one?
- Probably yes if your visitors are spread across continents, you serve many images or video, or you face attacks.
- Maybe not if your audience is mostly in one region and your hosting is close to them. Choosing the nearest MdmHost location (Germany, USA or Singapore) and enabling LiteSpeed Cache already gives most of the gain; see choose a server location.
Note: With a proxying CDN, use full end-to-end SSL so traffic is encrypted to your origin as well; see Cloudflare Full (strict) SSL.
