Quick answer
A content delivery network (CDN) is a global network of servers that delivers your site from a location close to the visitor. Cloudflare and Fastly are CDNs.
What it is
A CDN caches your static assets (HTML, JS, CSS, images) at edge locations around the world. Visitors load the site from the nearest edge, which cuts latency and improves reliability under traffic spikes.
Why it matters
Most web traffic is global. A CDN makes your site fast everywhere, not just near your origin server. It also protects you from traffic spikes and basic DDoS attacks.
How to use it
- Choose a CDN with edge locations near your audience.
- Cache static assets aggressively.
- Use the CDN's image optimisation for responsive images.
- Set up cache purges when content changes.
Examples
- Cloudflare, Fastly, AWS CloudFront and Akamai are popular CDNs.