Advertising disclosure: We may earn a commission from links on this site. Commercial relationships can affect placement. Product facts, limitations, and source dates remain part of our editorial record.

How funding works
Web Hosting

Cloudflare Default Cache Behavior: A Guide for Website Owners

Learn how Cloudflare decides what to cache, which responses stay at the origin, default TTLs, and how to refresh or change cached content.

Review sources
Research standard

Facts that can change should include a source and check date. Benchmark claims should state the plan, region, method, and test period.

Cloudflare’s Default Cache Behavior determines whether Cloudflare can serve a stored copy from its network or must request the content from your origin server. Cloudflare generally follows cache headers from the origin unless an Edge Cache TTL rule overrides them. By default, HTML and JSON are not cached, while many static assets can be cached when the other conditions allow it.

What Cloudflare does not cache by default#

Cloudflare documents that it does not cache a response when any of these conditions applies:

  • The Cache-Control header is private, no-store, no-cache, or max-age=0.
  • The response includes a Set-Cookie header.
  • The request method is anything other than GET.

These rules make the origin’s response headers important for private, personalized, or otherwise short-lived content. Website owners should mark such responses appropriately at the origin.

What Cloudflare can cache#

Cloudflare caches responses marked public with a positive max-age, or responses with a future Expires date. If both max-age and Expires are present, max-age takes precedence.

Cloudflare’s default decision is based on the file extension rather than the MIME type. Commonly cached extensions include those used for images, stylesheets, scripts, fonts, and PDFs. Cloudflare also caches robots.txt by default. HTML and JSON are not cached by default.

Default edge TTLs without cache headers#

When a response has neither cache-control headers nor expiration headers, Cloudflare documents these default edge time-to-live values:

Data table from this page
Status codeDefault edge TTL
200, 206, 301120 minutes
302, 30320 minutes
404, 4103 minutes
Other status codesNot cached by default

These are Cloudflare’s documented defaults for its edge cache. They do not mean that every URL on a site is currently cached, because response headers, request methods, and configured rules can change the result.

What to do when the default is not right#

If a response must remain private or personalized, configure the origin to send an appropriate Cache-Control header. If you need Cloudflare to cache content that is not cached by default, or need different cache behavior, use Cloudflare Cache Rules or another documented configuration option.

When content changes and Cloudflare is still serving an older stored copy, Cloudflare documents that you can purge specific files or purge the entire cache. Purging makes Cloudflare fetch fresh versions; it does not by itself change the rules that determine whether later responses can be cached.

Sources

  1. Cloudflare: Default Cache Behavior Checked 2026-09-28
  2. Cloudflare cache documentation Checked 2026-09-28