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
Erisa6mo 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
Joey6mo 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
Erisa6mo 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
Joey6mo ago
Yes that works!! Thank you so much
Want results from more Discord servers?
Add your server
More Posts
Deployment fails on upload files with zero helpOkay, so I try to upload via wrangler deploy, then via direct upload of my build folder, and there'sgoogle-api-javascript-client throw "Uncaught ReferenceError: window is not defined" in Remix CF pageI am trying to use google-api-javascript-client (recommended by google) in my Remix CF page projectFlotiq projectHello everyone, I'm not sure if this is the right place to post a comment, but I'm reaching out frombuild exceeded memory limit (on a very large NextJS app)Hey there, I've got a relatively large nextjs project and I'm running into the "build exceeded memorSelf hosting a media uploading service routed trough Cloudflare (At least on the DNS side)Hello there! I started running my own media uploading service and need to figure out routing. For teAI Gateway GraphQL to retrieve tokens cost, request & response.Hello! I'm trying AI Gateway to log the token cost. I followed the guide https://developers.cloudflaMy custom domain is stuck in either initializing or inactive (requires dns setup)I've been trying for at least 4 days now, I've been through the "Debugging Pages". I added all respWeb Analytics do not report fecthed URLsHi, I have a small SPA website, and have activated the web analytics. It workls fine, but does not Rate limiting with automatic WAFHi everyone, I'm building a completely serverless application using cloudflare workers and want to pPortainer/Docker/Cloudflare issueHello! I've been closely following Jim Hope's guide on setting up a Cloudflare Tunnel (https://jimh