On this page · 9 sections
Summary. On 19 November 2026 Cloudflare changed how long it keeps Workers versions and Pages deployments: 30 days, after which each one is deleted unless it is among the 100 most recent or is currently deployed. A deleted version disappears from the dashboard and the API, and its Version URL stops working, including any alias created with --preview-alias. A deleted Pages deployment loses its hash-based preview URL in the same way. Running applications are not affected, and you can still roll back to any of the 100 most recent Worker versions. What does break is every pull request comment, ticket, test report or QA checklist that links to an old per-version URL. Cloudflare's answer is Worker Previews, launched on 22 September 2026, which give each branch its own settings, bindings and a stable URL that always serves the latest deployment. Previews need Wrangler 4.135.0 or later; the current release on npm is 4.166.0. Our verdict: treat any per-version URL as a link that expires in 30 days, audit your CI this week, and move branch and PR testing to npx wrangler preview.
About this article. This is for engineering leads, platform teams and developers who deploy to Cloudflare Workers or Pages from CI, and for QA teams who keep preview links in tickets. On 22 November 2026 we checked every rule and command here against Cloudflare's changelog, its Workers, Pages and Workers Builds documentation, and the npm registry. Cloudflare updates these docs often (several Workers and Pages pages were revised on 19 November and two Previews pages on 21 November), so check the linked pages before you change a pipeline. No vendor paid for inclusion. Researched with AI assistance and checked against the primary sources listed in the references.
What changed on 19 November 2026
Cloudflare's changelog entry covers both products in one rule. Workers versions and Pages deployments are kept for 30 days. After that they are deleted, with two exceptions: the 100 most recent, and whatever is currently deployed. The entry lists what you will notice: deleted items vanish from the dashboard and API, the Version URL of each deleted Worker version stops working (aliases included), and so does the preview URL of each deleted Pages deployment.
The Workers documentation, updated the same day, fills in the detail. A version is created every time you upload code or change a Worker's settings or secrets, not only on deploy. A version counts as deployed if it serves any share of traffic, so both versions in a gradual deployment are protected. Cloudflare's own example: of a Worker's 250 versions, the newest 100 stay, and of the other 150 only those under 30 days old or still deployed survive. Deployment history is kept, and a past deployment that used a deleted version now shows that version as deleted. The Workers limits page lists version retention as 30 days on both the Free and Paid plans.
The changelog gives no later start date for deletions, so plan as if versions older than 30 days, outside the newest 100, can already be gone.
Workers and Pages side by side
The two products follow the same 30-day and 100-item rule, but they differ in what counts and what you can roll back to.
| Question | Workers | Pages |
|---|---|---|
| Retention period | 30 days | 30 days |
| Always kept | 100 most recent versions plus any deployed version | 100 most recent deployments plus the current production deployment |
| What counts towards the 100 | Every version, including settings and secret changes | Production and preview deployments together |
| URL that stops working | Version URL and any aliased Version URL | Hash preview URL such as hash.project.pages.dev |
| Rollback targets | Any of the 100 most recent versions | Any production deployment not yet deleted |
| History after deletion | Deployment history kept, version shown as deleted | Deployment removed from list and API |
Why old Version URLs and preview links break
A Version URL is tied to one uploaded version. It follows the pattern of a version prefix, the Worker name and your workers.dev subdomain, and it dies with its version. Cloudflare's docs are explicit on the point most teams will miss: an alias does not prevent its version from being deleted. So a readable alias such as staging keeps working only while the version it was uploaded with survives.
That matters most for teams who adopted per-branch preview URLs for Workers in July 2025. Those were built on Version URLs: Workers Builds posted a commit URL unique to each version and a branch alias named after the Git branch, both on workers.dev, and Wrangler users could set a custom alias with wrangler versions upload --preview-alias. Both kinds now expire with their versions.
Pages behaves the same way at the deployment level. Every push to a branch gets an atomic hash URL that keeps pointing to that deployment until it is deleted, and Pages also keeps a branch alias that moves to the latest commit on that branch. Under the new rule the hash URLs in old PR comments stop resolving once their deployments are deleted. The Pages docs do not say what a branch alias serves if the branch's latest deployment itself falls outside the window, so test that on a stale branch before you rely on it.
There is a second ceiling worth knowing. Only the 1,000 most recently deployed aliases are kept; creating a new one beyond that deletes the least recently deployed alias. Workers that implement a Durable Object (including Containers) never get Version URLs at all, so for them Previews are the only per-branch URL option.
How long does a link actually last?
A per-version link lasts until both protections lapse: it must be more than 30 days old and have at least 100 newer versions above it. That gives a simple rule of thumb. On a busy Worker the 30 days is the limit; on a quiet one, the 100-version count is.
Two worked examples, using the rule above:
- A Worker that gets 8 new versions a day (CI pushes plus a couple of secret changes) passes 100 newer versions after 100 / 8 = 12.5 days. The 30-day rule still protects it, so a PR link from 1 November is at risk from 1 December.
- A Worker that gets 1 new version a day reaches 100 newer versions after 100 days. Its links survive about 100 days, well beyond 30.
On Pages the same arithmetic applies, but preview deployments count towards the 100, so a project with many open branches burns through the count faster than its production history suggests.
What is not affected
Production is safe. Deployed Worker versions and the current Pages production deployment are always kept. Rollbacks still work for any of the 100 most recent Worker versions, a limit Cloudflare raised from 10 to 100 in September 2025. On Pages you can roll back to any production deployment that has not been deleted; preview deployments were never valid rollback targets.
The rollback rules that existed before still apply. A Worker rollback is blocked if a Durable Object class lifecycle change happened in between, or if the target version binds to an R2 bucket, KV namespace or queue that no longer exists. If your incident runbook depends on rolling back to a version older than 30 days that is outside the newest 100, that version is now gone, so the runbook needs a rebuild-from-tag step instead.
Worker Previews: what Cloudflare wants you to use
Cloudflare's compare page now says Version URLs should not be used for branch or pull request testing at all. The reason is isolation: a Version URL runs one uploaded version against the production resources configured for it. A PR link that writes to your production D1 database or KV namespace is a risk whether or not it expires.
Worker Previews, announced on 22 September 2026, fix both problems. Each Preview lives under the same Worker with its own variables, secrets, bindings, URL and observability. Each one gets two URLs: a Preview URL that always serves the latest deployment, and a Deployment URL for each deploy that never changes. Durable Object namespaces and container instances are provisioned per Preview automatically; KV, D1, R2 and other account-level resources are isolated only when you bind the Preview to a separate resource.
Previews limits and gaps
Previews have their own caps, and the oldest items are deleted automatically when you hit them.
| Limit | Free plan | Paid plans |
|---|---|---|
| Previews per Worker | 100 | 500 |
| Deployments per Preview | 100 | 100 |
| What is deleted at the limit | Least recently deployed Preview | Least recently deployed Preview |
| What is deleted per Preview | Oldest deployment | Oldest deployment |
So the stable Preview URL is the one to share. A Deployment URL is also per-deploy and will go once that Preview passes 100 deployments.
The documented gaps matter for test design. Service bindings from a Preview call the bound Worker's production deployment. Routes and Cron Triggers target production, and Cron Triggers do not run a Preview's scheduled handler. Queue consumers cannot target a Preview. Workflow bindings use the existing Workflow's deployed code. Preview URLs are public by default; the workers.dev URL sends an X-Robots-Tag: noindex header, and custom-domain Previews should sit behind Cloudflare Access. Our note on Cloudflare's Protect all Workers default covers the Access side.
How to move PR previews to Worker Previews
The migration is mostly configuration. Cloudflare's own mapping is short: replace wrangler versions upload --preview-alias staging with npx wrangler preview --name staging, share the Preview URL instead of an aliased Version URL, and replace a preview_urls = true setup with Preview-specific variables, secrets and bindings.
1. Find every per-version link you depend on
Search your CI, scripts and docs for the commands and hostnames that create expiring links.
grep -rnE -- '--preview-alias|versions upload' .github/ ci/ scripts/ 2>/dev/null
grep -rnoE '[a-z0-9]{8}-[a-z0-9-]+\.[a-z0-9-]+\.workers\.dev' docs/ .github/ 2>/dev/null | sort -u
grep -rnoE '[a-f0-9]{8}\.[a-z0-9-]+\.pages\.dev' docs/ .github/ 2>/dev/null | sort -u
Links that sit in ticket systems or test reports need a similar search there. Any hit older than 30 days on a busy Worker is a candidate for a dead link.
2. Upgrade Wrangler in the project
Previews need Wrangler 4.135.0 or later, and Cloudflare notes that project commands ignore a newer global install, so update the project dependency. Version 4.166.0 was the npm latest on 22 November 2026.
3. Add a previews block
Production settings stay at the top level of the Wrangler file; Preview settings go in a previews block, which is required even if empty. Point every storage binding at a test resource.
{
"name": "my-worker",
"vars": { "ENVIRONMENT": "production" },
"d1_databases": [{ "binding": "DB", "database_id": "<PROD_DB_ID>" }],
"previews": {
"vars": { "ENVIRONMENT": "preview" },
"d1_databases": [{ "binding": "DB", "database_id": "<STAGING_DB_ID>" }]
}
}
Keep assets and compatibility settings at the top level. Previews sharing one database_id share rows and schema changes, so give a Preview its own database if a PR runs migrations. Secrets cannot live in the file: set shared ones once with npx wrangler preview base-config secret put NAME, and note that later Base changes apply only to new Previews.
4. Switch Workers Builds, if you use it
New Workers use Worker Previews for preview builds by default, with npx wrangler preview as the Preview command. Workers connected to Builds before Previews existed keep the old model until you complete a one-time switch from the Builds settings, and that switch cannot be reversed. Configure the Preview variables, secrets and bindings first, because Previews do not use production settings. Workers Builds then comments the Preview URL on GitHub and GitLab pull requests.
5. Or wire it into GitHub Actions
For external CI, Cloudflare publishes a workflow that creates one Preview per pull request, comments its URL and deletes the Preview when the PR closes. A condensed version:
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
preview:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx wrangler preview --name "pr-${{ github.event.pull_request.number }}" --json
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
cleanup:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx wrangler preview delete --name "pr-${{ github.event.pull_request.number }}" --skip-confirmation
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Parse the JSON output to post the URL with gh pr comment, as Cloudflare's example does. Two cautions from the same page: repository secrets are not passed to forked PRs by default, and you should check that the PR head repository is your own before exposing Cloudflare credentials. The cleanup job also keeps you well under the Preview cap.
6. Keep Wrangler environments where they belong
Wrangler environments still have a role: they create separately named Workers, such as a persistent staging Worker with its own routes and domains. You can run branch Previews under an environment with an env.staging.previews block and npx wrangler preview --env staging. Pass the same --env on every Preview command, including delete, or Wrangler targets the top-level Worker instead.
What to do on Pages
Cloudflare's changelog points only Workers users to Previews; nothing in this change gives Pages an equivalent. The practical steps are smaller:
- Share branch aliases such as fix-api.project.pages.dev in PR descriptions and tickets, not hash URLs.
- Remember that preview deployments count towards the 100 kept deployments, so many open branches shorten the life of older hash links.
- Clean up with
npx wrangler pages deployment delete; the latest deployment for a branch cannot be deleted this way.
- If a Pages project is due for a rebuild anyway, compare moving it to Workers with static assets; our Vercel, Netlify and Cloudflare pricing comparison and Workers versus Vercel Functions cost guide cover the cost side.
A one-week checklist
- Run the three searches above across CI, docs and your ticket system, and list every link that points at a version or hash URL.
- Rewrite runbooks that roll back to a version by ID older than 30 days; use a Git tag and redeploy instead.
- Upgrade Wrangler in each Worker project to 4.135.0 or later.
- Add a
previewsblock with test bindings, and set Base secrets.
- Switch Workers Builds to Previews, or add the Actions workflow with a cleanup job.
- Put Cloudflare Access in front of any Preview on a custom domain that shows private data.
- On Pages, change PR templates to use branch aliases.
Both versions in a gradual deployment stay protected while they carry traffic. If you run split deployments, our note on the Durable Objects deployments tab explains how Cloudflare reports configured and actual traffic.
How eCorpIT can help
eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our cloud computing team can audit your Cloudflare CI pipelines for expiring links and move pull request testing to isolated Worker Previews with test bindings. Talk to us at /contact-us/.
Last updated: 22 November 2026.