I would like to offer custom domains features for customers of my SaaS tool.
Here’s my initial configuration:
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.
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.