| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/workers/configuration/routing/workers-dev/ | [Back] [Original] |
Cloudflare Workers accounts come with a workers.dev subdomain that is configurable in the Cloudflare dashboard. Your workers.dev subdomain allows you getting started quickly by deploying Workers without first onboarding your custom domain to Cloudflare.
It's recommended to run production Workers on a Workers route or custom domain, rather than on your workers.dev subdomain. Your workers.dev subdomain is treated as a Free website and is intended for personal or hobby projects that aren't business-critical.
workers.dev subdomains take the format: <YOUR_ACCOUNT_SUBDOMAIN>.workers.dev. To change your workers.dev subdomain:
In the Cloudflare dashboard, go to the Workers & Pages page.
Go to Workers & Pages ↗Select Change next to Your subdomain.
All Workers are assigned a workers.dev route when they are created or renamed following the syntax <YOUR_WORKER_NAME>.<YOUR_SUBDOMAIN>.workers.dev. The name field in your Worker configuration is used as the subdomain for the deployed Worker.
When enabled, your workers.dev URL is available publicly. To require visitors to sign in before they can access a workers.dev URL, use Cloudflare Access.
Access can protect one Worker's production workers.dev URL, preview URLs, or both. You can also protect all Workers or all Worker previews in an account.
To use details about the signed-in user in your Worker, use ctx.access. You can also read the user's identity from the validated JWT or the /cdn-cgi/access/get-identity endpoint.
To disable the workers.dev route for a Worker:
In the Cloudflare dashboard, go to the Workers & Pages page.
Go to Workers & Pages ↗In Overview, select your Worker.
Go to Settings > Domains & Routes.
On workers.dev click "Disable".
Confirm you want to disable.
To disable the workers.dev route for a Worker, include the following in your Worker's Wrangler configuration file:
{
"workers_dev": false
}workers_dev = falseWhen you redeploy your Worker with this change, the workers.dev route will be disabled. Preview URLs default to matching your workers_dev setting unless explicitly configured. If you explicitly enabled Preview URLs, disable them separately.
If you do not specify workers_dev = false but add a routes component to your Wrangler configuration file, the value of workers_dev will be inferred as false on the next deploy.
Caution
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.
When deploying a Worker with a workers.dev subdomain enabled, your Worker name must meet the following requirements:
a-z, A-Z, 0-9) and dashes (-)-)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 or custom domains instead.
| Web Proxy Viewer | New URL | Original Page |