CDN vs Local Hosting: Which Actually Makes Your Site Fast
A CDN and local hosting aren't rivals — they solve different halves of the speed problem. A CDN makes your static files fast for everyone by caching them near each visitor; a server near your audience makes your dynamic content fast by shortening the trip to the origin. So the real question isn't "CDN or local hosting", it's "which does my site need, and do I need both?" For most sites the answer is both, but the balance depends on how dynamic your pages are.
What a CDN actually does
A content delivery network keeps copies of your unchanging files close to your visitors. When someone loads your site, images, CSS, JavaScript and fonts are served from the CDN's nearest edge location — one of hundreds worldwide — instead of travelling from your origin server. For a visitor far from your origin, that turns a long trip into a short one for the bulk of the page's weight, which is usually the static assets. A CDN also absorbs traffic spikes and adds a layer of protection, but its core speed job is simple: put static files near everyone, everywhere, all the time.
What a CDN can't do
A CDN can't cache what changes per visitor. The HTML of a logged-in dashboard, a shopping cart, a search result, a form submission, a live database query — this dynamic content is generated fresh on your origin server for each request, so it still makes the full round trip to wherever that origin sits. If your origin is in the US and your visitor is in Australia, the CDN delivers the images quickly but the dynamic page itself still crosses the ocean. The first request for any page — the initial HTML — also frequently reaches the origin. So a CDN reduces the distance penalty but does not remove it for anything personalised or interactive.
When a CDN alone is enough
For a mostly static site, a CDN can carry the day. A brochure site, a portfolio, a documentation site, a static blog — pages that are the same for every visitor — can be cached almost entirely at the edge, so even an origin on the wrong continent feels fast worldwide. Static-site setups and full-page caching push this further, effectively serving whole pages from the CDN. If your site rarely changes per user and you've enabled page caching, you can host the origin wherever is cheapest and let the CDN do the geography. This is the case where location matters least.
When you need a local origin too
The more dynamic your site, the more the origin's location matters. An e-commerce store with per-user carts and checkouts, a membership site with logged-in pages, a web app, or anything that hits a database on most requests will feel the distance to the origin no matter how good the CDN is, because the parts that matter can't be cached. For those, put the origin near your main audience and add the CDN for static assets — the combination, not either alone. Our web hosting by location hub ranks hosts by which regions they offer for exactly this reason.
The best-of-both setup
The strongest, most cost-effective setup for most sites is a single origin near your biggest audience plus a CDN for everyone else. You pay for one hosting plan in the right region, add a CDN (often free at the entry tier), and get fast dynamic content for your majority and fast static content worldwide. Only when you have large dynamic audiences in several distant regions does it pay to run multiple origins or move to a multi-region platform. For how to handle a genuinely worldwide audience, see web hosting for a global audience.
How to tell if your pages are cacheable
The quick test is: does this page look the same for a logged-out stranger as it does the moment after someone signs in or adds to a cart? If yes, it's cacheable and a CDN can serve it from the edge; if no, it's dynamic and depends on the origin. A marketing homepage, a blog post and a product listing are usually cacheable. A cart, an account dashboard, a checkout, a search results page and anything showing 'Hello, your name' are not. Many sites are a mix — a cacheable shell with a small dynamic corner — and modern setups can cache the shell at the edge while fetching just the personalised part from the origin. Knowing which of your important pages fall on which side tells you how much the origin's location actually matters for your site specifically.
A two-minute setup checklist
In practice, most site owners should do four things in order. Put the origin near your biggest audience. Turn on a CDN — one is often bundled with your host, or Cloudflare's free tier works with any host — so static files load from the edge worldwide. Enable page caching for the pages that are the same for everyone, so even whole pages can serve from the edge. Then leave the genuinely dynamic pages to hit the origin, and only worry about their latency if a big chunk of your audience is far from it. That sequence gives you the best speed for the least money and complexity, and it's the same recipe whether you're running WordPress, a static-site generator or a small app. The common failure is skipping the first step — buying a cheap plan on a distant default datacenter and hoping the CDN alone will save a dynamic site. It won't, because the CDN can't cache the parts that make the site dynamic. Put the origin in the right place first, then let the CDN handle everything it can, and you get the benefit of both without paying for infrastructure you don't need.
CDN and hosting, answered
Does a CDN replace the need to host near my audience?
Is a CDN worth it for a small site?
Should I pay for hosting in the right region or just add a CDN?
Compare every host by where its servers are: the web hosting by location hub, or read does server location matter for the speed and SEO reality.