Custom domains and self hosting
I have a worker sitting on
foo.bar.com
and I want my customer to be able to self host it on their site bar.baz.com
. Currently foo.bar
is being served in a cross origin iframe and it's running into issues with the newish 3rd party cookie changes.
I've been googling in a circle because I'm absolutely not using the correct terms, and the are all so loaded! Is there a good guide to follow anywhere?
I think I need to get the client to update their CNAME - but with what values, and how it's generated - I'm really not sure!
Any help and pointers would be ace - thank you!2 Replies
Hey, I think you're looking for https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/
The basic steps will be
- you setup a fallback origin
- you can prepare your site for processing requests to their domain
- you add their domain as a custom domain, I recommend using DNS validation so the CNAME is the only thing they need to do
- then they change their CNAME to your fallback origin and Cloudflare will handle traffic and even create a TLS certificate
Limits and prices are in the docs, the TLDR is that the Custom Hostnames tab in the dash will become your friend
Cloudflare Docs
Custom hostnames | Cloudflare for Platforms docs
Cloudflare for SaaS allows you, as a SaaS provider, to extend the benefits of Cloudflare products to custom domains by adding them to your zone as custom hostnames. We support adding hostnames that are a subdomain of your zone (for example, sub.serviceprovider.com) and vanity domains (for example, customer.com) to your SaaS zone.
You are wonderful - thank you! Perfecto