What Is a CDN? How It Works and How to Pass the CDN Usage Test
A CDN serves your files from servers near each visitor. See how it works, how we score CDN usage and how to fix a failing result.
Free to use 16 min read Updated Oct 2026
What is a CDN? The quick answer
Quick answer: A CDN, short for content delivery network, is a group of servers spread across the world that keep copies of your files and answer each visitor from the closest one. Pages load faster and your own server does less work. Our report checks how many of your page's files load from a hostname other than the one you tested.
- Pass: 70 percent or more of the images, scripts, stylesheets and other files load from a different hostname than the tested one.
- Warning: 40 to 69 percent shows amber.
- Fail: under 40 percent shows red, and the amber and red rows read the same on screen.
- Fix: put static files on a CDN hostname, then run the report again.
One honest limit: this test measures where files are hosted, not whether a particular CDN brand is in use, and the section on how we test explains what that means for your result.
What does CDN stand for and what is a content delivery network?
CDN stands for content delivery network, and you will also see it written as content distribution network. The CDN meaning in practice is a set of distributed servers, often called an edge network, placed in many regions between your visitors and the origin server, the machine where your site actually lives. Any single machine in that network is a CDN server, and the company that runs it is offering a CDN service. The MDN CDN glossary entry gives the same neutral definition if you want a source that sells nothing.
Think of local warehouses near customers instead of one central factory shipping every order. A CDN mostly delivers static assets such as images, CSS and JavaScript files, web fonts, video streaming and software downloads. With the right setup it can also serve HTML pages and cache API responses.
A CDN is a layer on top of hosting, not a replacement, because something still has to store the original files and run your code.
Key terms in one list
These five words come up in most provider documentation.
- Origin server. This is your real web server or hosting account, the source every copy is made from.
- Edge server. A CDN machine close to visitors that stores copies and answers requests on the origin's behalf.
- Point of presence (PoP). A physical location, usually a data centre, that houses a group of edge servers.
- Cache. The stored copy of a file that an edge server can hand out without asking the origin again.
- Time to live (TTL). How long a cached copy counts as fresh before the edge must check the origin.
How does a CDN work?
The mechanism is simpler than the marketing makes it sound. A request takes a short trip to the nearest edge server instead of a long one to your origin, which cuts the round trip time, and the edge only bothers the origin when it has nothing to give.
- A visitor asks for a file. Their browser requests an image or script from your CDN hostname, for example a logo at cdn.example.com.
- Routing picks a nearby edge. DNS routing, or Anycast routing on the network level, sends the request to an edge server close to the visitor.
- The edge checks its cache. This edge caching step looks for a stored copy that is still within its time to live.
- A hit is answered at once. The edge returns the copy without contacting your server at all.
- A miss goes to the origin. The edge fetches the file once, stores a copy, and answers. The next visitor in that region gets a hit.
Visitor => Edge server (cache) => Origin server
hit: answers here
miss: asks the origin once, then stores a copyCache hit and cache miss
The share of requests answered from cache is the cache hit ratio, and a higher number means less traffic reaching your server. Query strings, cookies and Vary headers can drag it down, because each variation can make the same file look like a different URL to the cache. Personal pages such as a basket or an account screen usually are not cached unless you tell the CDN to, though a CDN can still speed them up through reused origin connections, TLS handled at the edge and HTTP/2 or HTTP/3 to the visitor.
What controls how long a copy lives
The origin tells the edge how long to keep a file through the Cache-Control header, mainly max-age, which sets freshness for every cache, and s-maxage, which overrides it for shared caches such as a CDN edge, plus the older Expires header. Validators such as ETag let the edge ask whether a file changed instead of downloading it again. The CDN's own rules can override all of this, and most dashboards have a purge button for replacing a file at once.
Cache-Control: public, max-age=31536000, immutableA far-future header like the one above is only safe when the file name changes whenever the content does, such as site.4f2a9c.css. Versioned names beat purging because nobody has to remember it. For the deeper caching detail, the web.dev CDN guide is the best primary source.
What is a CDN used for and what are the benefits?
The first benefit is plain physics. A visitor in Sydney requesting a file from a server in Frankfurt waits for every round trip across the planet, and a nearby edge gives you lower latency and a faster page load because images, CSS and scripts arrive sooner. The second is relief for your origin: bandwidth savings and a lower server load, since fewer requests reach your machine, which matters during a traffic spike from a campaign or a mention on a big site.
Many providers add protection and resilience on top. DDoS protection comes first: a flood looks to your origin like thousands of impatient visitors at once, and a network with spare capacity soaks that traffic up at the edge. High availability is the second, because many setups keep handing out cached images, scripts and stylesheets while a struggling origin catches its breath. A web application firewall, bot management, TLS termination, Brotli compression, image resizing and HTTP/3 often come in the same package, so count only the extras you will use.
On the SEO side, a CDN is not a direct ranking factor. It helps through speed, particularly Largest Contentful Paint and time to first byte, and Google has said in its Google Search Central CDN post that its crawlers can use higher crawl rates on sites served through a CDN. Our guide on how hosting speed affects rankings covers the wider picture.
A CDN will not shrink a heavy page, repair slow server code or remove render blocking scripts, so run the page load time check and the web page size check first to learn whether distance is really your problem.
How SEO Site Checker tests CDN usage
Our check is a deliberately simple hostname split. It reads the files your page references, sorts them by the hostname they come from, and reports the share that lives somewhere other than the address you tested. That works well for the most common case, static files moved to a CDN hostname.
The exact rule: CDN percentage is the number of files on a different hostname divided by all counted files, times 100. 70 percent or more passes, 40 up to just under 70 is a warning, and below 40 fails. A page with no counted files scores 0 and fails.
What the check reads
Our crawler opens your URL in headless Chrome, waits for the load event and reads the rendered HTML, so files that scripts add before load are included. It collects the address in nine tag and attribute pairs: img src, script src, link href, iframe src, source src, audio src, video src, embed src and object data. Inline code and files fetched later by JavaScript are not counted.
How the percentage and status are set
Each address is sorted by hostname. The same hostname as the tested page means your own file, while any other hostname counts as a CDN file in our wording. That includes a cdn subdomain of your own site and every third party host. The test does not look for CDN brands, response headers or IP ranges.
What you see in the report
The row shows a status icon and a one line message, with a green tick and the word Congratulations when you pass. The pass message talks about all resources, but the bar is 70 percent, so a green row can still include some files from your own hostname. A badge gives the number of CDN files, and a collapsible list shows up to 20 of those URLs to signed in users, while guests see a prompt to log in. Warning and fail both show the red How to Fix button.
Run it on your own page with the free SEO score checker and compare what you see with the rest of this guide.
What your CDN usage score means in the report
Use the table to translate a score into a next step. Note that the amber state reuses the failure wording, so a warning and a fail read the same on screen even though the numbers behind them differ.
| Score | Status | What it usually means | Next step |
|---|---|---|---|
| 70 to 100 percent | Green | Most static files come from other hostnames, such as a CDN subdomain or a site builder's file host. | Nothing to fix, only confirm the cache headers. |
| 40 to 69 percent | Amber | A mix, often images on a CDN hostname while CSS and JavaScript stay local. | Move the rest, or accept the split. |
| 0 to 39 percent | Red | Files load from the tested hostname. Either there is no CDN, or one sits in front of the main hostname where this test cannot see it. | Check headers first, then add a static hostname. |
| No counted files | Red | A page with no images, scripts or stylesheets scores 0 percent. | Confirm the page really loads files. |
As an illustration rather than a named site, picture a typical WordPress page with about 80 counted files. If only the font stylesheet, a preconnect hint to the font host and the WordPress profile link point at other hostnames, that is three files out of 80, roughly 4 percent, and the row shows red.
Why a site on a real CDN can still fail the CDN usage test
A hostname test behaves this way by design, and knowing it stops you chasing the wrong fix. A site with an excellent CDN can fail and a site with none can pass, because the score tells you where files are hosted, not who delivers them. Judge your setup by response headers and real load speed, and treat the percentage as a prompt to look closer.
A CDN in front of the same hostname
When the CDN works as a reverse proxy, set up through a DNS or name server change, files still load from your own hostname. The visitor gets them from an edge server, but the address in the HTML never changes, so our report sees near 0 percent. Response headers settle the question, and the check steps below show how to read them.
Hostname mismatches and third parties
The tested hostname is exactly what you typed into the form, and redirects are not followed for the comparison. Files on www while you tested the bare domain, or the other way round, count as a different hostname, so a page can pass with no CDN at all. Third party hosts also raise the number without helping speed, whether a font host, an analytics script, an embed, an ad tag or a public library link such as Bootstrap loaded from jsDelivr or cdnjs.
Paths and tags the counter misreads
A relative path with no leading slash, such as images/logo.png, and a data: URI both turn into odd hostnames and count as CDN files. A lazy load placeholder kept in src can therefore raise the number too, as test markup confirmed. Every link tag counts whatever its rel value, so a profile link or a preconnect hint to another host adds to the CDN side. Files listed in srcset and files requested from inside CSS are not inspected at all.
How to check whether your website uses a CDN
Work through these five steps in order. The first four tell you more than any single score, and the report comes last.
- Open browser DevTools. Go to the Network tab and reload the page. Chrome hides the Domain column by default, so right-click the column header row and tick Domain, then read it to see which hostnames serve your files.
- Read the response headers. Run
curl -Iagainst a static file URL and look for cache or edge headers such as age, via, x-cache or cf-cache-status. Names vary by provider, and a missing header proves nothing. Run it twice, because the first request is often a miss, and if the headers look empty trycurl -sD- -o /dev/null URL, which sends a normal GET instead of a HEAD request. - Look up DNS. Check the CNAME and name servers of your hostname and of any cdn subdomain with our DNS record lookup. A CNAME that points at a provider's hostname is a strong sign.
- Check the hosting details. The hosting checker shows the provider and IP address, and an IP owned by a CDN network points to a proxy in front of the site.
- Run the free report. Compare its score with what you found. If the headers show a CDN but the score is low, go back to the section on false results.
curl -I https://www.example.com/images/logo.png
HTTP/2 200
age: 1873
x-cache: HITThat output only illustrates header names. Your provider may use different ones.
How to use a CDN on your website and pass the test
Choose a pattern first, because the three common ones score differently. A separate hostname for static files passes this test, a CDN in front of the whole site reads near 0 percent, and a plugin or platform feature sits somewhere between the two.
Option 1: a separate CDN hostname for static files
This is the route that moves the score. Your site stays where it is, and images, CSS and scripts come from a hostname the CDN controls.
- List the heavy files. Open the Network tab, sort by Size and note the largest files and the hostname each one comes from. Images, video, fonts, stylesheets and scripts give you the biggest gain.
- Add your site to the provider. Set your current server as the origin.
- Create the hostname. Add a CNAME record for cdn.example.com, with your own domain in place of example.com, that points to the target the provider gives you.
- Switch on HTTPS. The new hostname needs a valid certificate before you use it, and most providers issue one automatically once the CNAME resolves.
- Rewrite the file URLs. Change them in your templates or plugin settings to the new hostname. If your fonts move too, enable the CORS header for them, as described below.
- Set caching and version file names. Add a long Cache-Control on versioned files.
- Purge and test. Clear old copies, then reload with Disable cache ticked in DevTools and confirm the changed URLs now show the cdn hostname in the Domain column before you run the report again.
<!-- before -->
<link rel="stylesheet" href="/css/site.css">
<script src="/js/app.js"></script>
<!-- after -->
<link rel="stylesheet" href="https://cdn.example.com/css/site.css">
<script src="https://cdn.example.com/js/app.js"></script>cdn.example.com. 3600 IN CNAME your-site.provider-edge.example.One cross-origin catch deserves a warning. Browsers fetch web fonts in CORS mode, so a font served from cdn.example.com only loads when the response carries an Access-Control-Allow-Origin header that allows your site. Without it the text quietly falls back to a system font and the console shows a CORS error. Most CDNs have a one-click setting for it, and a preload link for such a font needs the crossorigin attribute. Module scripts follow the same rule.
Access-Control-Allow-Origin: https://www.example.comAlways use https URLs for the new hostname, otherwise browsers flag the page for mixed content. Our mixed content check will catch any file you missed.
Option 2: a CDN in front of the whole site
Here you change name servers or route the domain through the provider's proxy. It gives the strongest protection and the widest reach, and you confirm it with headers because the file addresses keep your hostname.
There is a real trade-off against Option 1: a separate static hostname costs the browser an extra DNS lookup and connection, while a CDN backing your main hostname keeps everything on one connection. So the best setup for real speed may be the one this report cannot see.
Option 3: a plugin or platform feature
On WordPress, look for the CDN or file URL rewrite setting in your caching plugin or host dashboard. These rewrites often cover only images and media library files, so scripts and stylesheets can stay on your own hostname. After switching it on, view the page source and count how many src and href values changed, because images alone may leave the row amber or red. Shopify, Wix and Squarespace usually serve files from their own file hostnames already, so check the report first. On plain HTML you edit the src and href values yourself.
Warning: do not move a file to a random third party host just to turn the row green. Speed is the goal, and the row is only a signal.
Set browser cache headers properly too, as our image caching check explains. Shrink images with the free image compressor before they go onto the CDN, since images make up most of the traffic.
Do I need a CDN? CDN vs web hosting
Hosting is the foundation and a CDN adds to it, never replaces it.
| Question | CDN | Web hosting |
|---|---|---|
| What it does | Delivers cached copies from nearby servers | Stores the site and runs its code |
| Where files live | Copies at many edge locations | The original on your origin server |
| Main job | Speed, load relief and protection | Running the site and its database |
| Can you run a site with only this? | No, it needs an origin | Yes, many sites do |
Visitors from several regions, pages heavy with images or video, large downloads, bursty traffic and an online shop with a global audience all make a CDN worth having. If your visitors are mostly in one city and the host is fast, you gain less for the setup work.
The simplest rule is to measure load time first and add a CDN if distance or load turns out to be the cause.
How to choose a CDN provider
- Coverage near your visitors. Compare the provider's locations with the countries in your analytics.
- Modern protocols and certificates. Look for HTTP/2 or HTTP/3 support and automatic certificates for a custom hostname such as cdn.example.com.
- Cache controls. You want custom rules, easy purging, header support and sensible query string handling.
- Extras you will use. Image optimization, compression, firewall and bot rules, and logs only matter if you need them.
- Cost as traffic grows. Check what your host or CMS already includes before paying for another service.
Widely used providers include Cloudflare, Amazon CloudFront, Fastly, Akamai and Google Cloud CDN, listed as examples, not a ranking.
How to Fix
The short version, the same steps you see when you click How to Fix in your report.
Why this fails: fewer than 70 percent of the images, scripts, stylesheets and other files in your rendered page load from a hostname different from the one tested. Our report sorts every file in img, script, link, iframe, source, audio, video, embed and object tags by hostname. A CDN placed in front of your main hostname is not detected, and www counts as a different hostname from the bare domain.
How to fix it:
- Pick a route: a CDN hostname for static files, a plugin or host setting that rewrites file URLs, or a platform that already hosts files separately.
- Add your site to a CDN provider and set your current server as the origin.
- Create a hostname such as cdn.example.com (your own domain replaces example.com) with a CNAME record to the target the provider gives you, and switch on HTTPS for it.
- Change the file URLs in your theme or templates to the new https hostname, and if your fonts move too, enable the CORS header for them in the CDN settings. Set a long Cache-Control on versioned files, then clear your caches and publish.
Examples of the three pieces:
<link rel="stylesheet" href="https://cdn.example.com/css/site.css">
<script src="https://cdn.example.com/js/app.js"></script>cdn.example.com. 3600 IN CNAME your-site.provider-edge.example.Cache-Control: public, max-age=31536000, immutable- WordPress: use the CDN or file URL rewrite setting in your caching plugin or host dashboard.
- Shopify, Wix and Squarespace: files usually come from their own file hostnames already, so check the report first.
- Plain HTML: edit the src and href values yourself.
Re-test: view the page source and confirm most src and href values start with a different hostname. Run curl -I on one file and look for cache or age headers. If curl already shows them on your main hostname, you may already have a CDN in front of the site and the row simply cannot see it. Then run our free report again and look for a green tick on the CDN Usage row.
Frequently Asked Questions
What does CDN stand for?
What is a CDN used for?
What is a CDN link?
Is a CDN the same as web hosting?
Do I need a CDN for my website?
Does a CDN help SEO?
How much does a CDN cost?
How do I know if my website already uses a CDN?
See how your site scores right now
Paste your address into the free report, then use the How to Fix button on anything that needs work.
Free to use. Results in under a minute for most sites.