Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/comment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions src/content/changelog/workers/2025-07-15-workers-preview-urls.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Test your code changes instantly with automatic preview URLs for Cloudflare Workers"
description: "Get shareable preview links for every code change, making it easier to test and collaborate before going live"
products:
- workers
date: 2025-07-22T01:00:00Z
---

We are introducing automatic aliased preview URLs for Cloudflare Workers, now available in public beta.

What this means: Just like Pages, every time you make code changes and create a pull request, you'll automatically get a shareable preview link where you can see your changes running, without affecting production.
These preview URLs are named after your branch and are posted as a comment to each pull request. The URL stays the same with every commit and always points to the latest version of that branch.

![PR comment preview](images/comment.png)

## Preview URL types

Each PR comment includes **two preview URLs** as shown above:

* **Commit Preview URL**: Unique to the specific version/commit (e.g., `<version-prefix>-<worker-name>.<subdomain>.workers.dev`)
* **Branch Preview URL**: A stable alias based on the branch name (e.g., `<branch-name>-<worker-name>.<subdomain>.workers.dev`)

## How it works

When you create a pull request:

- **A preview alias is automatically created** based on the Git branch name (e.g., `<branch-name>` becomes `<branch-name>-<worker-name>.<subdomain>.workers.dev`)
- **No configuration is needed**, the alias is generated for you
- **The link stays the same** even as you make more commits
- **Preview URLs are posted directly to PR comments** just like in Pages

## Custom alias name

You can still assign a custom preview alias using the Wrangler CLI:

```bash
wrangler versions upload --preview-alias staging
```

## Current limitations

* Only available on the **workers.dev** subdomain (custom domains not yet supported)
* A maximum of **20 aliases per Worker** are retained (least recently used aliases are automatically removed)
* Requires **Wrangler v4.21.0+**
* Not generated for Workers that use **Durable Objects**
* Not yet supported for **Workers for Platforms**

This brings Workers in line with our Pages platform, where preview URLs have been highly useful for developer workflows. Stay tuned as we continue expanding preview and collaboration workflows on Workers.
Loading