What is a CDN? Content delivery networks explained

What is a CDN? A content delivery network is a group of servers spread across many locations that keeps copies of a website's files close to the people visiting it. Visitors get those files from a nearby server instead of the website's own server, which may be far away, so pages and videos load faster.

Last updated November 16, 2026

Dark title card reading "What is a CDN?" under the label Cloud Guide

The short version

  • CDN stands for content delivery network. AWS says it can also stand for content distribution network.
  • A CDN stores cached copies of files such as images, stylesheets, scripts and video on servers near users.
  • The main goal is lower latency: shorter trips for data mean faster loading.
  • CDNs also take load off the website's own server, help absorb traffic spikes and can blunt DDoS attacks.
  • A CDN doesn't replace the website's own server. The original files still live there, on what Google and Microsoft call the origin server.

What does a CDN do?

AWS defines a content delivery network as "a network of interconnected servers that speeds up webpage loading for data-heavy applications." Mozilla's MDN Web Docs describes it as "a group of servers spread out over many locations."

The problem a CDN solves is distance. When you open a website, its data has to travel across the internet from the server that hosts it to your device. AWS explains that if you're far from that server, a large file such as a video or an image takes a long time to load. A CDN keeps copies of that content on servers closer to you, so it reaches you faster.

AWS says the primary purpose of a CDN is to reduce latency, the delay in communication between a website and its visitors. Mozilla's MDN Web Docs also notes that geographical distance affects latency.

The big cloud computing providers (AWS, Google Cloud and Microsoft Azure) each sell a CDN.

How does a CDN work?

A CDN places servers in many locations around the world. These sites are called points of presence (POPs), and the servers in them are called edge servers. The website's own server, where the original files live, is called the origin server.

Microsoft's Azure documentation and Amazon's CloudFront documentation describe the same basic flow:

  1. A visitor requests a file. This could be an image or an HTML page.
  2. DNS sends the request to a nearby POP. AWS says this is typically the nearest CloudFront POP in terms of latency. Microsoft says it's usually the POP geographically closest to the user.
  3. The POP checks its cache. If it already has a copy, it sends the file straight back.
  4. If it doesn't, it fetches the file from the origin. The origin server returns the file to the edge server, which passes it on to the visitor and keeps a copy.
  5. The next visitor nearby gets the cached copy. The origin server doesn't have to handle that request at all.

Google Cloud calls a request answered from the cache a cache hit and one that has to go to the origin a cache miss. The share of requests served from the cache is the cache hit ratio. Google gives an example: with a 60 percent ratio, a file comes from the cache 60 percent of the time and from the origin 40 percent of the time.

Some CDNs add another layer between the POPs and the origin. AWS says CloudFront's regional edge caches have a larger cache than an individual POP, so files stay cached longer and fewer requests have to go back to the origin.

How long does a CDN keep files?

Files don't stay cached forever. The website tells the CDN how long to keep each file, usually through HTTP headers. This is called the time to live (TTL). Microsoft says a file stays cached on an Azure edge server until the TTL set in its HTTP headers expires, and if the origin doesn't set one, the default is 7 days.

Files can also drop out early. Google says caches are usually full, so they constantly evict content that hasn't been accessed recently to make room. Website owners can also remove a file on purpose, which is called invalidating it. That's how an updated logo or a corrected page replaces the old version before its TTL runs out.

Static vs dynamic content

AWS splits what a CDN delivers into 2 types:

Caching doesn't work well for dynamic content, because it can change with every request. CDNs can still speed it up. AWS calls this dynamic acceleration: the CDN server forwards the request to the origin over a connection it already has open and has optimized, instead of the visitor's device setting up a new one from scratch. Microsoft says Azure's CDN can accelerate dynamic content using route optimization across its POPs.

Many CDNs can also run code at the edge. AWS says an edge server can be programmed to inspect requests and change caching behavior, handle bad requests or modify content before responding. AWS says CloudFront lets you run your own code at the network edge using serverless compute features.

Benefits of using a CDN

AWS lists 4 benefits:

Microsoft adds that a CDN helps a site cope with sudden high loads, such as the start of a product launch.

Downsides of a CDN

A CDN isn't always a win. Mozilla's MDN lists some drawbacks of loading files from a third-party CDN instead of hosting them yourself:

There's also the question of where data sits. Google notes that with Cloud CDN, data may be stored at serving locations outside the region of your origin server.

Examples of CDN providers

Many companies run CDNs, including the big cloud providers and services built for open source code. A few examples:

CDNCompanyWhat the company says
Amazon CloudFrontAWSA CDN service delivering data through more than 450 points of presence
Cloud CDNGoogle CloudUses Google's global edge network to serve content closer to users
Azure Front DoorMicrosoft"An advanced content delivery network (CDN) for the cloud"
jsDelivrjsDelivr"A free CDN for open source projects"

Microsoft is also retiring one of its older CDN products. It says Azure CDN Standard from Microsoft (classic) will be retired on September 30, 2027, and tells customers to migrate to Azure Front Door Standard or Premium.

CDN vs DNS

CDN and DNS do different jobs. MDN describes DNS, the Domain Name System, as the internet's naming system: its best-known job is turning a domain name such as mozilla.org into a numeric IP address.

In the Azure and CloudFront flows above, DNS is the step that routes a visitor's request to a CDN location. The CDN's edge server then delivers the file, from its cache or from the origin.

Frequently asked questions

What does CDN stand for?

CDN stands for content delivery network. AWS notes that it can also stand for content distribution network. Both names describe the same thing: a network of servers that delivers web content from locations close to users.

Is a CDN a cache?

Caching is the core of how most CDNs work, but a CDN does more than cache. AWS says CDNs work on the principles of caching, dynamic acceleration and edge logic computations. Fastly says the best CDNs add layers of security, such as DDoS protection, web application firewalls and TLS/SSL certificates.

What is a CDN link?

It's a web address that loads a file from a CDN instead of from the website's own server. MDN says CDNs are widely used to deliver the stylesheets and JavaScript files of libraries such as Bootstrap and jQuery. For example, jsDelivr shows a link of the form https://cdn.jsdelivr.net/npm/package@version/file for loading any project hosted on npm.

Is a CDN the same as web hosting?

No. A website still needs a server that holds the original files. In Microsoft's description, that origin can be an Azure web app, an Azure Storage account or any publicly accessible web server, and the CDN fetches files from it. Fastly says traditional hosting uses a single data center or hosting location to serve all of a website's files, while a CDN adds edge servers that deliver content without going back to the origin each time.

Do I need a CDN for my website?

It depends on where its visitors are. AWS explains that a CDN speeds things up for visitors who are far from the website's server, where large files would otherwise take a long time to load. MDN lists trade-offs to weigh against that, including the extra dependency on a third party and the risk of a compromised CDN.

More in Cloud

Sources