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
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 routeI set one up like this to test:
and it works fine for me, ex:
https://heylk-val.chaika.win/hh matches
https://heylk-diff.chaika.win/hh doesn't
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
I just have an originless wildcard record:
AAAA
*
100::
Proxied
you don't need any custom domain settingswhat's your worker route?
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
*/*
it won't let me save that
Do it from the Worker Routes page inside of your zone
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
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.i don't have any other worker routes on the site
yea, I would try
*.zepages.dev/*
. What does your worker do exactly, it's not doing a fetch itself in any way right?purchased workers for saas too, and paid workers
you don't need either :NotLikeThis:
worker does nothing special
looks good, and did you try changing the route?
still no good
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
option below websites
it'll tell you if it should have hit a worker (or not)
Interesting
what url did you input?
https://blah.zepages.dev/aa
https://zepages.dev also fails
cloudflare for saas breaks it
https://community.cloudflare.com/t/cloudflare-trace-fails-says-the-hostname-does-not-belong-to-my-account/643570/6
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
i'm trying to transfer it to CF (part of me trying to troubleshoot and narrow down things)
the NS are what you mentioned
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)?
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
Does it work with a specific worker route (not custom domain), like
testroute.zepages.dev/test
1?yep
ok, and it works with a specific wildcard path on a specific hostname, like
testwildcardroute.zepages.dev/*
?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.
If routes work but not wildcards, that is pretty much the only thing that would make sense
the wildcard works with the /*
it wouldn't be an arabic star since I'm on a US keyboard, and it works other places
like it lets you use any hostname but only the
/
path? for me https://testroute-ze.zepages.dev/ still 522sif i make a custom domain i can make that work
but you can't get wildcard routes to work at all?
only trailing wildcard when i set it via domains