Use Custom Hostnames to point to Cloudflare Pages project

Hi, I want to set up Custom Hostnames to point to my Cloudflare Pages project, but this doesn't appear to be possible. Let me elaborate: Currently I host a project at a different provider, and I use the Custom Hostnames feature in the zone (SSL/TLS > Custom Hostnames) to allow customers to have their own domain for their tenant in my SaaS. Sadly, whenever I set this up and point the Custom Hostnames to the Pages project, I get an error that there was no project found for the domain because the Origin is not set up in the "Custom Domains" for Pages. I am not able to do this, as I would quickly exceed the limit. Is there a way to get this to work or should I stay at the other provider for this project? Thanks!
No description
7 Replies
Bjarn
BjarnOP•16mo ago
I went through the docs to check out some of the settings, this is the setup atm:
Bjarn
BjarnOP•16mo ago
No description
Bjarn
BjarnOP•16mo ago
No description
Bjarn
BjarnOP•16mo ago
No description
Bjarn
BjarnOP•15mo ago
but of course, I can't select the worker of the pages project, so this setup is pretty weird So instead of the originless DNS record, I have pointed the cname to my Pages project, but it gives an instant timeout https://test.bjarn.dev Hi! Small bump, really curious if this is possible 😬
Chaika
Chaika•15mo ago
Pages uses CF for SaaS (Custom Hostnames) under the hood itself, which is checking for specific host headers/etc, so the only way you could really get around it is either by adding the custom domains directly to Pages (which you already said isn't possible) or using a Worker to fetch and proxy the Pages site (you would be paying for worker invocations for every request) Basically would need to be able to pay for extra pages custom domains/get more (which I believe Enterprise can do), or some Pages for SaaS offering (which doesn't exist right now). If it did just work with Custom Hostnames, it'd be a weird triple CF setup CF (your domain) -> CF (pages) -> CF (actual pages worker) (o2o2o)
Bjarn
BjarnOP•15mo ago
Ah oof. That's what I thought, I played around with the worker idea before, but thought it seemed unnecessary spent Ahhhh I'll have to wait to grow enough to be able to afford enterprise then I think hahaha
Want results from more Discord servers?
Add your server