A CDN (Content Delivery Network) is a distributed network of edge servers that cache and serve resources from locations close to the visitor. Static assets, HTML, API responses, and increasingly compute-on-the-edge are all served from whichever node has the lowest network distance to the user.
Why it matters
By terminating connections at the edge, a CDN reduces TTFB and shortens TLS handshakes, which directly improves Core Web Vitals for global audiences. CDNs also absorb traffic spikes and DDoS noise, lowering origin load and increasing uptime. For SEO this matters because crawlers see the same speed and reliability your users do.
How to use
- Set long
Cache-Controllifetimes (public, max-age=31536000, immutable) on hashed, content-addressed assets. - Use shorter TTLs and
stale-while-revalidatefor HTML you want fresh but resilient. - Configure a clear purge or surrogate-key strategy so deploys invalidate the right URLs.
- Enable HTTP/2 or HTTP/3 and Brotli compression at the edge.
- Forward only the headers and cookies that affect the response to keep cache-hit ratios high.
- Consider edge functions for lightweight personalization, A/B tests, or auth checks while keeping pages cacheable.