What is a content delivery network (CDN)?
When you load a web page, every image, font, script and video has to travel from a server to your device. If that server is in Virginia and you are in Tokyo, the trip is long and every file makes it. A CDN shortens the trip. It keeps copies of the site's static files on servers (called edge nodes or points of presence) in dozens or hundreds of cities, and routes each request to the nearest one.
The origin server still exists and still holds the real site. The CDN sits in front of it as a cache: the first visitor in a region pulls a file from the origin, the CDN keeps it, and everyone after that gets the copy. Modern CDNs also compress files, convert images to lighter formats, absorb traffic spikes and filter out attacks before they reach the origin.
Why it matters
Why a CDN matters
Speed, first. Distance is latency, and latency is the part of page load that no amount of code optimization removes. For a brand with visitors on more than one continent, a CDN is the difference between a site that feels local and one that feels far away. Second, resilience: a launch that lands on a single server can take it down, while the same traffic spread across a network barely registers. Third, cost and security, since the CDN serves most of the bytes and takes most of the hits, leaving the origin to do only the work that needs it.
In practice
How a CDN works in practice
- 01
Setting one up is mostly DNS and configuration. The site's domain is pointed at the CDN, the CDN is told where the origin lives, and rules are set for what to cache and for how long. Images, CSS, JavaScript and video are cached aggressively. HTML pages are cached more carefully, because they change, and because some of them are personal to the person logged in.
- 02
The ongoing work is cache management. When a page is edited, the old copy has to be purged from the edge or visitors keep seeing it, so the CMS and the CDN need to talk to each other. Video is the big win: a film served from the edge starts instantly and holds its quality, which is why every serious video platform runs on one. Most managed hosting now includes a CDN by default, so the question is less whether to use one than whether it is configured well.
Watch out
What people get wrong about CDNs
Assuming a CDN fixes a slow site. It fixes distance; it does not fix a 9 MB hero image, a theme that loads forty scripts or a database query that takes three seconds. Those have to be fixed at the origin. The other mistake is forgetting the cache exists, then spending an afternoon wondering why the change published an hour ago is not showing. If the edit is live on the origin and stale on the site, purge the cache before touching anything else.
A quieter mistake is caching things that should never be cached: a logged-in dashboard, a checkout, a personalized page. Served from the edge, those can show one visitor another visitor's data. Cache rules deserve the same care as the rest of the build.





