Skip to main content

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.

CLOUD & GPU Benchmark Study
Dispatch namespace names now follow Worker naming rules · Changelog
Dispatch namespace names now follow Worker naming rules · Changelog Source: developers.cloudflare.com
Field Note · The Short Version 4 min read

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 ComponentLimitPricing ImpactSource
Dispatch namespace name length256 characters maxN/AHow Workers for Platforms works
Dispatch namespace name characterslowercase, numbers, _, -N/AHow Workers for Platforms works
Invalid namespace creation error400 / code 100120Failed API call, no compute chargeDispatch namespace naming rules changelog
Namespace rename error400 / code 100413Requires new namespace + migrationHow Workers for Platforms works
Workers per namespaceUnlimitedNo per-account script limitsHow Workers for Platforms works
Dynamic dispatch Worker invocationenv.DISPATCHER.get()Charged as subrequestDynamic 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:

JSONC8 lines
{
  "dispatch_namespaces": [
    {
      "binding": "DISPATCHER",
      "namespace": "production"
    }
  ]
}
TOML3 lines
[[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:

TypeScript16 lines
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

  1. Audit existing dispatch namespace names against the regex ^[a-z0-9_][a-z0-9_-]{0,255}$.
  2. Flag names containing /, %, spaces, uppercase letters, or starting with a dash.
  3. Plan namespace recreation for flagged names before the next major platform release.
  4. Update Terraform resources to validate name before apply.
  5. Update CI/CD pipelines to catch error 100120 during namespace creation.
  6. Migrate user Workers to new namespaces and update dispatch namespace bindings.
  7. 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.

Figure 1: Workers for Platforms: Main Flow
Figure 1: Workers for Platforms: Main Flow
Deployment and management flow
Deployment and management flow

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

Dynamic dispatch Worker · Cloudflare for Platforms docs
Figure 1: Workers for Platforms dynamic dispatch routing flow developers.cloudflare.com

Reader Q&A

Frequently Asked Questions

What happens to existing dispatch namespaces that violate the new naming rules?
Existing namespaces are not affected by the enforcement. Only new namespace creation requests are validated against the Worker naming rules.
Can I rename a dispatch namespace after creation?
No. You cannot rename a dispatch namespace after you create it. A rename request returns error 100413. You must create a new namespace, upload user Workers, update the dispatch namespace binding, and delete the old one.
Which characters were previously allowed but now cause failures?
Previously namespace names could contain characters such as /, %, spaces, and uppercase letters. Some of these characters could cause API requests to read, deploy, or delete Workers in the namespace to fail.

Bibliography & Verification

Primary Sources & References

3 cited sources
  1. [01] developers.cloudflare.com workers-for-platforms / configuration / dynamic-dispatch
  2. [02] developers.cloudflare.com cloudflare-for-platforms / workers-for-platforms / how-workers-for-plat…
  3. [03] developers.cloudflare.com changelog / post / 2026-11-25-dispatch-namespace-naming-rules

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.

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.