Fix a CDN that serves stale content

We'll confirm the origin is correct, purge the cache, lower TTL, and verify the edge serves fresh content—or tell you when to contact your CDN provider.

Category
Troubleshooting · Home maintenance
Time
5–15 min
Last reviewed
What you'll need
  • CDN dashboard access (Cloudflare, Fastly, or your provider)
  • The URL or path that is stale

Step-by-step diagnostic

Step 1 of 7
Show full guide

Steps

Goal: Confirm the origin, purge the cache, and verify the edge serves fresh content.

  • Check that your origin server serves the updated content. Use curl -H "Cache-Control: no-cache" -I https://yoursite.com/path to bypass cache.
  • Good: Origin shows correct content. Proceed to Purge by URL.
  • Bad: Origin shows old content—fix the origin first. The CDN caches what it receives.

Purge by URL

Goal: Remove cached content for a single stale page.

  • Log into your CDN dashboard (Cloudflare, Fastly, BunnyCDN, or your provider). Find the Caching or Purge section.
  • Enter the full URL (e.g. https://yoursite.com/page) and run purge. Most CDNs purge within seconds.
  • Good: Purge succeeds. Test in incognito—you should see fresh content.
  • Bad: Purge fails—check rate limits, try path purge, or see When to get help.

Purge by path or zone

Goal: Remove cached content for multiple pages or the whole site.

  • For several pages under a path, use path purge. Enter the path (e.g. /blog or /assets).
  • For the entire site, use full zone purge. Some plans limit full purges per day.
  • Good: Purge succeeds. The next request fetches fresh content from the origin.
  • Bad: Purge fails or content stays stale—lower TTL or contact provider.

Lower TTL

Goal: Reduce how long content stays cached so future updates propagate faster.

  • In the CDN cache settings, find TTL for HTML or assets. Lower it (e.g. 5 minutes instead of 1 hour) for content that changes often.
  • Leave higher TTL for static assets (images, CSS, JS) that rarely change.
  • Good: TTL is set. Future updates will propagate within the new TTL window.
  • Bad: No TTL control—your plan may not support it; contact provider.

Verify the edge

Goal: Confirm the edge serves fresh content after purge.

  • Load the page in incognito mode or add ?nocache=1 to the URL.
  • Run curl -I https://yoursite.com/path and check the cf-cache-status (Cloudflare) or x-cache header. You should see MISS or BYPASS, not HIT with old content.
  • Good: Content is fresh. The edge is serving the updated version.
  • Bad: Still stale—lower TTL, purge again, or contact provider.

When to get help

Contact your CDN provider if:

  • Purge consistently fails or returns errors.
  • You hit purge rate limits and need an immediate fix.
  • Content stays stale after a successful purge (origin may be cached elsewhere).
  • You cannot find purge or TTL settings in your dashboard.

Verification

  • The origin serves the correct content when checked with a cache-bypass request.
  • Purge succeeds in the CDN dashboard.
  • The edge serves fresh content (MISS or BYPASS in cache headers) when tested in incognito.
  • TTL is set appropriately for content that changes often.

Escalation ladder

Work from the device outward. Stop when the problem is fixed.

  1. Confirm origin Verify the origin serves correct content.
  2. Purge by URL Purge the stale URL from the CDN dashboard.
  3. Purge by path or zone Purge path or full zone if multiple pages stale.
  4. Lower TTL Reduce TTL for faster future updates.
  5. Contact provider CDN support if purge fails or content stays stale.

What to capture if you need help

Before calling support or posting for help, have these ready. It speeds everything up.

  • CDN provider and plan
  • URL or path that is stale
  • Purge time and result (success or error)
  • TTL settings
  • Steps already tried

Does the origin serve the correct content?

The CDN caches what the origin sends. If the origin is wrong, the CDN will cache wrong content.

Use `curl -H "Cache-Control: no-cache" -I https://yoursite.com/path` to check the origin. Good: origin shows updated content. Bad: origin shows old content—fix the origin first.

You can change your answer later.

Fix the origin first

Update your origin server or hosting so it serves the correct content. The CDN will cache whatever the origin sends. Do not purge until the origin is correct.

Purge the stale URL or path

Purge tells the CDN to remove cached content so the next request fetches fresh.

Log into your CDN dashboard. Purge by URL for one page, or by path for multiple. Good: purge succeeds. Bad: purge fails—check limits, try path purge, or contact provider.

You can change your answer later.

Does the edge serve fresh content now?

Test in incognito or with cache-bypass to avoid local cache.

Load the page in incognito or with `?nocache=1`. Check `cf-cache-status` or `x-cache` header. Good: MISS or BYPASS, content is fresh. Bad: still HIT with old content—lower TTL or contact provider.

You can change your answer later.

Lower TTL and retest

In CDN cache settings, reduce TTL for the affected path. Purge again. If content still stale, the origin or another cache may be involved—contact provider.

Contact CDN provider

If purge fails or content stays stale after purge, contact your CDN provider. Provide URL, purge time, and error messages.

CDN serves fresh content

The edge is now serving the updated content. Consider lowering TTL for content that changes often.

Reviewed by Blackbox Atlas

Frequently asked questions

Why does a CDN serve stale content?
CDNs cache content at edge locations for speed. When you update your site, the edge cache still holds the old version until it expires (TTL) or you purge it. A long TTL or failed purge keeps stale content live.
What is a CDN purge?
A purge tells the CDN to remove cached content immediately so the next request fetches fresh content from the origin. Most CDNs offer URL purge, path purge, or full zone purge.
When should I lower TTL instead of purging?
Lower TTL for content that changes often—it reduces how long stale content can persist. Use purge when you need an immediate fix for a specific update.

Rate this guide

Was this helpful?

Thanks for your feedback.

Continue to