I would like to offer custom domains features for customers of my SaaS tool.
Here’s my initial configuration:
It looks like the easiest way to achieve this feature is to use Cloudflare’s SSL for SaaS (documentation).
What I have done:
Create a proxied CNAME for the subdomain domain.mysaas.com and connect it to the DigitalOcean’s app. Now I can use this subdomain to access the app. Easy.
From the SSL/TLS > Custom Hostnames add domain.mysaas.com as a Fallback Origin. Also, add custom.clientdomain.com in the hostname section. Custom Hostname
Go to clientdomain.com DNS settings and add: custom.clientdomain.com CNAME domain.mysaas.com
. Also add a TXT record to verify the ownership.
I thought that this is enough but it doesn’t work. If I open custom.clientdomain.com I get browser’s 404 status page. I’ve checked the SSL certificate and it looks like it’s the correct one (issued by Cloudflare today).
At the same time, domain.mysaas.com works perfectly.
Is there something I’m missing? Do I need to add an A record for domain.mysaas.com (but DigitalOcean doesn’t provide it)? Could it be related to CORS settings or something?
Any help would be much appreciated! It’s been 3 days I’m trying to resolve this.
Probably there’s a better (not Cloudflare’s) solution?
EDIT: I really think I have to do something on the DigitalOcean side. Add a wildcard accepting any domain somehow…?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi there,
There was a similar question asked here:
It is possible to run multiple domains with App Platform. There are limits to the number of domains allowed by default. If you plan to run a SaaS style app with more than a few dozen, I recommend talking to our support/sales team.
The App Platform also supports wildcard domains (ex. *.example.com) which can be used to ease configuration of lots of subdomains.
Hope that helps!
- Bobby.