Cybersecurity glossary

What is a Content Delivery Network (CDN)?

Learn what a Content Delivery Network (CDN) is, how edge caching and PoPs reduce latency, how CDNs differ from load balancers, and which security controls matter at the edge.

DNS and infrastructureUpdated July 22, 2026
Also known asCDNContent distribution networkEdge content network

Definition

A Content Delivery Network (CDN) is a geographically distributed set of edge servers that cache and serve web content closer to users, reducing latency and origin load while often providing TLS termination, traffic filtering, and availability controls.

Why Content Delivery Networks exist

Every public website and API has a physical origin: one or more servers that hold the authoritative application and content. If every user worldwide must reach that same place for every image, stylesheet, script, and page fragment, latency grows with distance, bandwidth costs rise, and a busy or attacked origin becomes a single point of pain.

A Content Delivery Network (CDN) moves copies of cacheable content—and often traffic-handling controls—into many edge locations called points of presence (PoPs). Users still request the same hostname. Behind that name, the CDN steers them toward a nearby edge that can answer quickly when the object is already stored.

CDNs began as a performance tool for static media. Today they are also an operational and security control plane: TLS termination, HTTP/2 and HTTP/3 front doors, WAF features, bot management, and DDoS absorption commonly live at the same edge that serves files.

How a CDN works

At a high level, a CDN sits between clients and your origin. DNS (and sometimes anycast routing) directs clients to an edge. The edge checks whether it can satisfy the request from cache. If not, it retrieves the response from origin or another cache tier, applies policy, and may store the result for later requests.

One hostname, many edge locations

Clients resolve your CDN hostname and reach a nearby point of presence. Cached responses stay at the edge; misses are fetched from origin and reused.

User device

Requests assets or pages through the CDN hostname.

CDN edge network

Routing and DNS steer traffic to an available nearby PoP.

Europe

Lisbon edge

Cache hit

Serves the asset from a nearby PoP without contacting origin.

South America

São Paulo edge

Same hostname

Another PoP answers the same CDN hostname for regional users.

Asia Pacific

Tokyo edge

Cache miss → origin

Fetches once from origin, then stores the response for later requests.

Cache keys, TTLs, and purge rules decide whether two requests share the same stored object. A miss is normal the first time; repeated misses often mean cacheability or keying is misconfigured.

Origin server

Authoritative source for uncached or dynamic responses.

The request path, step by step

1

Client resolves the hostname

DNS returns addresses for the CDN edge network, not necessarily the origin’s private infrastructure.

2

Traffic reaches a nearby PoP

Routing and provider policy place the connection at an available edge location close in network terms.

3

Edge evaluates cacheability

Cache keys, TTLs, cookies, authorization, and response headers decide whether a stored object can be reused.

4

Cache hit serves locally

The PoP returns the object immediately, cutting round trips to origin and reducing origin load.

5

Cache miss fetches origin

The edge retrieves content from origin (or a parent cache), then usually stores eligible responses.

6

Policy and security apply

TLS, redirects, compression, WAF rules, rate limits, and header rewrites can run before the response leaves the edge.

What CDNs typically deliver

Static assets

Images, fonts, JavaScript, CSS, and downloadable files are the classic high-hit-rate CDN workload.

Whole-site acceleration

Many sites put the CDN in front of HTML and app traffic so TLS, routing, and caching happen at the edge.

Media streaming

Video and large downloads benefit from regional capacity and segmented caching.

API front doors

Public APIs use CDNs for TLS, DDoS absorption, and selective caching of safe, idempotent responses.

Not every response belongs in cache. Personalized pages, authenticated APIs, checkout flows, and responses that vary by cookie or authorization header need explicit rules—often Cache-Control: private or no-store—so one user’s data is never served to another.

CDN vs origin vs load balancer

Teams sometimes treat these words as interchangeable. They solve different problems and usually work together.

LayerPrimary jobTypical scope
CDNServe content from many global edges; cache; absorb and filter trafficInternet-facing hostname in front of one or more origins
OriginHold authoritative application logic and contentYour application servers, object storage, or platform backend
Load balancerDistribute requests across healthy servers in an environmentInside a region, VPC, cluster, or cloud service

A mature setup often uses all three: the CDN faces the public internet, the load balancer spreads traffic among origin instances, and the origin remains the source of truth for dynamic work and uncached content.

Benefits of using a CDN

Lower latency

Users fetch cacheable objects from a nearby PoP instead of traversing the full path to a distant origin on every request.

Reduced origin load

High hit ratios keep repetitive asset and page traffic off application servers and databases.

Capacity during spikes

Edge capacity helps absorb launches, campaigns, and many volumetric floods that would overwhelm a single origin.

Consistent edge controls

TLS settings, redirects, compression, and security headers can be enforced uniformly at the front door.

These gains depend on configuration quality. Poor cache keys, accidental caching of private responses, or frequent full-site purges can erase performance benefits and create correctness incidents.

Security considerations at the edge

A CDN changes your attack surface. It can harden the public perimeter—and it can also hide misconfigurations until they affect every region at once.

Origin exposure

If attackers can reach the origin IP directly, they may bypass CDN WAF and rate controls. Restrict origin access to the CDN.

Cache poisoning and key confusion

Untrusted inputs in cache keys or header-based variance can cause the edge to store and serve the wrong object.

Sensitive content leakage

Caching authenticated or personalized responses can leak private data across users. Default to no-store for sensitive paths.

TLS and header consistency

Certificates, protocol minimums, HSTS, CSP, and framing headers must be correct on CDN responses—not only on origin.

Shared multi-tenant edges

Large CDNs are shared infrastructure. Understand tenant isolation, SNI/Host matching, and provider incident history.

Third-party script risk

Loading libraries from a public CDN without Subresource Integrity means a compromised file can run on your pages.

Treat the CDN as part of your security boundary. Inventory every hostname it fronts, review who can purge caches or change rules, and verify that security headers survive edge rewrites.

Operational checklist for teams

  • Map which hostnames terminate on the CDN and which still point directly at origin.
  • Define cache policies by path: long TTLs for immutable assets, short or no-store for personalized and authenticated responses.
  • Use content-hashed filenames for static assets so you can cache aggressively without stale-deploy surprises.
  • Restrict origin firewalls or access lists so only the CDN (or expected networks) can reach application ports.
  • Test purge, soft-purge, and rollback procedures before you need them during an incident.
  • Confirm TLS versions, certificates, redirects, and security headers on the CDN edge—not only on origin.
  • Monitor cache hit ratio, origin error rates, regional latency, and unexpected 4xx/5xx spikes by PoP when available.
  • Apply SRI to third-party scripts and styles loaded from public CDNs, or self-host critical dependencies.
  • Review who can change CDN rules, WAF policies, DNS, and certificates; require MFA and change logging.
  • Document how the CDN interacts with your WAF, bot controls, and rate limits so bypass paths are intentional.

Choosing and configuring a CDN wisely

Do not select a CDN only by the number of advertised cities. Ask how cache keys are formed, how quickly purges propagate, whether you can restrict origin access, how TLS and HTTP versions are managed, and what visibility you get during a regional outage.

Useful evaluation questions include:

  • Which responses are cached by default, and how do cookies or Authorization headers affect cache eligibility?
  • Can you force HTTPS, modern TLS only, and consistent security headers at the edge?
  • How do you invalidate content after a bad deploy without wiping the entire cache unnecessarily?
  • What happens to users when origin is slow or down—stale-if-error, custom error pages, or hard failures?
  • Are WAF, bot, and DDoS features tunable without creating silent false positives on APIs?
  • Can you export logs with enough detail to investigate cache poisoning, abuse, and misrouting?

The right design depends on content mix. A documentation site may live almost entirely on long-lived edge caches. A banking app may use the CDN mainly as a hardened TLS and filtering front door with very little caching of HTML.

The practical takeaway

A Content Delivery Network (CDN) places cache and traffic controls at many edge locations so users reach content with less latency and origins face less repetitive load. Performance comes from sound cache policy. Resilience comes from distributed capacity and controlled failover behavior. Security comes from locking down origin, preventing sensitive caching, and treating the edge as a first-class control plane.

Use a CDN as infrastructure with explicit rules—not as a black box that “makes the site faster.” When cache keys, TTLs, TLS, headers, and access controls are intentional, the CDN becomes one of the highest-leverage layers in a modern web architecture.

Related security terms

Frequently asked questions

What is a CDN in simple terms?

A CDN is a network of servers around the world that stores copies of your website files near your users. Visitors download from a nearby server instead of always waiting for your main origin server.

Does a CDN only cache images and CSS?

No. Modern CDNs cache static assets and can also accelerate HTML, APIs, video, downloads, and dynamic content through edge rules, routing, and selective caching—though not every response should be cached.

Is a CDN the same as a load balancer?

Not exactly. A load balancer usually distributes traffic among servers in one application environment. A CDN places capacity at many global edges, caches content, and often sits in front of the whole origin stack.

Can a CDN improve security?

Yes, when configured well. CDNs can absorb volumetric attacks, terminate TLS consistently, hide origin IPs, and host WAF or bot controls. Misconfiguration can still cache private data or weaken headers.

What is a cache hit versus a cache miss?

A cache hit means the edge already has a usable copy and can answer immediately. A cache miss means the edge must fetch from origin (or another cache tier) before it can serve and usually store the response.

Will a CDN make my site always available?

It improves resilience by spreading capacity and serving cached content during some origin issues, but it is not a full backup strategy. Origin failures, bad purges, DNS problems, and control-plane outages can still cause incidents.

Should APIs use a CDN?

Often yes for public APIs that benefit from TLS termination, DDoS absorption, rate controls, and careful caching of safe GETs. Authenticated or highly personalized responses usually need strict no-store or short-lived cache rules.

References

Explore authoritative guidance and frameworks related to content delivery network (cdn).

Explore every security definition

Return to the glossary to search by term, alias, starting letter, or security category.

Browse glossary