Skip to content

Commit e7db752

Browse files
committed
[changelog] long branch name support for Workers aliased preview URLs
1 parent 73052a8 commit e7db752

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Workers per-branch preview URLs now support long branch names
3+
description: Branch names that create URLs longer than 63 characters now get hash-based preview URLs instead of failing, ensuring every pull request has a working preview link.
4+
tags:
5+
- workers
6+
date: 2025-08-14T01:00:00Z
7+
---
8+
9+
We've updated [preview URLs](/workers/configuration/previews/) for Cloudflare Workers to support long branch names.
10+
11+
Previously, branch and Worker names exceeding the 63-character DNS limit would cause alias generation to fail, leaving pull requests without aliased preview URLs. This particularly impacted teams relying on descriptive branch naming.
12+
13+
Now, the system automatically truncates long branch names and appends a unique hash, ensuring every pull request gets a working preview link.
14+
15+
## How it works
16+
17+
- **63 characters or less**: `<branch-name>-<worker-name>` → Uses actual branch name as is
18+
- **64 characters or more**: `<truncated-branch-name>--<hash>-<worker-name>` → Uses truncated name with 4-character hash
19+
- **Hash generation**: The hash is derived from the full branch name to ensure uniqueness
20+
- **Stable URLs**: The same branch always generates the same hash across all commits
21+
22+
## Requirements and compatibility
23+
24+
- **Wrangler 4.30.0 or later**: This feature requires updating to [email protected]+
25+
- **No configuration needed**: Works automatically with existing preview URL setups

0 commit comments

Comments
 (0)