subdomain wildcard first level

I was looking at this post and am encountering a similar issue however just with the first level sub domain. I have a worker that I want to reply to *-val.mydomain.com/* I've tried setting this up as both a custom domain and a worker route, but no matter what combination I try I get a 522 error. Do I also need to go the Advanced certificate path?
49 Replies
Chaika
Chaika7mo ago
Do I also need to go the Advanced certificate path?
That's a first level subdomain still, so no.
but no matter what combination I try I get a 522 error.
522 means it's not matching
I have a worker that I want to reply to *-val.mydomain.com/* I've tried setting this up as both a custom domain and a worker route
That wouldn't work as a Custom Domain, but should have no issues as a Worker route
Chaika
Chaika7mo ago
I set one up like this to test:
No description
Chaika
Chaika7mo ago
and it works fine for me, ex: https://heylk-val.chaika.win/hh matches https://heylk-diff.chaika.win/hh doesn't
zmanc
zmancOP7mo ago
Can you share what you have for dns settings or custom domain or is that the only config you have. Matching what you did doesn’t work on mine
Chaika
Chaika7mo ago
I just have an originless wildcard record: AAAA * 100:: Proxied you don't need any custom domain settings
Chaika
Chaika7mo ago
what's your worker route?
zmanc
zmancOP7mo ago
No description
zmanc
zmancOP7mo ago
No description
Chaika
Chaika7mo ago
wonder if it's some weird character thing or something. Do you have anything else on that domain you care about breaking? If not, try */*
zmanc
zmancOP7mo ago
No description
zmanc
zmancOP7mo ago
it won't let me save that
Chaika
Chaika7mo ago
Do it from the Worker Routes page inside of your zone
zmanc
zmancOP7mo ago
No description
Chaika
Chaika7mo ago
no if you go your website in Cloudflare, there's a "Worker Routes" tab inside of it on the left side not under the worker
zmanc
zmancOP7mo ago
No description
Chaika
Chaika7mo ago
1 sec that's weird, I can do it on my paid account but not on free, wonder if related to the rest of it that same wildcard still works fine on my free account (although */* doesn't), you could try *.zepages.dev/* instead, just trying to see if it works at all do you have any other worker routes you can see under your website? turns out you have to have CF for SaaS to do */*, opps, weird requirement for that. Wildcards themselves are still fine regardless of plan. But yea, I would try doing a wider wildcard seeing if it works at all, and also let me know if you have any other worker routes on that site.
zmanc
zmancOP7mo ago
No description
zmanc
zmancOP7mo ago
i don't have any other worker routes on the site
Chaika
Chaika7mo ago
yea, I would try *.zepages.dev/*. What does your worker do exactly, it's not doing a fetch itself in any way right?
zmanc
zmancOP7mo ago
purchased workers for saas too, and paid workers
Chaika
Chaika7mo ago
you don't need either :NotLikeThis:
zmanc
zmancOP7mo ago
worker does nothing special
No description
Chaika
Chaika7mo ago
looks good, and did you try changing the route?
zmanc
zmancOP7mo ago
No description
zmanc
zmancOP7mo ago
still no good
Chaika
Chaika7mo ago
should just trace and see if it thinks it's even hitting it/anything is wrong. If you go out to your account level (where Workers & Pages is), click "Trace" and input a url https://aa-ze.zepages.dev/hey
Chaika
Chaika7mo ago
option below websites
No description
Chaika
Chaika7mo ago
it'll tell you if it should have hit a worker (or not)
zmanc
zmancOP7mo ago
No description
zmanc
zmancOP7mo ago
Interesting
Chaika
Chaika7mo ago
what url did you input?
zmanc
zmancOP7mo ago
No description
Chaika
Chaika7mo ago
no that would just be if you were trying to trace a custom hostname, not your zone in your account I traced my zone with cf for saas enabled no issue. That post is just about the fact CF for SaaS routing traffic for hostnames out of your zone/account, and you can't trace those It looks like your domain is pendingTransfer. You're trying to transfer it into CF? Was it ever in any other accounts before? If you go to the account you think it is, and go to DNS -> Records, the bottom nameservers should be galilea.ns.cloudflare.com and junade.ns.cloudflare.com
zmanc
zmancOP7mo ago
i'm trying to transfer it to CF (part of me trying to troubleshoot and narrow down things)
zmanc
zmancOP7mo ago
the NS are what you mentioned
No description
Chaika
Chaika7mo ago
hmm, something's messed, I'll escalate if I can't think of anything else. Just as a sanity check though, does it work if you do a Workers Custom Domain on a specific hostname (like test.zepages.dev)?
zmanc
zmancOP7mo ago
if i do that, it works but not with the wildcard i think its something really off with this account, because I have a different account it worked on we replicated the configuration exactly and this one doesn't work, but the other does, and have been troubleshooting for days
Chaika
Chaika7mo ago
Does it work with a specific worker route (not custom domain), like testroute.zepages.dev/test1?
zmanc
zmancOP7mo ago
yep
Chaika
Chaika7mo ago
ok, and it works with a specific wildcard path on a specific hostname, like testwildcardroute.zepages.dev/* ?
Chaika
Chaika7mo ago
I'm thinking what you think is an astriek/wildcard isn't actually. Your wildcard/astriek looks a bit weird to me, and there are a bunch of look alikes: https://en.wikipedia.org/wiki/Arabic_star
Arabic star
The Arabic star is a punctuation mark added to Unicode 1.1 because the asterisk (*) might appear similar to a Star of David in its six-lobed form (✻). The Arabic star is given a distinct character in Unicode, U+066D ٭ ARABIC FIVE POINTED STAR (the note ‘appearance rather variable’ was added in Unicode 5.1), in the range Arabic punctuation.
Chaika
Chaika7mo ago
If routes work but not wildcards, that is pretty much the only thing that would make sense
zmanc
zmancOP7mo ago
the wildcard works with the /* it wouldn't be an arabic star since I'm on a US keyboard, and it works other places
Chaika
Chaika7mo ago
like it lets you use any hostname but only the / path? for me https://testroute-ze.zepages.dev/ still 522s
zmanc
zmancOP7mo ago
if i make a custom domain i can make that work
Chaika
Chaika7mo ago
but you can't get wildcard routes to work at all?
zmanc
zmancOP7mo ago
only trailing wildcard when i set it via domains
Want results from more Discord servers?
Add your server