Talk to a person. We reply within one working day.

SEO and AI search
Web
AI
Resources
WorkAboutStart a project

Website performance · 11 Nov 2026 · 7 min read

What is a CDN and do you need one for your website?

A CDN is one of the few speed improvements that works without changing the website itself. It also has failure modes that catch people out. This guide covers both sides.

The short answer

A CDN, or content delivery network, is a group of servers in many places that keep copies of your site's files and serve each visitor from a nearby one. It speeds up images, styles and scripts for visitors far from your host. It does not fix slow server code, and it can cause stale or leaked pages if set up carelessly.

What is a CDN and how does it work?

A CDN, short for content delivery network, is a group of servers spread across many places that keep copies of your website's files and deliver them to visitors from the nearest one. Your own server, where the site lives, is called the origin. The CDN's servers sit between the origin and the visitor.

According to web.dev, three things make this faster. The CDN's servers are closer to visitors than the origin, so each round trip is shorter. Networking improvements on the CDN's side speed the connection. And a cache on the CDN removes the need for many requests to reach the origin at all.

The usual method is called origin pull. The first time a file is requested, the CDN fetches it from your origin and stores a copy. After that, it serves the copy to everyone nearby until the copy expires. A visitor in Australia loading a site hosted in the USA, or a visitor in Japan loading one hosted in the UK, gets the stored file from a server in their own region rather than waiting for the long journey to the origin.

What a CDN speeds up and what it leaves alone

Part of your siteDoes a CDN help?Why
Images, styles, scripts and fontsYes, most clearlyThese files are the same for every visitor and can be stored and reused
Pages that are the same for everyoneOften, if you allow cachingThe CDN can serve the finished page without asking your server
Basket, checkout and account pagesNo, and they must not be cached for sharingThey show private, changing information to one person
Slow database queries and heavy server codeNoThe work still happens on the origin when a page is not cached
Chat, booking and tracking widgets from other companiesNoTheir files come from the other company's servers

Web.dev notes that CDNs tend to improve the loading measure Google calls LCP, because they cut the time before the first byte arrives and speed up the files needed to show the main content. It also notes that even content that cannot be cached is often delivered faster, because the visitor connects to a nearby server and the CDN carries the rest of the journey on its own network. A CDN is a delivery method, not a search signal. Any benefit comes through faster, steadier pages.

Does a small business website need a CDN?

Often not at the start, and sometimes already included. The answer depends on where your visitors are and what the site serves.

Your situationLikely answer
Most visitors are in the same country as your host and the pages are lightProbably not needed yet
Visitors come from several regions, for example the USA, the UK, the UAE, Australia, Singapore or JapanLikely useful
The site has many large images or videoLikely useful, once the files are sized and compressed
An online store expects traffic spikes during salesUseful, because it takes load off the origin
The site is on a managed platform or website builderCheck the documentation, since delivery through a CDN may already be included
Pages are slow even for nearby visitorsFix the origin first; a CDN will not hide slow code

If you built the site with a website builder, many include delivery from several locations as part of the service, and you gain little by adding another layer. The comparison of a website builder and hiring a developer covers what each route usually handles for you.

Do the groundwork first. A CDN will carry a photograph that is far too big around the world faster, but it is still far too big. Size and compress images as the guide to website images describes. And speed is only one reason visitors leave: a menu they cannot follow costs just as much, so look at website navigation and menu structure alongside it.

What can go wrong when a CDN is set up

Most problems come from the CDN doing exactly what it was told. These are the common ones.

ProblemWhat you seeHow to prevent it
Stale contentAn edit or new image does not appear for hours, or only for some visitorsLearn how to purge the cache, and use versioned file names so a changed file gets a new address
Private pages cachedOne visitor sees another's basket, name or account detailsExclude basket, checkout, account and logged-in pages from caching, and test in a private window
Nothing is cachedNo speed gain, and a high load on the originSet cache headers such as max-age so the CDN knows how long to keep each file
Tracking parameters create many copiesFrequent requests reach the origin even for the same pageAsk the developer to ignore analytics parameters when building the cache key
Settings that disagreeRedirect loops or certificate warnings after switching onCheck how the CDN and origin handle HTTPS, and test before and after the switch
Two caches fightingUpdates appear in one place and not anotherDecide which layer caches what, and clear them in order
Overstrict security rulesGenuine visitors, or search crawlers, are blocked or challengedTest as a visitor and with a crawler check such as Search Console URL inspection

Web.dev gives one more guide for planning: a long cache time suits files that never change, and a file cached for a year cannot be updated without changing its address, so versioned names are the standard answer. It also notes a good aim is a high cache hit ratio, meaning most requests are served from the cache. Ask your developer how that is measured.

There are also business questions. A CDN passes visitor traffic through another company's servers in many countries. Mention that in your privacy notice, check where logs are stored, and ask a lawyer how rules in the countries you serve apply. Read how the service is billed so that a traffic spike does not bring a surprise, and keep a note of how to switch it off.

How a CDN is usually set up

Setup varies by provider, so follow the provider's current documentation. The outline is similar.

  1. Decide what goes through it: the whole site, or only static files such as images and scripts.
  2. Connect it to the domain. For the whole site, you usually change DNS settings so traffic reaches the CDN first. For static files only, one common pattern is a separate subdomain, such as one named for static files, with a CNAME record pointing to the CDN. The guide to DNS records explains what those records do and why a mistake can take a site offline.
  3. Tell the CDN where your origin server is and which pages it may cache.
  4. Set cache headers on the origin so each type of file has a sensible lifetime.
  5. Check the secure connection works from visitor to CDN and from CDN to origin.
  6. Test, then change the DNS only when you are happy, and keep the old settings written down in case you need to reverse the change.

A CDN mostly deals with the front end, meaning the files the browser downloads and displays. Work done on the server, such as processing an order, still happens on the origin. The difference is explained in front end versus back end development.

How to test that it works

Test the page from your normal browser and from a private window. Edit something visible, publish it and check that the change appears. Load a page that should be private, such as an account page, and make sure it does not appear for someone who is not logged in. Many CDNs add a header to the response that shows whether a file came from the cache; check your provider's documentation for the name.

Compare speed before and after with the same tool and the same pages. A CDN's main gain is for visitors far from the origin, so test from a region other than your own if the tool allows it. If you want help judging whether a CDN fits your site and setting it up safely, Liftup Technologies' website development service is one place to start.

Related guides

Questions and answers

What is a CDN?

A content delivery network is a group of servers in many places that store copies of your site's files and serve each visitor from a nearby one. It shortens the distance data travels and removes many requests from your own server. Your own server is called the origin.

Does a small business website need a CDN?

Not always. If visitors are mostly near your host and the pages are light, you may not need one yet. It helps most when visitors are spread across regions, when pages carry many images or video, or when traffic spikes. Many managed platforms already include one.

What can go wrong when a CDN is set up?

Visitors may see stale pages, private pages may be cached by mistake, and settings that disagree may cause redirect loops or certificate warnings. Security rules can also block genuine users. Test in a private window, exclude private pages from caching and know how to purge the cache.

Will a CDN help my SEO?

A CDN is a delivery method, not a search signal. If it makes pages faster and steadier for your visitors, that can help your Core Web Vitals, which Google says its ranking systems use. It will not fix poor content or slow server code.

Is a CDN the same as web hosting?

No. Web hosting is where your site lives and where pages are produced. A CDN sits in front of it and stores copies of files closer to visitors. You still need hosting, and a CDN cannot replace a weak server.

Tell us what you are building.

A short call, a written plan and a fixed quote. No obligation.

Get a free quote