How do I purge my cache?

You have a choice of purging resources individually by file, by Host, by Cache-Tag, or invalidating all resources at once from your cache.

How do I purge everything from the cache?

We strongly recommend using single file purge instead of full cache purge in most situations.

Purging the entire cache means all resources in Cloudflare's cache are immediately invalidated and the subsequent request for each invalidated resource will go back to your origin server(s) in an attempt to revalidate the resource. If the resource can't be revalidated, the resource in Cloudflare's cache will be replaced with the newer version of the resource from your origin. If you have many assets and lots of traffic, those requests could result in a substantial increase in requests to your origin and slow down your website.

To purge everything from cache, visit the caching app in the Cloudflare dashboard.

Under Purge Cache, select 'Purge Everything' from the menu.


How do I purge a single file from the cache?

A single or limited purge leaves the rest of the resources cached so that the requests don’t have to pull content from the origin server. We recommend this option if you don’t want to slow down the site.

Purging a single file from Cloudflare's cache immediately removes that resource from Cloudflare's cache and the subsequent requests for that resource will re-add that resource to the cache with the latest version served from the origin.

Note: Wildcards are not supported with single file purge at this time. So*.js will NOT work. You need to specify the exact, full path to the file, including the or -- those methods are distinct for cache purge purposes.

Same as above, in the caching app under 'Purge Cache', click on 'Purge Individual Files' 

Pro Tip: Single File Cache Purge will not purge objects cached with an Origin header or other custom cache keys. You will need to purge these by sending an appropriate header through an API call.

How do I purge by Cache Tag?

Cloudflare allows Enterprise customers to tag content in the cache and then purge all content with a specific Cache-Tag. See documentation here.

How do I purge by Host?

Cloudflare allows Enterprise customers to purge content related to a Host via our API. This is useful for Managed CNAME/SSL for SAAS customers.  See documentation here.

Clearing the Cache via API

You can also clear the cache through an API call. Review the docs here:

Purge All

Purge Individual

How do I purge via Origin Header?

Cloudflare allows customers to purge content with a specific Origin Header via API.

curl -X DELETE "" 
-H "X-Auth-Email: [email protected]"
-H "X-Auth-Key: a14d124c64d7b5ef329766d71abef81443be5"
-H "Content-Type: application/json"
--data '{"files":[{"url":"","headers":{"Origin":""}}]}'


Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk