Trouble binding subdomain to workers
Hi - I have my domain set up in cloudflare and I would have thought it would be straightforward to bind a trigger to the domain.
I have my routes
Set up and it appears to be working - no complaints registering that binding.
However
Do I need to set up a subdomain in DNS? And if so to what address do I point it? It feels like I shouldn't have to do any of this since the domain is managed by cloudflare DNS, but I might be missing something.
nslookup my-project.my-domain.com
is failing, falling back to my ISP's default page.Do I need to set up a subdomain in DNS? And if so to what address do I point it? It feels like I shouldn't have to do any of this since the domain is managed by cloudflare DNS, but I might be missing something.
2 Replies
Routes don't add records. If you just want to use the entire hostname with your worker, use Custom Domains instead of normal routes
https://developers.cloudflare.com/workers/configuration/routing/custom-domains/
If you wanted to use routes instead, like for having more then one worker on a hostname but not a real origin (they have no advantage if the use case is using an entire hostname/subdomain), the "originless" record you can make is
AAAA
name
100::
Proxied
. 100::
is IPv6 Discard, i.e traffic will be handled by the worker, and if it gets to the connecting to origin part, it just gives upThe custom_domain true looks about what I wanted let me try that; thanks!