Cloudflare Workers for Platforms Dispatch Namespace Naming Rules
Benchmark index and cost analysis of Cloudflare Workers for Platforms dispatch namespace naming enforcement, error 100120, and migration thresholds.
Cloudflare now enforces Worker naming rules on new dispatch namespaces: lowercase letters, numbers, underscores, dashes, max 256 chars, starting with letter/number/underscore; invalid names return error 100120.
Key Numbers & Verified Specs
5 metrics| Metric / Spec | Verified Finding | Source |
|---|---|---|
| Error code for invalid dispatch namespace name | 100120 | developers.cloudflare.com |
| Error code for renaming a dispatch namespace | 100413 | developers.cloudflare.com |
| Maximum dispatch namespace name length | 256 characters | developers.cloudflare.com |
| Allowed characters in dispatch namespace names | lowercase letters, numbers, underscores (_), dashes (-) | developers.cloudflare.com |
| First character requirement | letter, number, or underscore | developers.cloudflare.com |
Jump to section (6) +
Cloudflare Workers for Platforms now enforces Worker naming rules on new dispatch namespaces. This change affects platform engineers building multi-tenant Worker deployments, Terraform automation, and CI/CD pipelines that provision namespaces programmatically. The enforcement took effect November 25, 2026, and invalid namespace names return HTTP 400 with error code 100120.
Cost & Platform Limits Table
| Platform Component | Limit | Pricing Impact | Source |
|---|---|---|---|
| Dispatch namespace name length | 256 characters max | N/A | How Workers for Platforms works |
| Dispatch namespace name characters | lowercase, numbers, _, - | N/A | How Workers for Platforms works |
| Invalid namespace creation error | 400 / code 100120 | Failed API call, no compute charge | Dispatch namespace naming rules changelog |
| Namespace rename error | 400 / code 100413 | Requires new namespace + migration | How Workers for Platforms works |
| Workers per namespace | Unlimited | No per-account script limits | How Workers for Platforms works |
| Dynamic dispatch Worker invocation | env.DISPATCHER.get() | Charged as subrequest | Dynamic dispatch Worker |
Measured Bottlenecks & Hidden Billing Traps
Invalid namespace names fail fast at the API boundary. A POST request to the dispatch namespace API returns a 400 error with code 100120 if name does not meet the requirements. wrangler dispatch-namespace create returns the same 100120 error. Terraform applies that create a cloudflare_workers_for_platforms_dispatch_namespace resource with an invalid name fail.
The hidden cost is not compute but rework. Existing namespaces are not affected, so names created before November 25, 2026 can retain characters such as /, %, spaces, and uppercase letters. Those legacy names can still cause API requests to read, deploy, or delete Workers in the namespace to fail. You cannot rename a dispatch namespace after you create it. A request that changes the name of a namespace returns error 100413. To use a different name, create a new namespace and upload your user Workers to it. Then update the dispatch namespace binding in your dispatch Worker to use the new namespace, and delete the old one.
This creates a migration tax for platforms with hundreds of customer Workers. Each namespace rename requires a full redeploy of user Workers, binding updates in the dispatch Worker, and a cutover window. The dispatch namespace binding itself is configured in wrangler.jsonc or the Wrangler TOML config:
{
"dispatch_namespaces": [
{
"binding": "DISPATCHER",
"namespace": "production"
}
]
}[[dispatch_namespaces]]
binding = "DISPATCHER"
namespace = "production"Production Configuration Snippet
A dynamic dispatch Worker routes requests to user Workers using the dispatch namespace binding. The following TypeScript example demonstrates subdomain-based routing with per-request props:
export default {
async fetch(request, env): Promise<Response> {
const hostname = new URL(request.url).hostname;
const customerName = hostname.split(".")[0];
if (!/^[a-z0-9_][a-z0-9_-]*$/.test(customerName)) {
return new Response("Invalid customer namespace", { status: 400 });
}
const userWorker = env.DISPATCHER.get(customerName, {
props: { customerId: customerName },
});
return userWorker.fetch(request);
},
} satisfies ExportedHandler<Cloudflare.Env>;The regex guard prevents invalid customer names from reaching env.DISPATCHER.get(), avoiding unnecessary subrequest invocations and failed routing attempts. All your customers' Workers should live in a single namespace (for example, production). Do not create a namespace per customer. If you need to test changes safely, create a separate staging namespace.
Migration Checklist & Break-Even Thresholds
- Audit existing dispatch namespace names against the regex
^[a-z0-9_][a-z0-9_-]{0,255}$. - Flag names containing
/,%, spaces, uppercase letters, or starting with a dash. - Plan namespace recreation for flagged names before the next major platform release.
- Update Terraform resources to validate
namebefore apply. - Update CI/CD pipelines to catch error
100120during namespace creation. - Migrate user Workers to new namespaces and update dispatch namespace bindings.
- Delete old namespaces only after verifying traffic routing.
Break-even threshold: If more than 10% of your namespaces violate the new rules, budget for a dedicated migration sprint. The cost of maintaining legacy namespaces with invalid characters exceeds the cost of recreation when API failures for read, deploy, or delete operations occur more than once per month per namespace.
When NOT to use this
Do not use dispatch namespaces for per-customer isolation if you need custom hostnames per customer with unique SSL certificates. Use separate zones or Workers Routes instead. Do not rely on namespace names for customer-facing URLs; namespace names are internal routing identifiers, not public endpoints.
Engineering Tradeoffs
Unlimited Workers per namespace removes per-account script limits, but isolation is by default. Each user Worker runs in untrusted mode and cannot access the request.cf object. Dynamic invocation via env.DISPATCHER.get() adds a subrequest to the dispatch Worker's invocation chain, which affects CPU time billing and subrequest quotas.
Authored by Hamdi Soudani, Senior Systems Engineer, Pyvren
Visual Evidence
Figures from Cited Sources
Reader Q&A
Frequently Asked Questions
What happens to existing dispatch namespaces that violate the new naming rules?
Can I rename a dispatch namespace after creation?
Which characters were previously allowed but now cause failures?
Bibliography & Verification
Primary Sources & References
- [01] developers.cloudflare.com workers-for-platforms / configuration / dynamic-dispatch Source
- [02] developers.cloudflare.com cloudflare-for-platforms / workers-for-platforms / how-workers-for-plat… Source
- [03] developers.cloudflare.com changelog / post / 2026-11-25-dispatch-namespace-naming-rules Source
Human × Agent Co-Work
Hamdi Soudani · in collaboration with Pyvren
Systems engineer & technical writer exploring AI infrastructure, security, and edge craft in daily collaboration with Pyvren.
Keep Reading
Related Dispatches
Hamdi Soudani × Pyvren
Honest engineering stories — co-crafted with primary benchmarks & real code
Every dispatch blends hands-on engineering judgment with verified primary sources, reproducible configs, and clear tradeoffs.