CDN checker

Which CDN serves this URL, and did the edge answer from cache? We request it twice from a fresh connection and read the headers each time.

CDN cache headers, by provider

CDNIdentifying headerCache status header
Cloudflarecf-raycf-cache-status
Amazon CloudFrontx-amz-cf-id, x-amz-cf-popx-cache
Fastlyx-served-byx-cache
Vercelx-vercel-idx-vercel-cache
Akamaiserver: AkamaiGHostakamai-cache-status
Netlifyx-nf-request-idcache-status
Bunny CDNserver: BunnyCDNcdn-cache

Cache-Status is the standard header defined in RFC 9211; providers are gradually adding it next to their own. The Age header (RFC 9111) tells you how many seconds a cached copy has been sitting at the edge.

Getting HTML cached at the edge

  1. Send a shared-cache lifetime. Cache-Control: public, s-maxage=300, stale-while-revalidate=60 lets a CDN keep the page for five minutes and refresh it in the background.
  2. Don't set cookies on every page view. Most CDNs refuse to cache responses with Set-Cookie.
  3. Keep Vary small. Vary: User-Agent or Cookie splits the cache into thousands of variants that rarely hit.
  4. Turn on HTML caching explicitly where the CDN needs it (for example a Cloudflare cache rule) and purge on deploy.

A cache HIT mostly shows up in the server wait part of time to first byte; the website speed test shows how that carries through to everything after it.

Questions developers ask

How do I know if my website uses a CDN?

Look at the HTTP response headers. CDNs add their own: Cloudflare sends cf-ray and cf-cache-status, CloudFront sends x-amz-cf-id and x-amz-cf-pop, Vercel sends x-vercel-id, Fastly sends x-served-by with cache- node names, Akamai identifies itself in the Server header. This checker requests your page twice and matches those headers against known CDN signatures.

What do HIT, MISS and DYNAMIC mean?

HIT means the edge server answered from its cache without contacting your origin. MISS means it had no copy and fetched one from the origin (the next request may then be a HIT). DYNAMIC (Cloudflare) means the response was treated as uncacheable, which is Cloudflare's default for HTML. BYPASS means a rule, cookie or Cache-Control header told the CDN not to cache.

Why is my HTML a MISS every time?

Usually because the origin sends Cache-Control: private, no-store or no-cache, sets a cookie on every response, or the CDN is configured to cache only static files. Many CDNs (Cloudflare included) do not cache HTML unless you add a cache rule. The Cache-Control row in the report shows what your origin is asking for.

Why does the first request show MISS and the second HIT?

That is a healthy cache: the first request warmed the edge location nearest our test server and the second was served from it. Real visitors in other regions hit other edge locations, which have their own cache.

Does a CDN reduce TTFB?

For cache HITs, a lot: the response comes from a nearby edge server, so server work disappears and the round trip is short. For MISSes the request still goes to your origin, sometimes with an extra hop. Compare the two TTFB numbers in the result to see the difference on your own site.

Which CDNs can be detected?

Cloudflare, Vercel, Amazon CloudFront, Fastly, GitHub Pages, Netlify, Akamai, Azure Front Door, Bunny CDN, KeyCDN, Sucuri, Imperva, Google Cloud and Fly.io, from their documented response headers. A CDN configured to strip its headers cannot be identified this way.