Routes and domains
To allow a Worker to receive inbound HTTP requests, you must connect it to an external endpoint such that it can be accessed by the Internet.
There are three types of routes:
-
Custom Domains: Routes to a domain or subdomain (such as
example.comorshop.example.com) within a Cloudflare zone where the Worker is the origin. -
Routes: Routes that are set within a Cloudflare zone where your origin server, if you have one, is behind a Worker that the Worker can communicate with.
-
workers.dev: Aworkers.devsubdomain route is automatically created for each Worker to help you getting started quickly. You may choose to disable yourworkers.devsubdomain.
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.
Custom Domains are recommended for use cases where your Worker is your application's origin server. Custom Domains can also be invoked within the same zone via fetch(), unlike Routes.
Routes are recommended for use cases where your application's origin server is external to Cloudflare. Note that Routes cannot be the target of a same-zone fetch() call.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- ยฉ 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark