Cloudflare caching-how it works and how to clear it
Cloudflare caches static assets and pages to speed up your site. Learn how the cache works, how to purge it after updates, and how to control what gets cached.
On this page
Cloudflare's CDN caches copies of your site's static assets on its global network. When a visitor requests a cached file, Cloudflare serves it directly-your server never receives the request. This speeds up delivery and reduces your server's bandwidth usage.
What Cloudflare caches by default
By default, Cloudflare caches static files based on file extension:
- Images: .jpg, .jpeg, .png, .gif, .webp, .svg
- CSS and JavaScript: .css, .js
- Fonts: .woff, .woff2, .ttf
- Documents: .pdf
HTML pages are not cached by default on the free plan-only static assets. Your server generates the HTML for each request. To cache HTML, use a Cache Rule (formerly Page Rule) with "Cache Everything".
Purge the cache
After deploying updates to your site (new images, CSS, JS), purge the Cloudflare cache so visitors get the new version:
- Log in to dash.cloudflare.com
- Select your domain
- Go to Caching → Configuration
- Click Purge Everything (clears all cached files) or Custom Purge (clear specific URLs)
If you update your site's CSS or JS but don't purge the cache, some visitors may see the old styling until cached files expire. Make cache purging part of your deployment workflow.
Cache level settings
| Level | Behavior |
|---|---|
| Bypass | Cloudflare never caches-passes all requests to your server |
| No Query String | Caches files only when there's no query string (e.g., ?v=123 bypasses cache) |
| Ignore Query String | Caches regardless of query strings-same file served for all parameter variations |
| Standard (default) | Caches based on the full URL including query string |
Development mode
Development mode temporarily bypasses all Cloudflare caching for 3 hours-useful when making rapid changes and you want to see results immediately. Enable it at Caching → Configuration → Development Mode. Remember to disable it when done, or it expires automatically after 3 hours.
Bypass cache for WordPress admin
WordPress admin pages should never be cached. Create a Cache Rule to bypass the cache for the admin area. Go to Rules → Cache Rules → Create Rule:
- If: URL path contains
/wp-adminOR URL path contains/wp-login.php - Then: Cache eligibility = Bypass cache
Need cache troubleshooting?
Our team can help you manage caching and clear cache when updates aren't showing.





















