ChangeChecklist
For businesses

Switch CDN providers

A CDN does more than cache: redirects, headers, firewall rules, certificates and edge code all live there. Rebuild them at the new provider, test, then switch DNS without surprises.

Official sources last reviewed . How we review

Build your personalized plan

A few questions, revealed as they become relevant. Your answers stay in this browser.

Changing: CDNStep 1 of 4. 0 of 6 questions answered Answers stay in this browser

Start with the basics

Where are you?

Some items depend on local rules, like government sign-in or mail forwarding. Pick where you live or where the change applies.

We never ask for phone numbers, card numbers, passwords or codes. Names of providers or nicknames are enough.

Your plan so far

9things this change touches

  • critical3
  • high4
  • moderate2
  • low0

Updates as you answer. Every item will explain why it's there.

What could break

In a typical cdn plan, these are the most serious things to get right.

  • Firewall, bot and rate-limiting rules

    Critical, Website & DNS

    Either attacks and bots get through, or real users, payment webhooks and monitoring are blocked by new default rules.

  • TLS certificates for each hostname

    Critical, Website & DNS

    Visitors see certificate errors at the switch until validation completes.

  • Origin protection for the new CDN

    Critical, Website & DNS

    The new CDN gets errors from your origin, or you open the origin to everyone and bypass the firewall.

  • Test through the new CDN before switching

    Critical, Website & DNS

    Differences in caching, redirects or firewall behaviour only show up once everyone has moved.

  • Point DNS at the new CDN

    Critical, Website & DNS

    Hostnames you forget stay on the old CDN until it's switched off, then fail.

  • Export the current CDN configuration

    High, Website & DNS

    Rules you didn't know existed disappear at the switch, from redirects to bot protection.

  • Recreate cache rules and cache keys

    High, Website & DNS

    Too little caching overloads your origin; too much can serve one visitor's personal page or cart to another.

  • Edge redirects and rewrites

    High, Website & DNS

    Old links, campaign URLs and QR codes return 404s after the switch.

  • Edge functions and workers

    High, Integrations & APIs

    Auth checks, A/B tests, header logic or whole routes stop working.

  • Security headers, CORS and HSTS at the edge

    High, Website & DNS

    Headers silently disappear, weakening security or breaking cross-origin requests from your apps.

Before and after the change

Before you change it

  • Export the current CDN configurationMust do
  • Firewall, bot and rate-limiting rulesMust do
  • Recreate cache rules and cache keysMust do
  • Edge redirects and rewritesMust do
  • Edge functions and workersMust do
  • Security headers, CORS and HSTS at the edgeMust do
  • TLS certificates for each hostnameMust do
  • Origin protection for the new CDNMust do
  • Root domain (apex) supportMust do
  • Test through the new CDN before switchingMust do

After the change

  • Point DNS at the new CDNMust do
  • Expect a cold cache and an origin spike
  • Cache purges and API keys in CI/CDMust do
  • Watch errors, cache hit ratio and costs
  • Remove the old CDN safelyMust do

Your own plan adds or removes items based on your answers, and explains why each one is there.

The safe order

Doing things in the right sequence is what keeps you from getting locked out halfway through.

  1. Before the change

    Step 1: Export the current configuration

    Document every rule and setting, check contract terms, and move DNS first if the CDN hosts it.

    • Export the current CDN configuration (high risk)
  2. Step 2: Rebuild rules and features at the new CDN

    Recreate caching, redirects, headers, firewall rules and edge code.

    • Firewall, bot and rate-limiting rules (critical risk)
    • Recreate cache rules and cache keys (high risk)
    • Edge redirects and rewrites (high risk)
    • Edge functions and workers (high risk)
    • and 1 more
  3. Step 3: Set up certificates and origin access

    Validate certificates and let the new CDN through your origin's defences.

    • TLS certificates for each hostname (critical risk)
    • Origin protection for the new CDN (critical risk)
    • Root domain (apex) support (high risk)
  4. Step 4: Test through the new CDN before switching

    Compare responses from both CDNs using your real hostnames.

    • Test through the new CDN before switching (critical risk)
  5. During the change

    Step 5: Switch traffic

    Move hostnames to the new CDN, starting small, and watch origin load.

    • Point DNS at the new CDN (critical risk)
    • Expect a cold cache and an origin spike (moderate risk)
  6. Step 6: Update purges and API keys in CI/CD

    Point deploy pipelines at the new CDN.

    • Cache purges and API keys in CI/CD (high risk)
  7. Immediately after

    Step 7: Watch the first week

    Track errors, cache hit ratio and costs.

    • Watch errors, cache hit ratio and costs (moderate risk)
  8. Clean up

    Step 8: Remove the old CDN safely

    Revoke its access to your origin, delete hostnames, then cancel.

    • Remove the old CDN safely (high risk)

Back up and export first

Save these before you change anything, while the old setup still works.

  • Export the current CDN configurationMust do

    Export the configuration through the API or Terraform where possible, and document every cache rule, redirect, header change, firewall rule, function and TLS setting for each hostname.

How to check it worked

Checks for the most serious items, to do after each step rather than at the very end.

  • Export the current CDN configurationMust do

    Every hostname on the old CDN has a documented list of rules and settings.

  • Firewall, bot and rate-limiting rulesMust do

    Review the new CDN's firewall events for blocked legitimate requests before switching rules to block mode.

  • Recreate cache rules and cache keysMust do

    A signed-in page through the new CDN shows a cache MISS or BYPASS header, and a static asset shows a HIT on the second request.

  • Edge redirects and rewritesMust do

    Run your list of redirect URLs through `curl -sI` against the new CDN and compare status and Location headers with the old one.

  • Edge functions and workersMust do

    Send the same requests through the old and new CDNs and compare responses for each route the code handles.

  • Security headers, CORS and HSTS at the edgeMust do

    `curl -sI https://www.example.com` through the old and new CDNs shows the same security headers.

Leave these until last

These steps are hard to undo: cancelling, closing or removing the old setup. Do them only after the checks above pass, so the old setup is still there if something goes wrong.

  • Remove the old CDN safelyMust do

    After an overlap, remove the old CDN's origin allowlist entries and API tokens, delete your hostnames from the old account, then cancel in line with its notice period.

Why this change needs a plan

A CDN sits between visitors and your servers and often does far more than caching: redirects, security headers, firewall and bot rules, certificates, image resizing and edge code. Switching means rebuilding all of that at the new provider before traffic moves.

What could break: a missing redirect or header, a firewall rule that blocks real users or webhooks, an origin that refuses the new CDN, private pages cached by mistake, and a deploy pipeline that still purges the old cache.

Why it matters

Your CDN is on the path of every request. Small configuration differences can expose private content, block customers or take the site down under load.

What makes it risky

Risk is highest when the CDN is also your DNS provider, when the origin only accepts the CDN's traffic, and when you rely on firewall rules, signed URLs or edge code.

Common mistakes

  • Caching personalised pages because bypass rules for signed-in users weren't recreated.
  • Forgetting edge redirects and security headers that only existed in the old CDN's settings.
  • Leaving the origin firewall locked to the old CDN's IP ranges.
  • Leaving CI/CD purging the old CDN's cache after deploys.
  • Cancelling the old CDN while it's still your DNS provider.

Frequently asked questions

Will switching CDNs cause downtime?

Not if certificates are validated, the origin accepts the new CDN and you've tested with real hostnames before switching DNS. Lower TTLs a day ahead and move hostnames one at a time so any problem is small and quick to reverse.

Do I need to change DNS to switch CDNs?

Yes. With a CNAME setup you update each hostname's record to the new CDN. If the old CDN is also your DNS provider, you'll need to move DNS to another provider first.

Will my cache be empty after switching?

Yes, the new CDN starts cold, so your origin takes more load at first. Switch at a quiet time, scale the origin if needed, and use the new CDN's origin shield or tiered caching if it offers one.

What happens to my firewall and bot rules?

They don't transfer. Recreate custom rules, run new managed rules in log mode first, and allowlist monitoring, payment webhooks and partners before switching to block mode.

Can I run two CDNs at once?

During the move, yes: each hostname points at one CDN or the other. A long-term multi-CDN setup is possible with DNS-based traffic steering, but it means keeping two configurations in sync.

A read-only look at your domain's DNS, email records, HTTPS certificate and registration. Save a snapshot before the change and compare after. No logins, nothing is changed.

Run the before check

Planning something else?

More checklists in Websites & domains ยท All changes