How to use SSL for SaaS and Pages

I’m unable to use Cloudflare SSL for Saas (custom hostnames) with Cloudflare Pages.

It seems something related to Cloudflare Pages, because I could successfully configure SSL for SaaS pointing to a external service, but when I try to use it with Cloudflare Pages I always get a 522 page.

I have used the official documentation to configure SSL for SaaS
cloudflare-for-platforms/cloudflare-for-saas/start/getting-started/

I followed all the steps, and as I said before, I could make it work for external systems…

I not intended to use the the builtin custom domains of Cloudflare Pages, I would like to use Cloudflare SSL for SaaS, I understand the price of $ 0.10 per custom hostname, after the first 100.

That’s two competing Custom Hostname systems. You can either add a Custom Hostname to your existing origins (S4S), or add a Custom Hostname to a Pages project. Not both.

Why does it have to be S4S?

1 Like

I want to expose my own domain for my customer he creates create his cname, not the pages.dev url.

Can I use Cloudflare Pages to host my app, Nextjs static, but use S4S to distribute it to my final customers?

Example:

Cloudflare Pages app called my-app, the domain should be my-app.pages.dev.

I can have the main url of it, lets say myapp.com, it’s a custom domain of the my-app on Cloudflare Pages.

But I want to distribute it as a white-label solution to my customers, I don’t want to create a Cloudflare Pages custom domain for each one of them, exposing the pages.dev domain, instead I would like to use SSL for SaaS.

So, I can create the fallback domain, myapp.com, now, I can create a custom hostname in S4S, pointing to my customer domain, let’s say app.finalcustomer.com, I will ask to my customer to create a CNAME of app.finalcustomer.com to myapp.com, ok he will need to validate his hostname via TXT and the certificate via TXT or HTTP, and I will need to pay $0.10 for each custom domain after the initial 100.

How can I achieve that?

same problem here, so far i think the only way to overcome this issue is to setup a worker as proxy which connects the custom hostname function with CF Pages