Wildcard worker route not working, no errors in panel

I'm trying to create a route to my worker, it's a basic script that just returns the url you are accessing it at. In the panel, under my worker, I have a custom domain set as example.mysite.com, and a route for *.example.mysite.com, with the zone of mysite.com Visiting the custom domain works as expected, but trying to visit the custom route results in no page loading, as if there is no dns record set for it. Am I misinterpreting how routes work here?
4 Replies
Erisa
Erisa12mo ago
Worker custom domains confusingly don't support wildcards, you need to use a Route as well or instead and set it to *.example.mysite.com/* https://developers.cloudflare.com/workers/configuration/routing/routes/
Routes · Cloudflare Workers docs
Routes allow users to map a URL pattern to a Worker. When a request comes in to the Cloudflare network that matches the specified URL pattern, your …
Joey
JoeyOP12mo ago
So the wildcard I have set is a route. Routes are like custom domains in the sense that I should be able to access the worker from the web? I tried setting an alternate subdomain (non wildcard) as a route, and it doesn't work. Does this mean I forgot to set some dns records for it that the panel doesn't do automatically?
Erisa
Erisa12mo ago
Oh I may have slightly misread but yes if you have a Route then you need to add a DNS record as well. An AAAA record pointing to 100:: is a popular dummy record if you have no origin server to fall through to
Joey
JoeyOP12mo ago
Yes that works!! Thank you so much
Want results from more Discord servers?
Add your server