Do this with AI
Install the cms-environments-publishing skill from Contentstack agent skills and connect the Published Content QA profile in MCP Profile Hub. Then ask your agent:
Fetch the entry with UID blt0123456789abcdef from the blog_post content type through the Content Delivery API for the production environment and the en-us locale. Show its title, updated_at and publish_details, and tell me whether the published version matches the latest saved version.
New to this? Set up your AI workbench first.
I published, but my site still shows old content
You hit publish, the entry shows a green status, and the page on your site still has yesterday's text. This is the most common "Contentstack is broken" moment, and Contentstack is almost never the problem. Somewhere between the publish and your browser, a layer kept the old copy.
This guide is a triage. You check one layer at a time, from the publish itself to the browser, with a command or a header for each. Most of the time you find the cause in under five minutes. It applies to any front end, with extra notes for Next.js and sites hosted on Contentstack Launch.
What you'll learn
How to prove whether the publish reached the Content Delivery API
How to read cache headers to see which layer served a page
Why a statically generated page needs a build and not a cache purge
How to fix stale content from a CDN, a second CDN, a framework cache or the browser
How to set things up so editors don't have to ask you again
Symptoms
The entry shows Published in the entry editor, but the live page shows the old value.
The page updates after a redeploy, but not after a publish.
The page is fresh on one URL and stale on another, for example with and without a trailing slash or a query string.
The page is fresh in an incognito window and stale in your normal browser.
The REST response is fresh and a GraphQL-driven page is not, or the other way around.
Some locales update and others don't.
Why it happens
A published entry travels through several layers before someone sees it. Each one can hold a copy:
Layer | What it holds | What clears it |
|---|---|---|
Publish | The entry version on an environment and locale | Publishing to the right environment and locale |
Delivery API | Contentstack's own CDN for the CDA and GraphQL | Contentstack purges it when you publish |
Your build | HTML generated at build time | A new build |
Framework or SDK cache | Data cached inside your app | A redeploy, or turning that cache off |
Your hosting CDN | Cached pages, per URL | A purge, a redeploy, or the TTL running out |
A second CDN or proxy | Its own copy of the page | Only its own purge |
The browser | The page, if max-age allows it | A hard refresh, or the TTL running out |
Contentstack concept: publishing makes an entry version available on one environment, in one locale. The Content Delivery API serves that version to anyone who asks with a delivery token for the same environment. Everything after the API is your stack of caches, not Contentstack's.
So the first question is always the same: does the Delivery API return the new content? If yes, the problem is in your app or your caches. If no, the problem is the publish.
Fix it
Work through these in order. Each section starts with the check, then gives the fix.
The content isn't published where your site reads it
This usually happens when the entry went to staging while the site reads production, or to en-us while the page renders fr-fr.
Open the entry and check its publish status. It shows which environments and locales the entry was published to, and which version.
Ask the Delivery API directly, with the same values your site uses:
curl -s "https://cdn.contentstack.io/v3/content_types/blog_post/entries/$ENTRY_UID?environment=production&locale=en-us" \
-H "api_key: $CONTENTSTACK_API_KEY" \
-H "access_token: $CONTENTSTACK_DELIVERY_TOKEN" \
| jq '.entry | {title, updated_at, publish_details}'Compare publish_details.environment and publish_details.locale with what your site sends. Use your region's CDA host if your stack is not in AWS North America, for example eu-cdn.contentstack.com.
If the response has the old value, publish again to the right environment and locale. If the entry uses branches, check that the delivery token is scoped to the branch you published on. Unpublished referenced entries are a separate story, covered in Publishing stuck or references not published. A locale that returns another locale's content is covered in Why am I getting en-us content?.
If the response has the new value, the publish worked. Move on.
The page was built before you published
A statically generated page holds its content in the HTML. Publishing changes the API, not the HTML that is already on your hosting. Until something builds the site again, visitors see the old page.
Check:
Run next build locally and look at the route table. Routes marked ○ (Static) or ● (SSG) are rendered at build time. ƒ (Dynamic) routes render on request.
Look at the page source of the live page. If the old text is in the HTML and the page makes no Delivery API call at runtime, it came from the build.
Check whether a redeploy fixes it. If it does, the build is your stale layer.
Fix it by rebuilding on publish. Create a deploy hook on your hosting, then call it when content changes:
With a webhook: in your stack, add a webhook on entry publish and unpublish, and set its URL to the deploy hook.
With Automate: trigger on entry publish and call the deploy hook, or use the Launch connector's redeploy action.
On Launch, a deploy hook is a unique URL per environment, and a POST to it starts a deployment. Deploy from CI with the Launch CLI and API shows the setup. If your site has thousands of pages and editors publish all day, rebuilding on every publish turns into a queue. Server-render those pages and revalidate the CDN instead. Revalidate, prime or redeploy? helps you pick.
The Launch CDN serves a cached copy
For a server-rendered page, the Launch CDN keeps the response for as long as Cache-Control allows. A page with s-maxage=86400 stays cached for a day after you publish, unless you purge it.
Check the headers of the live page:
curl -sI https://www.example.com/blog/my-post | grep -iE "cache-control|cf-cache-status|x-cache|^age"cf-cache-status: HIT with a large age means the CDN served a stored copy.
cache-control tells you how long that copy may live.
No cache-control at all is not the same as "not cached". Set the header explicitly, so the behavior is yours and not a default.
Fix it in two parts. Purge now, from Settings > Environments > Cache in Launch, or with the Revalidate CDN Cache API by path, cache tag or hostname. Then make it automatic: revalidate on publish with the Launch connector in Automate or with a webhook route in your app. Caching, revalidation and cache priming has the full setup, including Cache-Tag headers so one purge clears a whole section.
The cache key is the URL. /blog/my-post and /blog/my-post?utm_source=newsletter are separate entries, so purge the variant visitors actually hit, or purge by tag.
A second CDN sits in front of Launch
Some teams keep Cloudflare, Akamai, Fastly or a WAF in front of their hosting. Launch purges its own CDN on every deployment and every revalidation. It has no way to purge yours.
Check:
curl -sI the page and look for headers from the outer layer, such as a second age, x-cache or a vendor header.
Request the Launch environment's default *.contentstackapps.com URL for the same path. If that is fresh and your domain is stale, the outer layer holds the old copy.
Fix it by turning caching off on the outer layer and letting Launch manage caching, which is what the Launch go-live guide recommends. If you need that layer to cache, purge it from the same webhook or automation that revalidates Launch. Layering CDNs is not recommended on Launch, partly for this reason.
Your framework or SDK caches data
The CDA is fresh, the CDN says MISS, and the page is still old. Then the copy lives inside your app.
Check:
Next.js App Router: a route without dynamic APIs is rendered once and reused. On Launch, the Next.js Data Cache, ISR and revalidatePath() / revalidateTag() are not supported, so code that relies on them never refreshes.
Delivery SDK cache: if you configured cacheOptions with a persistenceStore and a cache-first policy, the SDK returns stored responses before it calls the API.
Your own cache: an in-memory map, Redis or a fetch wrapper with a TTL.
Fix it by moving the caching decision to HTTP. Opt the route out of the framework cache and let Cache-Control and CDN revalidation handle freshness:
// app/blog/[slug]/page.tsx
export const dynamic = 'force-dynamic';Then set Cache-Control: public, max-age=0, s-maxage=86400, stale-while-revalidate for that route and revalidate on publish. For the SDK, use a network-first policy or drop cacheOptions on the server, where the CDN already caches.
GraphQL and REST disagree
The GraphQL Content Delivery API is served and cached separately from the REST CDA. If a GraphQL-driven page is stale while the REST response is fresh, run the same query against GraphQL with the same environment and locale and compare. Most of the time the query asks for a different environment, locale or branch than you expect. If the GraphQL response itself stays old after a publish, note the time and the query and contact Contentstack Support.
The browser kept the page
If a private window shows the new content, your browser cached the page. That happens when the page sends max-age greater than zero. Use max-age=0 for HTML and let s-maxage control the CDN. Long max-age values belong on hashed static assets, not on pages.
Check that it worked
Run the same three checks after every fix:
The CDA returns the new value for your environment and locale.
curl -sI on the live URL shows cf-cache-status: MISS on the first request after the purge, and HIT with a small age after that.
The page source contains the new text.
Then publish a small change and time how long it takes to show up. That number is what your editors experience.
Prevent it
Decide per route whether content lives in the build or is rendered on request, and wire the matching trigger: a deploy hook for built pages, a revalidation for rendered ones.
Set Cache-Control explicitly on every HTML route. Never rely on a default.
Tag responses with Cache-Tag per content type, so one revalidation clears everything that shows that content.
Don't add a second CDN in front of Launch. If you must, turn its caching off.
Point every environment variable for the Delivery API at the right environment, and check it in staging before you go live.
Tell editors how long a publish takes to show up, so a two-minute build doesn't look like a bug.
Key takeaways
Start with the Content Delivery API. If it has the new content, the publish worked and the problem is a cache.
Pre-rendered pages need a build. Revalidating the CDN only fetches the same old HTML again.
cf-cache-status and age tell you whether the Launch CDN served a stored copy.
Launch can't purge a CDN you put in front of it.
On Launch, use Cache-Control and CDN revalidation, not the Next.js Data Cache or revalidatePath().
Next steps
Set up revalidation on publish with Caching, revalidation and cache priming.
Pick the right lever per change with Revalidate, prime or redeploy?.
If your build fails after you wire up a deploy hook, see Fix failing Launch builds.
Frequently asked questions
How do I know if Contentstack has the new content?
Request the entry from the Content Delivery API with the same environment, locale and delivery token your site uses. If the response has the new value, the publish worked and the stale copy lives somewhere between the API and the browser.
Why does a redeploy fix stale content on Launch?
A deployment rebuilds the pages and purges the CDN cache for that environment. That clears both a stale static build and a stale CDN copy, which is why it always works, and why it is the most expensive fix.
Does revalidating the Launch CDN help a statically generated page?
No. The CDN fetches the page from your build output again, and the build output still has the old content. A pre-rendered page needs a new build.
Can a CDN in front of Launch cause stale content?
Yes. Launch purges its own CDN on every deployment and revalidation, but it can't purge a second CDN you put in front of it. Turn caching off on that layer or purge it yourself.