# 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.

Updated 2026-09-14 · Source: https://porteur.ai/glossary/cdn

## 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

1. **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.
2. **Cache static assets aggressively** Set long cache-control for CSS, JS, images and fonts. Use file hashing so updates invalidate safely.
3. **Consider caching HTML** Cache public pages like /, /pricing and docs. Bypass caching for logged-in users and admin paths. Purge on deploys.
4. **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.
5. **Move redirects to the edge** Set canonical host and http to https as edge rules. Avoid chaining redirects through the origin.

> Rule: cache what is the same for every visitor, bypass what changes per user.

## 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

### Do I need a CDN for a small site?

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.

### Does a CDN help SEO?

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.

### Can a CDN cache HTML safely?

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.

### How do I know if my site uses a CDN?

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.

### Is Cloudflare a CDN? What about Vercel and Netlify?

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.

## Read next

- [Core Web Vitals for a product site: the three numbers](https://porteur.ai/guides/core-web-vitals): The product founder’s guide to LCP, CLS and INP: what Google measures, why phones decide the pass, common causes, and how to test and fix.
- [Time to first byte: the delay every other metric inherits](https://porteur.ai/guides/time-to-first-byte): TTFB sets the pace for every other speed metric. See what it includes, how to test it in field and lab, the causes on product sites, and the fixes.
- [Largest Contentful Paint: what slows it and what fixes it](https://porteur.ai/guides/largest-contentful-paint): See what usually counts as LCP, what makes it slow, how to fix it in order, and how to read it in Lighthouse and field data.
- [Web fonts and page speed: load one face, and load it first](https://porteur.ai/guides/web-fonts-and-page-speed): Ship crisp type without slowing first paint or shifting layout. Choose one fast path, preload the face above the fold, and stop the swap from moving text.
- [Image optimisation for page speed: the hero image and everything below it](https://porteur.ai/guides/image-optimisation-for-page-speed): Fix the hero image first for LCP, then lazy-load the rest. Choose AVIF or WebP, set srcset and sizes, and add width and height to stop shift.
- [Third-party scripts: the page speed you gave away](https://porteur.ai/guides/third-party-scripts-and-page-speed): See what each third-party script costs and what to do: remove, load on interaction, defer, self-host, facade video and maps, and preconnect smartly.
- [Content audit](https://porteur.ai/glossary/content-audit): A content audit reviews every page against its figures and ends in one decision each: keep, refresh, merge, redirect or remove. The table and the rhythm.
- [Speed Index](https://porteur.ai/glossary/speed-index): Speed Index measures how quickly a page is visually populated, from a filmstrip of the load. Where it appears, its weight, and what it catches.

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: https://porteur.ai/
