Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions src/content/docs/workers/configuration/routing/workers-dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ If you do not specify `workers_dev = false` but add a [`routes` component](/work
If you disable your `workers.dev` route in the Cloudflare dashboard but do not update your Worker's Wrangler file with `workers_dev = false`, the `workers.dev` route will be re-enabled the next time you deploy your Worker with Wrangler.
:::

## Limitations

When deploying a Worker with a `workers.dev` subdomain enabled, your Worker name must meet the following requirements:

- Must be 63 characters or less
- Must contain only alphanumeric characters (`a-z`, `A-Z`, `0-9`) and dashes (`-`)
- Cannot start or end with a dash (`-`)

These restrictions apply because the Worker name is used as a DNS label in your `workers.dev` URL. DNS labels have a maximum length of 63 characters and cannot begin or end with a dash.

:::note

Worker names can be up to 255 characters when not using a `workers.dev` subdomain. If you need a longer name, you can disable `workers.dev` and use [routes](/workers/configuration/routing/routes/) or [custom domains](/workers/configuration/routing/custom-domains/) instead.

:::

## Related resources

- [Announcing `workers.dev`](https://blog.cloudflare.com/announcing-workers-dev)
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/wrangler/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The `main` key is optional for assets-only Workers.
:::

- `name` <Type text="string" /> <MetaInfo text="required" />
- The name of your Worker. Alphanumeric characters (`a`,`b`,`c`, etc.) and dashes (`-`) only. Do not use underscores (`_`).
- The name of your Worker. Alphanumeric characters (`a`,`b`,`c`, etc.) and dashes (`-`) only. Do not use underscores (`_`). Worker names can be up to 255 characters. If you plan to use a [`workers.dev` subdomain](/workers/configuration/routing/workers-dev/), the name must be 63 characters or less and cannot start or end with a dash.

- `main` <Type text="string" /> <MetaInfo text="required" />
- The path to the entrypoint of your Worker that will be executed. For example: `./src/index.ts`.
Expand Down