Cloudflare caching becomes an SEO problem when the edge serves a different status, header set, redirect, canonical, robots rule, or page body than the origin owner intended. Treat cache configuration as a response-control system: document eligibility, cache keys, rule order, TTLs, bypasses, and purge methods, then verify the final response from more than one location.
- Cloudflare does not cache ordinary HTML by default, but Cache Rules can make HTML eligible.
- `robots.txt` is cached by default, so a stale or mistaken rule can persist until revalidation or purge.
- Custom cache keys can make a dashboard single-file purge incomplete when required headers, cookies, or query components are missing.
- Rule order matters, and a later matching cache rule can override an earlier conflicting setting.
01
Definition
A CDN cache stores a response near users and reuses it for later matching requests. The cache does not merely store a file. It stores a response under a cache key, subject to eligibility rules, time-to-live settings, revalidation behavior, and purge controls.
For SEO, the consequential object is the response a crawler receives:
- HTTP status
LocationheaderContent-Type- robots directives
- canonical markup
- page body
- structured data
- language and device variants
Cloudflare documents that its default CDN behavior does not cache HTML or JSON based solely on extension, while common static assets are cached. It also documents that robots.txt is cached by default. Default cache behavior[1]
02
Mechanism
Cache eligibility decides whether the response may be stored A site can use Cache Rules to make HTML eligible, bypass caching for selected paths or cookies, change edge TTL, or customize the cache key. Cloudflare’s “Cache Everything” example explicitly warns that caching all HTML can expose dynamic information to unintended visitors unless matching conditions exclude sensitive content. Cache Everything[2]
Search-visible failure modes include:
- A temporary
noindexpage cached after a deployment - An old canonical tag served after a migration
- A maintenance page cached with
200 OK - A redirect cached after the destination changed
- A logged-in or geographic variant served under a shared key
- A stale
robots.txtthat blocks resources or routes
The cache key decides which requests share an entry The default cache key is more than the visible URL in some situations. Custom keys can include or exclude query strings, headers, cookies, device properties, or other request attributes.
A key that ignores meaningful differences can collapse distinct pages into one cached response. A key that includes too many differences can fragment the cache and make purging harder.
Cloudflare warns that dashboard single-file purge may not work for custom cache keys that depend on headers or cookies because the dashboard cannot send those values. Purge by host, prefix, tag, or everything can clear entries without reproducing the entire key. Cache Rules[3]
Rule order decides which setting wins Cloudflare Cache Rules are stackable. If several matching rules configure the same setting, the last matching rule wins. Cache Rules also take precedence over Page Rules for caching when both apply. Order and priority[4]
This creates a common debugging trap: the rule visible beside the affected path may not be the final rule controlling it. Broad later rules can override narrow earlier bypasses.
Purging decides when the old response stops being reusable A deployment changes the origin. It does not necessarily invalidate every edge entry that can answer for the URL.
Cloudflare recommends targeted purging where possible. A purge-everything operation clears cached resources across data centers, but it can sharply increase origin traffic as entries are repopulated. Purge everything[5]
For search-sensitive changes, the purge method must match the cache-key design. Purging only the visible URL is not enough if alternate host, query, header, or cookie variants remain cached.
03
Examples
| Situation | Search-visible risk | Verification |
|---|---|---|
| HTML cached during maintenance | Crawlers receive a temporary page as 200 OK | Compare edge and origin status, body hash, canonical, and robots directives |
robots.txt changed | Old allow/disallow rules persist | Request from multiple locations, inspect Age and cache-status headers, then purge and retest |
| Redirect target updated | Edge continues sending the former Location | Request with redirects disabled and record every hop |
| Cache key ignores query string | Filtered or canonical page body is served for another URL | Compare body hashes and canonical markup across parameter combinations |
| Cache key includes cookie | Single-file purge misses variants | Purge by prefix, host, tag, or a fully specified API request |
| Broad rule follows narrow bypass | Sensitive route becomes cacheable | Use Cloudflare Trace and inspect final matching-rule order |
A practical response capture should record:
requested URL
resolved IP or edge location
status code
Location header
Cache-Control
Age
CF-Cache-Status
Vary
canonical URL
robots meta or X-Robots-Tag
body hashCached redirects deserve separate attention Redirects terminate a request before the final page body is reached. If the edge and origin disagree about scheme, host, slash policy, or path normalization, crawlers can encounter chains or loops. Cache debugging should therefore begin with redirects disabled in the client so each hop remains visible.
robots.txt should be treated as deployable configuration Because Cloudflare caches robots.txt by default, publish and rollback procedures should test it like application code. A syntactically valid file can still be operationally wrong, and a corrected origin file does not prove that every edge location has stopped serving the old version.
04
Boundaries
A CF-Cache-Status: HIT header does not prove that a response is wrong, and a MISS does not prove that the origin is correct. The important question is whether the response matches the intended state for that request.
Cloudflare’s public documentation describes product behavior, not the complete configuration of a particular zone. Workers, Snippets, redirect products, origin applications, browser caches, service workers, and upstream CDNs can all modify or reuse responses.
The completion standard for an SEO-sensitive cache change is therefore evidence from the public route: correct status, headers, canonical, robots directives, body, and redirect behavior after deployment and from multiple request contexts.
References
Sources behind this record
- Default Cache Behavior — Cloudflare (accessed August 2, 2026)
- Cache Level: Cache Everything — Cloudflare (accessed August 2, 2026)
- Cache Rules — Cloudflare (accessed August 2, 2026)
- Order and priority — Cloudflare (accessed August 2, 2026)
- Purge everything — Cloudflare (accessed August 2, 2026)
Corrections
Correction history
No corrections recorded.
To report an error, use the public corrections path.
This article covers publicly documented Cloudflare cache behavior. Account plans, rulesets, Workers code, origin headers, and third-party applications can change the actual result on a specific zone.