Prompt
Why are requests still hitting my origin instead of the edge?
Latest observation
There are a few common reasons requests still reach your origin even when you expect them to be served at the edge:
1) The request is not cacheable
If the response has headers like:
Cache-Control: no-storeCache-Control: privateCache-Control: max-age=0Set-Cookieon some platforms/configsAuthorizationheaders in the request
the CDN/edge may bypass caching and forward to origin.
2) The edge cache is missing or expired
The first request is often a cache miss, so the edge must fetch from origin. Also, if TTL is short or content is purged frequently, you’ll see repeated origin hits.
3) Your caching rules aren’t matching the request
Common causes:
- Wrong path pattern
- Query strings changing the cache key
- Hostname mismatch
- Different HTTP method than expected (e.g.
POST,PUTusually bypass cache)
4) Dynamic content is intentionally bypassing cache
Some setups always send:
- authenticated pages
- personalized content
- API routes
- HTML without explicit caching headers
straight to origin.
5) Edge functions / middleware are proxying
If you’re using Workers, Functions, Lambda@Edge, middleware, or rewrites, the request may still be forwarded to origin unless you explicitly return a response at the edge.
6) Cache key variations
If headers like these vary between requests, the CDN may treat them as different objects:
CookieAccept-EncodingUser-Agent- custom vary headers
7) Origin shielding or revalidation
Some setups still contact origin to:
- revalidate stale content (
304 Not Modified) - refresh metadata
- use an origin shield layer before the edge cache
8) You’re looking at internal platform traffic
Sometimes logs show origin fetches even though the client never directly hit origin. That’s normal for cache fill or revalidation.
What to check first
-
Response headers Look for
cache-control,age,x-cache,cf-cache-status,x-served-by, etc. -
Request headers Check for
authorization,cookie, or non-GET/HEAD methods. -
Cache key / rules Verify your edge caching rule actually applies to that URL.
-
Platform logs See whether it’s a MISS, BYPASS, EXPIRED, or REVALIDATED.
If you want, paste:
- the request headers
- the response headers
- your CDN/edge platform name
and I can help pinpoint the exact reason.