# CDN

> A CDN is a group of servers in many locations that store copies of your content and serve it from the nearest one. What it caches, its risks, and how to measure it.

Canonical: https://scaplet.com/glossary/cdn

Glossary Glossary · Performance

A CDN is a group of servers in many locations that store copies of your content and serve it from the nearest one. What it caches, its risks, and how to measure it.

3 min

read

2

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

A CDN (content delivery network) is a group of servers distributed across multiple geographic locations that store duplicate copies of data. Requests are fulfilled by whichever servers are closest to the user, which can lower latency and lowers the request load on your own servers. CDNs are widely used for static assets such as stylesheets and JavaScript files.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcdn%20(%22CDN%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcdn%20(%22CDN%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcdn%20(%22CDN%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcdn%20(%22CDN%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 3 minutes.

1. [How CDNs work 01](#how-cdns-work)
2. [Common use cases for CDNs 02](#common-use-cases-for-cdns)
3. [Benefits of CDN adoption 03](#benefits-of-cdn-adoption)
4. [CDN limitations and risks 04](#cdn-limitations-and-risks)
5. [Measuring CDN impact 05](#measuring-cdn-impact)

_01_Check it

## How CDNs work

MDN defines a CDN as a group of servers distributed across multiple geographic locations that store duplicate copies of data. The servers fulfill requests based on which one is closest to the end user, which makes for fast service that is less affected by high traffic.

MDN says CDNs are used widely for delivering stylesheets and JavaScript files (static assets) of libraries like Bootstrap and jQuery, and that entire websites can be served from CDNs, particularly static websites made only of static HTML, CSS and JavaScript files.

Illustrative CDN request flow

```
1. A visitor in Japan requests https://example.com/image.jpg 2. DNS or routing sends the request to a nearby CDN server 3. Cache hit: the CDN serves its stored copy 4. Cache miss: the CDN fetches the file from your origin and stores it 5. Later visitors nearby get the stored copy
```

_02_Checklist

## Common use cases for CDNs

First_1_
Stylesheets and JavaScript files

Next_1_
Library files such as Bootstrap or jQuery

Then_1_
Entire static websites made only of static HTML, CSS and JavaScript files

_03_At a glance

## Benefits of CDN adoption

MDN lists three benefits. A CDN reduces the burden on your own servers by serving static assets. Most CDNs have servers all over the globe, so they may be geographically nearer to your users than your own servers, and MDN says geographical distance affects latency proportionally. And CDNs are already configured with proper cache settings, which saves further configuration for static assets on your own servers.

Benefit

### Reduced origin load

Impact

Fewer requests reach your servers

Benefit

### Geographic proximity

Impact

Content may come from a server nearer the visitor; MDN says distance affects latency proportionally

Benefit

### Preconfigured caching

Impact

Per MDN, CDNs are already configured with proper cache settings

Benefit

### [Page speed](/glossary/page-speed)

Impact

Faster delivery can improve loading metrics such as LCP, but only if delivery was the bottleneck

_04_Check it

## CDN limitations and risks

MDN names three drawbacks. First, third-party dependency: if the CDN goes down, is blocked in a region or is permanently shut down, MDN says your website will malfunction. Second, security: attackers can compromise the CDN and serve malicious content to your users. Third, performance: MDN says a CDN may actually reduce performance, because connecting to a third-party site means more rounds of DNS lookup, content negotiation and so on.

**CDN security risk**MDN names Subresource Integrity (SRI) as a countermeasure for compromised CDNs. With SRI you add an `integrity` hash to the tag, and the browser checks the file it downloads against that hash. SRI requests use [CORS](/glossary/cors), so MDN says to include the `crossorigin` attribute.

MDN also says modern browsers do not share cache between different origins for the same resource, for privacy reasons, so the user has to download the same asset (for example jQuery) multiple times on different websites anyway. Test your own setup rather than assuming a CDN helps.

SRI on a CDN-hosted script

```
<script src="https://cdn.example.com/lib.js" integrity="sha384-REPLACE_WITH_REAL_HASH" crossorigin="anonymous"></script> <!-- Generate the hash from the exact file: --> <!-- cat lib.js | openssl dgst -sha384 -binary | openssl base64 -A -->
```

_05_How it works

## Measuring CDN impact

1. 1

### Record a baseline

Before the change, record LCP and [time to first byte (TTFB)](/glossary/time-to-first-byte) with [PageSpeed Insights](/glossary/pagespeed-insights) or WebPageTest.
2. 2

### Cache static assets

Route images, stylesheets, scripts and fonts through the CDN and set `Cache-Control` headers that match how often each file changes.
3. 3

### Confirm it is caching

Run `curl -sI https://example.com/image.jpg` twice and compare the response headers, such as `cache-control` and `age`. Hit or miss headers differ by provider, so check your provider's docs.
4. 4

### Test from other regions

Run WebPageTest from locations far from your origin, and compare against the baseline.
5. 5

### Watch field data

Check the [Core Web Vitals report](/glossary/core-web-vitals-report) in [Search Console](/glossary/google-search-console) over the following weeks. Google's targets are LCP within 2.5 seconds, INP under 200 milliseconds and CLS under 0.1.
6. 6

### Compare cost

Check your provider's pricing against the improvement you measured.

Sources · 2

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- mozilla.org
- google.com

1. 01 [CDN (MDN glossary)](https://developer.mozilla.org/en-US/docs/Glossary/CDN) developer.mozilla.org · checked 2026-10-24
2. 02 [Understanding Core Web Vitals and Google search results](https://developers.google.com/search/docs/appearance/core-web-vitals) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ Do I need a CDN to have a fast website?

No. A CDN helps most when visitors are far from your origin or you serve many static files. If your audience sits near your server, measure first: MDN notes a CDN can add DNS lookups and overhead that offset the gain.

_02_ What should I put on a CDN?

MDN's examples are stylesheets, JavaScript files and static websites made only of static HTML, CSS and JavaScript. Check your provider's docs before caching pages that differ per user.

_03_ Does a CDN improve SEO?

Google's Core Web Vitals page doesn't mention CDNs. It says good Core Web Vitals, along with other page experience aspects, "aligns with what our core ranking systems seek to reward". If your slow loading came from distance to the origin, a CDN may help those metrics.

## Keep learning

[All glossary](/glossary)

[Learn Gzip compression Performance](/glossary/gzip-compression) [Related Core Web Vitals Performance](/glossary/core-web-vitals) [Read next Image compression Performance](/glossary/image-compression) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Category pages](/glossary/category-pages) [ccTLD](/glossary/cctld) [ChatGPT search](/glossary/chatgpt-search)

More in Performance
[SVG](/glossary/svg) [Synthetic monitoring](/glossary/synthetic-monitoring) [Time to First Byte (TTFB)](/glossary/time-to-first-byte) [Time to Interactive (TTI)](/glossary/time-to-interactive) [Total Blocking Time (TBT)](/glossary/total-blocking-time) [TTL (time to live)](/glossary/ttl) [Viewport meta tag](/glossary/viewport-meta-tag) [WebP](/glossary/webp) [AVIF](/glossary/avif) [bfcache (back/forward cache)](/glossary/bfcache) [Brotli compression](/glossary/brotli-compression) [Cache-Control](/glossary/cache-control) [CDN](/glossary/cdn) [Chrome UX Report (CrUX)](/glossary/chrome-ux-report) [Content Security Policy](/glossary/content-security-policy) [Content-Length (HTTP header)](/glossary/content-length) [Core Web Vitals](/glossary/core-web-vitals) [Core Web Vitals report](/glossary/core-web-vitals-report) [CORS](/glossary/cors) [Critical CSS](/glossary/critical-css) [Critical rendering path](/glossary/critical-rendering-path) [Cumulative Layout Shift (CLS)](/glossary/cumulative-layout-shift) [dns-prefetch](/glossary/dns-prefetch) [Edge caching](/glossary/edge-caching)

Terms on this page
[Page speed](/glossary/page-speed) [CORS](/glossary/cors) [Time to First Byte (TTFB)](/glossary/time-to-first-byte) [PageSpeed Insights](/glossary/pagespeed-insights) [Core Web Vitals report](/glossary/core-web-vitals-report) [Google Search Console](/glossary/google-search-console)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
