Custom hostnames with pages don't seem to work

Hello there, I've configured a fallback domain for my custom hostnames, it's a proxied CNAME to my pages' domain. However, I'm getting this error:
50 Replies
lmtr0
lmtr015mo ago
domain fall.warpfactor.dev
lmtr0
lmtr015mo ago
Chaika
Chaika15mo ago
Cf for SaaS doesn't work at all with Pages as far as I know. Pages under the hood is using the same thing
lmtr0
lmtr015mo ago
hmmm ok
Chaika
Chaika15mo ago
Just add your other domain directly as a Custom Domain in your Pages project
lmtr0
lmtr015mo ago
do they work with r2? hmm
Chaika
Chaika15mo ago
I believe I tested this before and the answer was also no, but you could pretty easily just use a Worker bound to the r2 bucket / the open source render library can help you handle that as well, supporting range requests for example
lmtr0
lmtr015mo ago
hmmm my use case is the following: - I want the custom hostname to be routed to my worker I'm trying to do that but it doesn't seem to be working
Chaika
Chaika15mo ago
You can use Workers with Custom Hostnames no issue, did you create the match everything route?
lmtr0
lmtr015mo ago
I did not route anything
Chaika
Chaika15mo ago
Using a Worker as your origin · Cloudflare for Platforms docs
If you are building your application on Cloudflare Workers, you can use a Worker as the origin for your SaaS zone (also known as your fallback …
lmtr0
lmtr015mo ago
Ok i will look into that
Chaika
Chaika15mo ago
You can't use Worker Custom Domains if you're trying that, need to use HTTP Routes like in that guide
lmtr0
lmtr015mo ago
ok I'll try it and update it initializating lets wait a bit and see what happens still not working @chaika.me I tried a worker pages and a normal ip none of them work same error tho
lmtr0
lmtr015mo ago
Chaika
Chaika15mo ago
What are you setting the fallback origin to?
lmtr0
lmtr015mo ago
a ip address that points to a google load balancer that itself serves a google storage bucket
Chaika
Chaika15mo ago
nah I meant for Workers
lmtr0
lmtr015mo ago
it shows like this
Chaika
Chaika15mo ago
For example, create a record AAAA fallback.yourdomain.com 100:: Proxied Add a route */* on that zone for your worker (keep in mind when you add that, it's going to take over all non-worker route traffic. If you want to exempt your zone, use *.warpfactor.dev/* service none route) Set the fallback to fallback.yourdomain.com
lmtr0
lmtr015mo ago
hm
Chaika
Chaika15mo ago
You can't use Worker Custom Domains, it has to be a route
lmtr0
lmtr015mo ago
ok let me check
lmtr0
lmtr015mo ago
I have that too
Chaika
Chaika15mo ago
That's not the same thing
lmtr0
lmtr015mo ago
hm but would it route all traffic of the zone to that worker?
Chaika
Chaika15mo ago
Yes, if you want to exempt your zone, add a *.warpfactor.dev/* service none route first
lmtr0
lmtr015mo ago
hmmm ok
lmtr0
lmtr015mo ago
done
lmtr0
lmtr015mo ago
what If I want to route an external domain to a specific worker?
Chaika
Chaika15mo ago
I believe you can just add a route containing it, ex "subdomain.externaldomain.com/*
lmtr0
lmtr015mo ago
hmm ok
Chaika
Chaika15mo ago
not sure though, you might need a worker to route things around and use service bindings
lmtr0
lmtr015mo ago
what do I point the external domain too?
Chaika
Chaika15mo ago
your fallback dns
lmtr0
lmtr015mo ago
ok got it it's active yeiii hmmm
Chaika
Chaika15mo ago
When you set up a new domain, I believe you need the pre-validation txt, but after that, you can just create a proxied CNAME to your fallback (iirc it instructs you to add other TXTs and stuff that you don't need, at least not for http validation.) Scratch that, it's been a bit since I've played around with it. You can set up your domains using HTTP Validation or TXT Validation (select during adding a new custom hostname). HTTP Validation is easier, you just need the pre-validation TXT and a CNAME to your fallback, but HTTP Validation is more brittle and can be broken by waf/etc. You can use TXT Validation instead, which requires another record but is less likely to have issues. Thought that'd be worth clarifying, at least for me when I first used it, it was a bit confusing/not intuitive
lmtr0
lmtr015mo ago
Hmmm @chaika.me custom domains still not working not going to the worker nor the fallback the demo domain is https://w.demowarpfactor.dev/ -> CNAME fall.warpfactor.dev. fall.warpfactor.dev is a ip address that has a worker route the fall back works I get a ERR_SSL_VERSION_OR_CIPHER_MISMATCH on the worker
Chaika
Chaika15mo ago
What does your configuration look like within Custom Hostnames? Is the Custom Hostname w.demowarpfactor.dev active/pending/etc?
lmtr0
lmtr015mo ago
Oh I didn't see that It's pending verification Interesting I added the txt record hours ago
Chaika
Chaika15mo ago
silly question, but are you sure you added them to the right zone?
lmtr0
lmtr015mo ago
let me check OH its a google domains thing it added as _acme-challenge.w.demowarpfactor.dev.demowarpfactor.dev instead of the other way around ok updated works like a charm what about root domains?
Chaika
Chaika15mo ago
no
lmtr0
lmtr015mo ago
I can't use cnames there
Chaika
Chaika15mo ago
just can't without Enterprise I believe lol
lmtr0
lmtr015mo ago
hmmm damm
Chaika
Chaika15mo ago
" Cloudflare for SaaS with Apex Proxying: This allows you to support apex domains even if your customers are using a DNS provider that does not allow a CNAME at the apex. This is available as an add-on for Enterprise plans. For more details, refer to Apex Proxying."
lmtr0
lmtr015mo ago
I might need to go enterprise then thanks a lot
Chaika
Chaika15mo ago
hmm actually the way that is written implies you can, but only with a provider that supports CNAME Flattening I thought it was never at all you can't cname flatten with Google DNS so I guess that's a moot point eitherway no problem You could always just use www subdomain for everything and use something else to redirect from apex -> www
lmtr0
lmtr015mo ago
Got it Makes sense Thx
Want results from more Discord servers?
Add your server
More Posts