Custom domain for workers?

I’ve set up my worker successfully on the workers.dev domain, but I’d like to move the production instance to my custom domain. I’m having trouble finding more information on how to go about that.

  • I’ve added the domain to Cloudflare successfully.
  • I’d like to route a specific subdomain entirely to the worker.
  • I set up the route in both the dashboard, and in the worker wrangler.toml.
  • It says it’s published successfully to the route.
  • However, any requests to the route return a “Could not resolve host.”.

Do I need to set up a DNS entry for my subdomain route? And if so, where should I point it to?

Yes, you’ll need a DNS record - see A record name for worker

1 Like