Skip to content
Hosting

What Is a CDN, and Does a Small Website Need One?

A CDN serves copies of your files from servers near each visitor. Here is what that fixes, what it leaves alone and how to tell whether your site needs one.

Network cables plugged into a patch panel
8 sections · 7 min read
In this article · 8 sections

A speed test flagged “serve static assets from a CDN”. Your host’s dashboard has a button labelled CDN. A developer said you should “put the site behind Cloudflare”. You run a small business site and you are not sure whether any of this applies to you or whether it is one more thing to pay for.

So what is a CDN, in plain terms, and does a small website need one at all? This guide explains how one works, what it can and cannot fix, what goes wrong when it is set up carelessly, and how to decide for your own site.

What is a CDN, in one paragraph

A content delivery network is a group of servers spread across many cities and countries. When a visitor requests your site, the CDN serves copies of your files from the server nearest to them instead of making every request travel all the way to your hosting server. Your hosting server is called the origin. The CDN servers, often called edge servers, keep cached copies of files from the origin and hand them out until they expire or you clear them.

What usually gets served from the CDN

  • Images, including the resized versions WordPress makes.
  • Stylesheets (CSS) and scripts (JavaScript).
  • Fonts, icons and downloadable files.
  • Sometimes the HTML pages themselves, if the CDN is set up to cache full pages.

Anything personal to a visitor, such as a cart, a logged-in dashboard or a checkout page, must not be cached at the edge, and a correctly set up CDN passes those requests straight through to your origin.

What a CDN improves, and what it does not

Where it helps

  • Distance. If your visitors are spread across countries, or your hosting is far from your audience, files arrive faster from a nearby edge server.
  • Load on your hosting. When images and scripts come from the CDN, your server handles fewer requests and uses less data transfer.
  • Traffic spikes. Cached files keep loading even when a sudden rush would strain a small hosting plan.
  • Some protection. Many CDNs that sit in front of the whole site (a “proxy” setup) also filter obvious attack traffic and offer a web application firewall. That is a separate feature, and plan levels differ.

Where it does not help

  • A slow server response. If your hosting takes a long time to build each page, a CDN that caches only images and scripts leaves that delay in place. The first byte still comes from the origin.
  • Heavy pages. A page that loads too many scripts or huge images is still heavy when served from a CDN. Fix the page first.
  • Uncached store pages. Cart, checkout and account pages bypass the cache, so they are only as fast as the origin.
  • A broken site. Errors, plugin conflicts and database problems are untouched.

That is why speed work usually starts with the site itself. Our guide to making a WordPress site faster covers the changes that usually matter before a CDN does.

Does a small website need a CDN?

Often, not urgently. Sometimes, clearly yes. These questions sort it out.

  1. Where are your visitors, and where is your server? If both are in the same region, the distance benefit is small. If your server is in one country and your customers are spread across others, a CDN makes a visible difference.
  2. How image-heavy is the site? Portfolios, galleries, stores with many product photos and recipe or travel blogs gain more than a text-led service site.
  3. Is your hosting plan straining? If you regularly hit resource or data transfer limits, moving static files to a CDN can relieve it.
  4. Do you get attacked or scraped? A proxy CDN with basic filtering can cut junk traffic before it reaches your host.
  5. Does your host already include one? Many hosts bundle a CDN or a one-click integration. Check before buying separately.

A local business with a light site, hosted in the same region as its customers, may see little difference. A small online shop selling across the country or abroad, or a site with big images, usually benefits.

Run a speed test from more than one location before and after, so you are judging the change on evidence. Our free website speed test is one way to get a baseline.

Two ways a CDN gets set up

The proxy method: the whole site goes through the CDN

You change your domain’s nameservers, or specific DNS records, so that visitor traffic reaches the CDN first. The CDN then fetches from your hosting as needed. This is how services like Cloudflare are commonly used. It covers every file and can add security features, but because it sits in front of everything, a wrong setting affects the whole site.

The pull-zone method: only static files go through the CDN

You create a CDN address, often a subdomain such as cdn.yourdomain.com, and a WordPress plugin rewrites image, CSS and script URLs to use it. Your HTML still comes from the hosting directly. DNS for the main site does not change. It is easier to undo, but it does nothing for page delivery or security.

Common problems after switching a CDN on

  • Changes do not appear. The edge is still serving an old copy of a stylesheet or image. Purge the CDN cache as well as your WordPress cache after design changes.
  • “Too many redirects”. In a proxy setup, an SSL mode that does not match your hosting’s certificate can make the site loop between HTTP and HTTPS. The CDN’s SSL setting must match what the origin supports.
  • Customers see each other’s carts or a logged-in bar. Full-page caching is caching pages it should not. Exclude cart, checkout, account and admin paths, and anything with login cookies.
  • Email stops working after a DNS move. When nameservers move to the CDN, every DNS record has to be copied across, including mail records (MX, SPF, DKIM). Mail-related hostnames should normally not be proxied.
  • Payment or API callbacks fail. Security rules on the CDN can block legitimate requests from gateways or services. Check the CDN’s firewall logs if orders stay pending.
  • The real visitor IP disappears. Your server sees the CDN’s IP instead of the visitor’s, which can upset security plugins and logs. Most CDNs pass the real IP in a header that your host or a plugin can read.

If the CDN also offers a firewall, our guide to web application firewalls for small business sites explains what that layer does and how it differs from caching.

What a CDN costs, and what changes the price

Several CDNs have free plans that suit small sites, and some hosts include one in the hosting price. Paid plans are usually priced on some mix of:

  • The amount of data served from the edge each month.
  • The number of requests.
  • Regions covered, since some providers charge more for certain parts of the world.
  • Extra features: image optimisation, advanced firewall rules, bot management, priority support.

Each provider’s own pricing page lists its current plans and what the free tier includes. Look at the data and request limits, and what happens if you exceed them. A CDN is normally a small part of the overall running cost of a site; our main guide on the cost of web hosting in india puts the bigger line, the hosting itself, in context.

Questions to ask before you commit to one

Whether the CDN comes from your host or a separate provider, a short list of questions saves surprises later:

  • Does my host already run a CDN or edge cache for me? Adding a second one on top can cause confusing caching behaviour.
  • Which of my files will be cached, and for how long? You want long cache times for images and fonts, shorter ones for anything you edit often.
  • How do I clear the cache? A plugin button, a dashboard, or an automatic purge when you update a post.
  • Who controls DNS after setup? If nameservers move to the CDN, that account becomes where every DNS change happens. Make sure the login is in the business’s name.
  • How do I switch it off quickly if something breaks? Most proxy CDNs have a pause or development mode; know where it is before you need it.

A careful order for turning one on

  1. Take a backup and note your current DNS records, including email.
  2. Measure speed from two or three locations so you have a baseline.
  3. Choose proxy or pull-zone based on whether you want security features or just faster files.
  4. Set exclusions for cart, checkout, account and admin before turning on page caching.
  5. Match the SSL mode to your hosting’s certificate.
  6. Test the site logged out, logged in, and through a full order or form submission.
  7. Measure again and keep the setup only if it actually helped.

If you would like a second pair of eyes on whether a CDN is worth it for your site, or help with the DNS side without breaking email, our hosting and domain support can set it up and check it with you.

If your real complaint is that visitors abroad see a slow site, our post on a website that is slow in other countries covers testing and fixes beyond the CDN.

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.