What is a CDN and when does it really speed up a website

Published on 2026-10-20 by frfrand

A CDN brings images, CSS and other resources closer to your visitors. How caching works, when it helps, when it doesn't, and mistakes worth avoiding.

What is a CDN and when does it really speed up a website

Short answer: a CDN really speeds things up when your audience is spread across multiple regions and the site serves heavy resources that repeat —images, CSS, JavaScript, fonts—, because it delivers them from a node close to the visitor. It doesn't fix a slow server that takes time to generate the HTML, nor is it necessary if your audience is already close to the origin.

A CDN (content delivery network) is a set of servers distributed across different regions that can deliver copies of website files from locations close to the visitor. This usually reduces the distance traveled by images, stylesheets, and scripts, and can also decrease the load on the main server.

Imagine a photography website hosted in Portugal that receives visits from Mexico. Without a CDN, images are usually requested from the original server. With a well-configured CDN, some files can be served from a network node located closer to whoever requests them.

How it works?

The server that hosts the original files is known as the origin. The distributed nodes are called points of presence or edge servers. When someone requests an image, the node checks if it has a current copy. If it does, it responds; if not, it consults the origin and decides whether to keep the file.

This mechanism is called cache. A cache hit avoids requesting the file from the origin again; a cache miss requires retrieving it. That is why the first request may behave differently from subsequent ones.

What resources can be stored?

The most common candidates are images, CSS files, JavaScript, and web fonts. In certain architectures, public HTML and API responses can also be stored, provided the rules are appropriate.

A cover photograph may remain identical for weeks, while the result of a reservation changes continuously. It is advisable to establish different policies for each case.

HTTP headers, especially Cache-Control, allow indicating how copies should be treated. Provider rules and the type of request also influence this.

Example: an international booking website

Suppose an agency publishes twenty tourist routes, each with large photographs. It receives visits from Portugal, Mexico, and the United States.

A CDN can deliver photographs and style files from locations close to each visitor. But when someone checks if there are seats available for tomorrow, that operation normally needs current data at the origin or in a system specifically designed to provide correct responses.

The ideal result is a combination: repeatable resources close to the user and dynamic operations where appropriate.

Does a CDN improve SEO?

Speed and user experience matter, but activating a CDN does not guarantee better positions on Google. If images are too heavy, JavaScript blocks the page, or the server takes too long to generate HTML, those problems can persist.

To evaluate the change, I measured before and after. Check response time, real user experience metrics, and cache hit rate. A poorly configured CDN can add complexity without perceptibly improving a website whose audience is already close to the origin.

What invalidating the cache means

You published a new image with the same name, but some visitors are still seeing the previous one. It's a classic case: the old copy is still considered valid.

You can wait for it to expire, purge it using the provider's tools, or publish a different URL, such as foto-v2.webp or a hashed name. This last option allows you to keep long caches without showing outdated content.

It is not advisable to purge the entire site every time an image changes: you lose cache benefits and the origin receives more requests.

Are CDN, hosting, and reverse proxy the same?

No. Hosting runs or stores your site. A CDN distributes content through a network. A reverse proxy receives requests and forwards them to internal servers or the origin; many CDNs work as reverse proxies, but the concepts are not identical.

What a CDN does not solve

A CDN can improve file delivery, but it does not automatically turn a slow application into a fast one. If the server takes time to generate a page or a database query takes too long, you need to work on that origin.

A CDN also does not replace website maintenance. It is an additional piece that is worth measuring before and after installing it.

What does a CDN mean for privacy?

There is an important detail when a page uses personal accounts: the cache should never deliver one person's private data to another. It is not just about gaining speed. Responses with session information, payment data, or private reservations need clear storage and access rules. A misconfigured cache can cause leaks even if the backend is properly authenticated.

In a store, the logo and product photos can be shared among visitors. Each shopper's cart content cannot. That is why you need to consider both HTTP headers and the specific behavior of the provider.

When is it worth installing a CDN?

A CDN usually adds more value if you have visitors spread across different regions, heavy images, lots of static resource downloads, or traffic spikes. If the audience is local and your site already responds quickly from the origin server, it may be better to first optimize images, queries, and JavaScript.

Don't trust an isolated test: compare measurements from representative locations, check cache hits, and check server times. The first visit and subsequent ones may have different behaviors.

How does this apply in ArduMaker?

A website deployed on an ArduMaker VPS is hosted on a server in a specific location. The subdomains that ArduMaker creates in its default zone are already published behind Cloudflare's proxy, a network that also works as a CDN; what is cached depends on the headers your application sends and the proxy rules, so it is worth checking by measuring, not assuming. For a custom domain, you can place a compatible CDN in front and define which resources can be stored temporarily. The decision to configure caches, private content, and expiration policies remains part of your application design.

In one sentence: a CDN helps bring content closer and reduce origin workload, but it only accelerates usefully when you choose well what to distribute and what you should never store as a shared copy.

Frequently asked questions

Does a CDN replace hosting? No. Hosting runs or stores your site (the origin); the CDN distributes copies of part of that content.

What is the cache hit rate? The percentage of requests that the CDN answers with its copy without consulting the origin. The higher it is, the more work it saves your server.

Can I cache pages with user session? Not in a shared way: responses with personal data must be marked as private or non-storeable, or the CDN could show them to another person.

Sources to expand: web.dev CDN Guide · Cache-Control on MDN.

What is a CDN and when does it really speed up a website
  • redes
  • CDN
  • rendimiento
  • web

Keep reading

All articles · VPS plans