glimfly
web updated

What is a CDN? (why your site is fast on the other side of the world)

In one sentence:A CDN is a network of servers placed in cities all over the world that hold cached copies of your site's files, so a visitor's browser downloads them from a nearby server instead of the one machine where your app actually lives.

What it actually is

A CDN, short for content delivery network, is a set of servers placed in cities all over the world, each holding a cached copy of your site’s files. Think of it like a chain of neighborhood libraries instead of one national archive: rather than every reader traveling to the single building where a book is stored, copies sit on shelves in branches near where people actually live, and each branch hands out its own copy.

Concretely, when your app is deployed, your static files, images, CSS, JavaScript bundles, fonts, and often full rendered pages, get copied out to those servers (usually called edge servers or points of presence, PoPs). Vercel’s own network runs more than 126 of these points of presence across over 50 countries. When a visitor loads your site, their browser talks to whichever server is nearest to them geographically, not the one machine where your code actually runs. Distance is what makes the internet feel slow, so a CDN shortens it.

Why your AI just did this

You didn’t ask for a CDN, it just came bundled with the deploy. The moment you push your app to Vercel or Netlify, your static assets get distributed across their edge network automatically, that’s what deploying there means. Your agent might mention it in passing, something like “your images are now served from the edge,” without you having asked for anything CDN-related.

It also shows up when you connect a custom domain through Cloudflare: turning on the orange cloud icon next to a DNS record routes that traffic through Cloudflare’s CDN, instead of pointing straight at your server (the grey cloud option, DNS-only). And it shows up when your agent wires up an image or upload service, tools like Cloudinary or Vercel’s own image optimization are CDNs under the hood, which is the whole reason to use one instead of storing user photos directly next to your app’s code.

When you’ll run into it

  • You push an update, reload the page, even in a different browser, and it still shows the old version. That’s almost always a cached copy sitting on the CDN or in your own browser, not a failed deploy.
  • A response header in your browser’s network tab reads x-vercel-cache: HIT, MISS, or STALE (Vercel), or cf-cache-status (Cloudflare), telling you whether that file came from the cache or from the origin server.
  • Adding a custom domain and being asked whether a DNS record should be “proxied” (orange cloud, through the CDN) or “DNS only” (grey cloud, direct to your server).
  • Your agent using the words “edge network,” “PoP,” or “purge the cache” while explaining why a change hasn’t shown up yet.
  • A Lighthouse or PageSpeed report commenting on how long your static assets are cached, or how far they’re being served from.

What to check

  • Rule out your own browser first: hard refresh with Cmd/Ctrl+Shift+R, or open an incognito window
  • If it’s still stale, check the response headers for a cache status (x-vercel-cache, cf-cache-status) to confirm whether you’re hitting a cached copy
  • On Vercel, a real deploy automatically invalidates the CDN cache for your site’s pages; if something’s still old, it’s more likely a single asset (an image, a font file) cached under the same filename with a long lifetime
  • If your domain runs through Cloudflare, check whether each DNS record is proxied (through the CDN) or DNS-only, most website records want to be proxied, but an email record (MX) never should be
  • You don’t need to buy or configure your own CDN for a normal Vercel, Netlify, or Next.js site, it’s already included

Say it like a dev

Instead of: “why is my site slow for people overseas” Say: “is this being served from a CDN, or hitting the origin server every time?”

Instead of: “just clear the cache, it’s broken” Say: “is this stuck in the browser cache or the CDN’s edge cache? let’s check the response headers”

Instead of: “should I turn on that orange cloud thing in Cloudflare” Say: “do I want this DNS record proxied through the CDN, or DNS-only?”

People actually ask

“What is a CDN, in plain terms?”

It's a network of servers spread across many cities and countries, each holding a cached copy of your site's files: images, CSS, JavaScript, fonts, sometimes whole pages. When someone visits your site, the request goes to whichever of those servers is physically closest to them, instead of traveling all the way to wherever your app is actually hosted.

“Do I need to set up a CDN myself?”

For a normal Vercel, Netlify, or Next.js deploy, no. Your static assets get pushed to their CDN automatically the moment you deploy, it's on by default and not something you configure by hand. You'd only touch it directly if you route your domain through a service like Cloudflare, or add a dedicated image/media CDN for user uploads.

“Why does my site still show the old version after I deployed?”

Usually because a cached copy of a file is still being served from the CDN (or your own browser), not because the deploy failed. Check the response headers for a cache status like x-vercel-cache or cf-cache-status, and try a hard refresh or an incognito window before you assume anything is broken.

Related terms

Glim can explain your sessions, live.

The app watches your coding agent and narrates it in plain words. Waitlist is open.

Join the waitlist