A content delivery network (CDN) is a distributed group of servers that stores copies of a website’s content in many locations, so users get it from a server close to them rather than from one distant origin.

Definition
A content delivery network is a layer of servers, often called edge servers or points of presence, spread across many regions. Instead of every visitor’s request traveling to the single origin server where a site is hosted, requests are routed to a nearby edge location. If that location already has a cached copy of the file, it responds immediately. If not, it fetches the file from the origin, returns it and keeps a copy for the next user.
CDNs began as a way to speed up static files such as images, stylesheets, scripts and video. Today most also provide TLS termination, DDoS protection, web application firewalls, bot management, image optimization and the ability to run code at the edge. Large commercial providers and the CDN services built into major cloud platforms all follow the same basic model.

How it works
Setting up a CDN usually means pointing your domain’s DNS at the provider and telling it where your origin is, which might be a web server, a load balancer or a cloud storage bucket. When a user requests a page, DNS or anycast routing directs them to an edge location that is close in network terms. That shorter path reduces latency and the number of hops where delays or packet loss can occur.
The edge server checks its cache using a cache key, typically the URL plus selected headers or cookies. Whether something is cached, and for how long, is controlled by HTTP headers such as Cache-Control from the origin and by rules configured in the CDN. Static assets with versioned file names can be cached for a long time, while HTML may be cached briefly or revalidated with the origin. When content changes, teams purge specific URLs or tags so the edge fetches fresh copies.
Beyond caching, the edge sits in front of the origin as a protective layer. It absorbs traffic floods, filters malicious requests and hides the origin’s address. Many CDNs also let developers run small functions at the edge to handle redirects, authentication checks, A/B tests or personalization close to the user, without a round trip to the origin.
Keep learning
Put it into practice
Cloud architecture, migration and modernization on AWS and Azure, planned for reliability, security and controlled cost.
Explore serviceFast, secure and accessible web applications built with React and Next.js, designed for real users and real traffic.
Explore serviceCloud security architecture, posture management, identity controls and container security for AWS, Azure and Kubernetes environments.
Explore serviceFAQ
Not every site, but most public sites benefit. If your visitors are spread across regions, your pages include many images or scripts, or you want protection against traffic floods, a CDN helps. A small internal tool used from one office may see little difference.
Partly. CDNs can cache dynamic responses for short periods, cache variations by selected headers, or serve stale content while revalidating in the background. Truly per-user responses, such as account pages or carts, usually pass through to the origin, though edge functions can handle some personalization close to the user.
No. Hosting is where your site’s files and application actually live, the origin. A CDN sits in front of that origin and delivers cached copies from many locations. Some platforms bundle both, especially for static sites, but they remain separate functions.
Talk to a solution architect about where it fits in your roadmap.
