All posts
Web design & development

CDN and Edge Caching for Marketing Sites, Explained

Does your marketing site need a CDN? What a content delivery network does, how edge caching affects LCP for global visitors, and when you already have one.

By Mehdi Hassan8 min read

The short answer

A CDN for a website is a network of servers around the world that stores copies of your pages, images and scripts close to each visitor, so they load faster. Most marketing sites need one, and most already have one: Vercel, Netlify, Cloudflare, Framer and Webflow all serve sites through a CDN by default.

Key takeaways

  • A CDN shortens the distance between your files and each visitor, which mainly helps load time far from your server.
  • If you host on Vercel, Netlify, Cloudflare, Framer or Webflow, you already use a CDN without configuring anything.
  • The big win is caching whole HTML pages at the edge, not just images, because that cuts time to first byte.
  • A CDN can't fix a heavy page: oversized images and third-party scripts still slow LCP and INP.
  • Check caching from your audience's countries, not just from your office.

What is a CDN, in plain terms?

A CDN, or content delivery network, is a set of servers spread across many cities that keep copies of your website's files and serve them from the location nearest each visitor. Instead of every request travelling to one origin server, most are answered by a nearby edge server. Less distance means less waiting.

Think of it like warehouses instead of a single factory. Your origin is where the site is built or stored. The CDN keeps stock in regional warehouses, so a visitor in Singapore isn't waiting on a round trip to Virginia for every image. The files are the same; only the delivery route changes.

For startups, a CDN is part of hosting rather than a separate purchase. Our guide to website hosting for startups explains where it sits next to the domain, DNS and the host itself.

When do you need a CDN for a website?

You need a CDN for a website whenever visitors are not all next to your server, which covers almost every marketing site. The good news is you probably already have one. Modern hosts put a CDN in front of your site by default, so the real question is whether it's caching the right things, not whether to buy one.

Where your site runs

CDN included?

What to check

Vercel

Yes, built in

Static and cached pages served from the edge

Netlify

Yes, built in

Cache headers on dynamic routes

Cloudflare Workers or Pages

Yes, it is the CDN

Caching rules for HTML, not just assets

Framer

Yes, managed for you

Image sizes and third-party embeds

Webflow

Yes, managed for you

Image sizes and custom code

WordPress on basic hosting

Often not

Add a CDN or a caching plugin with one

The one setup that often lacks a CDN is a self-managed server, such as WordPress on shared hosting or a single virtual machine. There, adding Cloudflare in front of the origin is a common, low-effort fix. If you're comparing hosts for a new build, Vercel vs Netlify vs Cloudflare covers how each handles edge delivery and cost.

How does a CDN affect LCP and page speed?

A CDN improves page speed mainly by cutting the time to first byte, which is the start of every other timing, including Largest Contentful Paint (LCP). LCP measures when the biggest visible element, usually a hero image or headline, finishes rendering. The faster the HTML and that hero image arrive, the sooner LCP can happen.

Google's guidance on Largest Contentful Paint breaks the metric into four parts: time to first byte, resource load delay, resource load time and render delay. A CDN shrinks the first and third for visitors far from your origin. It does nothing for the second and fourth, which depend on how the page is built: whether the hero image is discoverable early, and whether scripts block rendering.

That's why a CDN is necessary but not sufficient. We regularly see sites on excellent edge networks with slow LCP because the hero is a large unoptimized image loaded by JavaScript. Interaction delay (INP) is also mostly about scripts running in the browser, and no edge server can fix that.

What is edge caching, and what should be cached?

Edge caching means the CDN stores a copy of a response at its edge servers and reuses it for later visitors until it expires or is cleared. Images, fonts, CSS and JavaScript are cached almost everywhere by default. The bigger gain comes from caching the HTML of each page too, because then the origin doesn't need to render it for each visit.

Marketing sites are good candidates for full-page edge caching, because most pages are the same for every visitor. Pricing, features, blog posts and landing pages rarely depend on who's looking. In Next.js, static generation and incremental revalidation produce pages that the host can cache at the edge and refresh in the background when content changes.

  • Cache aggressively: images, fonts, CSS, JavaScript bundles with hashed file names.
  • Cache with revalidation: marketing pages, blog posts, docs pages, rebuilt when the CMS publishes.
  • Don't cache: form submission endpoints, preview and draft routes, anything showing personal data.
  • Be careful with: pages that vary by country or language, which need the cache keyed correctly.
How cache invalidation works when you publish

When an editor publishes a change in the CMS, the cached copies at the edge are now out of date. Good setups handle this automatically: the CMS sends a webhook, the site regenerates the affected pages and tells the CDN to drop the old copies. On Framer and Webflow, publishing does this for you.

On a custom Next.js build, someone has to wire it up. If edits take minutes or hours to appear, or appear for some visitors but not others, the invalidation step is usually what's missing. It's one of the first things we check when a team says the site doesn't show their changes.

When does a global audience make a CDN matter more?

A CDN matters most when your visitors are spread across continents and your origin sits in one region. A US-hosted site viewed from Europe, India or Australia gains the most from edge delivery, because each uncached request crosses an ocean. If nearly all your traffic is in one region near your origin, the gain is smaller but still real for images.

For multilingual or multi-region sites, the CDN also needs to cache each language version separately. If your site redirects visitors by country or language, check that the cache doesn't serve one version to everyone. Information architecture decisions matter here too: subdirectories such as /de/ and /fr/ are simpler to cache correctly than versions switched by cookie. Our guide to website information architecture goes into URL structure.

What can't a CDN fix?

A CDN can't fix a page that is heavy by design. It moves bytes faster; it doesn't reduce how many there are. Oversized images, video backgrounds that autoplay at full resolution, several tag managers and chat widgets all still have to download and run in the visitor's browser.

It also doesn't fix rendering problems. A React app that builds the whole page in the browser shows a blank screen until JavaScript loads, wherever the files come from, and search and AI crawlers may see little content. That's a build issue, covered in our guide to moving a React SPA to an SEO-friendly website. Likewise, a CDN won't make inaccessible markup accessible.

How do you check whether your CDN is working?

You check a CDN by looking at the response headers on your pages and testing load time from the regions your visitors are in. Most CDNs add a header showing whether the request was a cache hit or miss, such as x-vercel-cache on Vercel or cf-cache-status on Cloudflare.

  1. Open the network panel

    In your browser's developer tools, load a page in a private window and select the main document request.

  2. Read the cache header

    Look for a hit or miss status. Reload once; a second visit should usually be a hit for cached pages.

  3. Test from other regions

    Use a speed testing tool that lets you pick a test location near your buyers, and compare time to first byte.

  4. Check field data

    Look at Core Web Vitals in Search Console or PageSpeed Insights, which reflect real visitors rather than one lab test.

If pages are always a miss, the host is rendering them on every request. That's fixable in configuration for most stacks. When we build a website on Next.js, we statically generate marketing pages and cache them at the edge by default; our own site runs on Next.js on Cloudflare Workers.

Frequently asked questions

Is Cloudflare a CDN or a host?
Cloudflare is both. It started as a CDN and security layer you put in front of another host, and that's still a common way to use it. With Workers and Pages, Cloudflare can also host the site itself, so the CDN and the origin are the same network. Many teams use Cloudflare only for DNS and caching while hosting elsewhere.
Does a CDN help SEO?
Indirectly. A CDN makes pages load faster for visitors far from your server, and page experience, including Core Web Vitals, is one of many signals Google considers. It also helps your site stay up during traffic spikes. A CDN won't fix thin content, poor structure or missing pages, which matter much more for rankings than raw delivery speed.
Do I need to pay extra for a CDN?
Usually not. Vercel, Netlify, Cloudflare, Framer and Webflow include CDN delivery in their plans, with bandwidth limits that depend on the plan. You'd pay separately only if you self-host and add a CDN in front, and even then free tiers cover many small sites. Check the host's current plan page for bandwidth and request limits.
Can a CDN cause problems on my website?
Yes, mainly stale content. If caching isn't cleared when you publish, visitors may see old pages, prices or banners for a while. Overly broad caching can also serve one language or logged-in view to the wrong visitor. These are configuration issues, fixed with correct cache rules and automatic invalidation when the CMS publishes.
What is the difference between a CDN and web hosting?
Web hosting is where your site's origin lives, meaning where it's built, stored or rendered. A CDN is the delivery layer that copies files from the origin to servers around the world and serves visitors from the nearest one. Many modern hosts bundle both, which is why the line between them has blurred for marketing sites.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Website, $8,000.

A multi-page marketing site, designed by us, developed in Next.js and animated. $8,000, one-time, up to 6 pages. Book a free 30-minute call to see if it fits.

Schedule Call