Cloudflare for SaaS Domains
we have our web app and the domain example: [devapp.com] each user will have their profile. so for example user-1 has a username bobline, use-2 have jackStore and they can access his profile :
- devapp.com/profile/bobline
- devapp.com/profile/jackstore
Using Cloudflare Custom Domains, the user can use his domains bobline.com and jackstore.com to set up bobonline.com/profile using a cname.
we want a new page under our web app, where our client can fill in their domain name and other required details to set it up and can able to access their profile URL or any other feature of our web-app directly on their domain :
e.g :
- bobonline.com/profile
- bobonline.com/store
- bobonline.com/contact
could you please let me know how I can achieve this?
2 Replies
any update on it ?
If its a Cloudflare Pages Project: You can add their Custom Domains under your Pages Project and then use advanced functions or middleware
If it's anything else (a worker or a normal origin): You want CF For SaaS: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/, first 100 hostnames free, then 10 cents per hostname per month for those over 100. Then you'd just make your worker/origin handle reading the host header/url and routing based on it, and have your origin/worker serve pages as you want in your example