Cloudflare Integration

Auto-Purge Cache
On Every Deploy

Automatically clear your Cloudflare cache after every deployment. Purge everything or just the files that changed — your visitors always see the latest version.

Last updated on 22nd February 2026

Visitors See Stale Content After Deploys

You deploy new code but visitors still see the old version because Cloudflare is serving cached assets.

Deploy New code live CDN still serves old files Visitors see stale content Manual cache purge needed Easy to forget Visitors See old version Stale cache breaks the deployment

Deploying new code without clearing the CDN cache means visitors continue to see the old version of your site.

Cache Cleared Automatically After Every Deploy

DeployHQ purges your Cloudflare cache automatically. Choose to clear everything or just updated files.

Deploy New code shipped DeployHQ Deploy + Purge Cloudflare Cache Website Fresh! ✓ Cache purged automatically Automatic!

How It Works

Connect Cloudflare to DeployHQ in minutes.

1
Key icon

Get Your API Key

Obtain the Global API Key from your Cloudflare dashboard.

2
Link icon

Configure Zone

Add the API key, Zone ID, and asset URL prefix to your DeployHQ project.

3
Check icon

Deploy and Purge

Every deployment automatically clears your Cloudflare cache. Visitors see fresh content immediately.

Why Use the Cloudflare Integration

Never serve stale content again after a deployment.

Zap icon

Automatic Cache Purge

Your Cloudflare cache is cleared with every deployment. No manual steps, no forgotten purges.

Cloud icon

Full or Selective Purge

Choose to purge your entire cache or only the files that changed in the deployment.

Shield icon

R2 Support

Also supports Cloudflare R2 as a deployment target. Publish assets directly to R2 buckets.

Check icon

Quick Setup

Just add your API key and Zone ID. Up and running in under five minutes.

Getting Started

Auto-purge Cloudflare in minutes

Check mark

Get Your Cloudflare API Key

Obtain the Global API Key from your Cloudflare dashboard account settings.

Check mark

Configure the Integration

Add the API key, your Zone ID, and the asset URL prefix to your DeployHQ project.

Check mark

Deploy Fresh Content

Every deployment clears the cache automatically. Visitors always see your latest changes.

Read the documentation →
CLOUDFLARE CACHE PURGE FLOW deploy Files deployed to server Done Purging Cloudflare cache... cache 47 files purged successfully ✓ Visitors see fresh content

Frequently Asked Questions

How does DeployHQ purge my Cloudflare cache after a deployment?

DeployHQ connects to your Cloudflare account using your Global API Key and Zone ID. After each deployment, DeployHQ automatically sends a purge request to Cloudflare to clear cached content. You can choose to purge all files or only the files that changed in the deployment.

What is the difference between purging all cache and selective purge?

With full purge, DeployHQ clears your entire Cloudflare cache after every deployment, ensuring all content is fresh. Selective purge only clears the specific files that were modified in the deployment, reducing cache overhead. Choose full purge for simplicity or selective purge for performance optimization.

How long does it take to set up the Cloudflare integration with DeployHQ?

Setup takes approximately 5 minutes. You only need to provide your Cloudflare Global API Key, Zone ID, and optionally an asset URL prefix in your DeployHQ project settings. Once configured, cache purging happens automatically with every deployment—no manual steps required.

Ready to auto-purge your Cloudflare cache?

Connect Cloudflare to DeployHQ and ensure visitors always see your latest content.

10-day free trial • No setup fees • Cancel anytime

Get started today for just $9/month

That's unlimited deployments and 3 projects.

Start your free 10 day trial