CDN
A CDN, content delivery network, is a set of servers across regions that cache and serve your files from the closest location. It lowers time to first byte and takes load off your origin. It also serves HTTP/2 and HTTP/3, compresses with Brotli, and often manages TLS and edge redirects.
By Théophile Louvart, founder of Porteur · Updated 14 September 2026 · Markdown
What it does and what it improves
A CDN caches static assets always, and often the HTML pages. Visitors fetch files from a nearby edge, not your origin.
- Lower TTFB, because the edge can respond faster than a distant origin.
- Faster delivery with HTTP/2 and HTTP/3 for multiplexing and fewer connection costs.
- Smaller transfers with Brotli compression for text files like HTML, CSS and JS.
- Less origin load, so spikes are absorbed at the edge.
- Simpler ops: TLS termination and redirects handled at the edge.
Cloudflare, Fastly, Akamai, CloudFront, and the edges on Vercel and Netlify are CDNs. Most hosting platforms include one as of 2026.
Why it matters for a small site
Speed wins signups and sales. A CDN improves Core Web Vitals by lowering server work and moving bytes closer to users.
- If you have visitors outside your origin’s region, the latency drop is large.
- If you run on a single small server, the CDN shields it from peaks.
- If you serve large images, fonts and scripts, the edge handles them efficiently.
For SEO, faster delivery helps real user experience and can support better performance on metrics like LCP and INP. It does not change your content or titles, it just gets them there quicker.
How to check and measure a CDN
- Check headers in your browser’s network panel. Look for HTTP/2 or HTTP/3, Brotli content-encoding, and cache-control on static assets.
- Record TTFB by region. Load a page from different locations and note the waiting time for the first byte.
- Look for cache status. A cached request should show a HIT header from the edge, not a MISS from origin.
- Verify TLS and redirects at the edge. Visit http and www variants and confirm instant 301s before the origin is touched.
- Watch origin metrics. Fewer requests should reach the origin after caching is set.
A fixed page looks like this in the network panel: protocol h3, content-encoding br, cache-control long on CSS and JS, and a cache HIT on repeat loads.
Set up a CDN the right way
Enable the CDN on your host or choose a provider
If you use Vercel, Netlify or a managed host, turn on their edge. Otherwise point your DNS or origin to Cloudflare, Fastly, Akamai or CloudFront.
Cache static assets aggressively
Set long cache-control for CSS, JS, images and fonts. Use file hashing so updates invalidate safely.
Consider caching HTML
Cache public pages like /, /pricing and docs. Bypass caching for logged-in users and admin paths. Purge on deploys.
Serve modern protocols and compression
Enable HTTP/2 and HTTP/3. Turn on Brotli for text. Ensure TLS terminates at the edge with current ciphers.
Move redirects to the edge
Set canonical host and http to https as edge rules. Avoid chaining redirects through the origin.
Common traps to avoid
- Caching private pages and showing account data to others. Always vary or bypass cache on auth cookies.
- Letting query strings or cookies disable caching for everyone. Define clear cache keys and ignore non-essential parameters.
- Edge redirects that loop or chain. Test all host and scheme variants once the CDN is in place.
- Multiple hostnames serving the same content. Enforce one canonical host at the edge and redirect the rest.
- HTML caching that serves stale versions forever. Tie purges to deploys and set sensible max-age.
- Assuming the CDN fixes everything. Large images, render-blocking scripts and third-party tags still slow pages.
Questions
If most visitors are near your server and the site is lean, you may not feel a big change. If you have users in other regions, spikes in traffic, or heavy assets, a CDN is a quick win.
A CDN does not change your content or links. It improves delivery speed and stability, which supports better Core Web Vitals and a smoother crawl. Faster pages tend to perform better for users, which can help.
Yes, for public pages that look the same to every visitor. Exclude logged-in sessions and admin routes. Purge the cache on deploy and when you update content.
Open the browser network panel. Look for HTTP/2 or HTTP/3, Brotli compression and edge cache headers with HIT on repeat loads. Your DNS or hosting control panel will also show if an edge is enabled.
Cloudflare, Fastly, Akamai and CloudFront are CDNs. Vercel’s and Netlify’s edges are CDNs too. Most hosting platforms include a CDN as of 2026.
Sources
Check my site, free
Paste your URL and get a free check that shows if your pages are served from a CDN, how they load against rivals on key searches, and three findings in about thirty seconds.
- Free check, no card
- Read-only, your own accounts
- Readable by your agent
Read next
- GuideCore Web Vitals for a product site: the three numbers
- GuideTime to first byte: the delay every other metric inherits
- GuideLargest Contentful Paint: what slows it and what fixes it
- GuideWeb fonts and page speed: load one face, and load it first
- GuideImage optimisation for page speed: the hero image and everything below it
- GuideThird-party scripts: the page speed you gave away
- GlossaryContent audit
- GlossarySpeed Index