CDN integrations

Connect Cloudflare, Bunny, Fastly, or KeyCDN to purge URLs and immediately rewarm them.

8 min read

Purging a CDN is easy. The problem is what happens next: a purge guarantees the following visitor hits a cold cache and waits while the page rebuilds. You have traded stale content for slow content.

Purge → rewarm fixes that. Cache Rocket clears the URLs at your CDN and immediately warms them again, so the cache is refreshed rather than merely emptied.

Not the same as Managed CDN

CDN Integrations purge and rewarm URLs at your CDN. Managed CDN serves Cache Rocket-optimized assets on assets.cacherocket.com. Most teams use Managed CDN for Media jobs and CDN Integrations for editorial or release purges.

Configure this under Account → CDN.

Supported providers

ProviderWhat you need
CloudflareAn API token with cache-purge permission, and your Zone ID.
BunnyAn API key and your Pull Zone ID.
FastlyAn API token and your Service ID.
KeyCDNAn API key and your Zone ID.

Adding an integration

  1. 1

    Create a scoped token at your CDN

    Give it only cache-purge permission for the zone you need. Do not use a global account key.

  2. 2

    Find your zone or service ID

    Cloudflare shows the Zone ID on the domain overview page; Bunny uses a Pull Zone ID; Fastly a Service ID; KeyCDN a Zone ID.

  3. 3

    Add it in Cache Rocket

    On Account → CDN, choose the provider, give the integration a name, and paste the token and zone identifier.

  4. 4

    Save

    The integration appears in your list and is available to purge actions.

Use a least-privilege token

A cache-purge-only token limits the damage if it is ever exposed. Never paste a global API key that can modify DNS or account settings.

Running a purge and rewarm

  1. 1

    Open the purge → rewarm panel

    On Account → CDN, below your integrations.

  2. 2

    Paste the URLs to refresh

    One per line, as full URLs. Be specific — list the pages that actually changed.

  3. 3

    Choose the integration

    Pick one explicitly, or use the latest active integration.

  4. 4

    Run it

    Click Purge & rewarm. Cache Rocket reports how many URLs were purged and how many were warmed.

Good to know

Check that the warmed count matches the purged count. A gap means some URLs failed to warm — usually a redirect, an error response, or an unverified hostname.

When to use it

SituationWhat to purge
You corrected a published articleThe article URL, plus any index or category page that shows an excerpt.
A price or stock level changedThe product page, plus the category pages listing it.
You deployed a template changeThe affected page types. Consider a deploy trigger instead for full releases.
A homepage banner was swappedJust the homepage. Precision keeps the cold window tiny.

Avoid purging everything

A full-zone purge empties every cached page at once and sends all subsequent traffic to your origin simultaneously — a self-inflicted traffic spike at the worst moment. Purge specific URLs whenever you can.

How this differs from deploy triggers

CDN purge → rewarmDeploy trigger
Clears the CDN cacheYesNo
Starts warmingYes, for the listed URLsYes, for matching warmers
Best forSpecific content that changedA whole release going live
Triggered byYou, in the dashboardYour CI or hosting platform, automatically

They complement each other. Many teams use deploy triggers for releases and purge → rewarm for editorial corrections. See Deploy triggers.

Common problems

The purge is rejected or unauthorized.
The token lacks purge permission, has expired, or is paired with the wrong zone ID. Recreate a scoped purge token and confirm the zone identifier belongs to the same account.
URLs purged but zero warmed.
The URLs are probably on a hostname that is not verified, or they redirect. Confirm verification and use the exact final URL.
Content is still stale after purging.
Another cache layer is holding it — a page cache on your origin, or your browser. Test in a private window, and purge the origin-side cache too if you run one.
Can I rewarm without purging?
Yes. Ordinary warmers and deploy triggers warm without invalidating anything. Purging is only needed when the cached content is genuinely out of date.
My CDN is not in the list.
Purge integration is limited to the four supported providers. Warming itself works with any CDN — you simply purge through your provider's own tooling and let the warmer refill.
Do I need this if I only use Managed CDN?
No. Managed CDN does not require Cloudflare/Bunny/Fastly/KeyCDN credentials. Add an integration only when you want Cache Rocket to purge your existing CDN and rewarm those URLs.