Cache-Control HTTP Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

CDN not caching: Cache-Control private / no-cache / Set-Cookie on the response

The response tells shared caches not to store it, so the CDN passes every request to your origin.

Exact message you may see Cache-Control private CDN not cachingCF-Cache-Status: BYPASSX-Cache: MISS from CDN every timeSet-Cookie prevents cachings-maxage not working
Seen on: HTTP Cloudflare

Meaning

Cache-Control: private, no-store, no-cache, max-age=0 or a Set-Cookie header make CDNs bypass the cache (MISS/DYNAMIC/BYPASS). Send public, max-age=..., s-maxage for shared caches, and remove Set-Cookie from cacheable responses.

Common causes

  • Cache-Control: private or no-store
  • Set-Cookie on static content
  • Authorization header present
  • Framework default headers
  • Cache rule not matching the path

⚡ Quick fix

  1. Send Cache-Control: public, max-age=3600, s-maxage=86400
  2. Remove Set-Cookie from static responses
  3. Add an explicit CDN cache rule

Detailed fix by platform

Nginx

  1. location /static/ { add_header Cache-Control "public, max-age=31536000, immutable"; }

How to diagnose

  1. Cache-Control — private/no-store?
  2. Set-Cookie — Present?
  3. CDN status — MISS/BYPASS?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

404 — 404 on JS/CSS assets after a new deploy (HTTP)404520 — Cloudflare Error 520: Web Server Returned an Unknown Error (Cloudflare)520Cache-Control — Back/forward cache blocked by Cache-Control: no-store (stale or reloaded page on Back) (HTTP)Cache-ControlCDN cache — CDN or browser serving stale content after a deploy (HTTP)CDN cachecf-cache-status: DYNAMIC — Cloudflare not caching: cf-cache-status DYNAMIC / BYPASS / MISS every time (Cloudflare)cf-cache-status: DYNA…Cloud CDN — Cloud CDN not caching: cache misses because of Set-Cookie, Cache-Control or missing cache mode (Google Cloud / Firebase)Cloud CDNDomain still resolves to the old IP (DNS propagation/cache) — Networking: DNS changed but the domain still resolves to the old IP — TTL and resolver caching ("propagation") (Networking)Domain still resolves…ETag — Conditional requests always return 200 (ETag/Last-Modified never matches) (HTTP)ETagCache-Con…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.