Custom Hostnames

Hello, I'm trying to setup Multi-Tenant SaaS where users can point their custom domains to my website's subdomains. So for example, for user "Demo", their custom domain would be : https://demo.heliup.xyz If that user has their own custom domain, for example https://astralics.com, they should be able to point that domain to the subdomain on my website. Now, I've setup the CNAME records for astralics to point to https://demo.heliup.xyz , Then I went to the dashboard of the main website (heliup.xyz) to setup custom hostnames, And then I verified everything, but when i try to visit https://astralics.com it shows a Invalid SSL certificate Error code 526. I don't know what to do at this point, any help is greatly appreciated.
No description
No description
20 Replies
Chaika
Chaika•3w ago
526 means it gave a certificate it just wasn't valid. Expired/Revoked/self-signed or more likely it just didn't contain the target hostname. If your two domains in your example are in the same account this gets more messy because cross-account pointing without SaaS is allowed. You'd need to add both the www and apex astralics.com version as two separate custom hostnames, then I'd make sure that your origin heliup.xyz responds to requests with other host headers like astralics.com with the heliup.xyz certificate and the proper content
lunix
lunix•3w ago
i THINK ive fixed it, but im facing an issue with my host https://railway.app
Railway
Railway
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
lunix
lunix•3w ago
if u go to https://astralics.com it is rendering content, but it is not showing the real content because that domain isn't registered on my railway host.
Chaika
Chaika•3w ago
yea most likely it's what I said above "make sure that your origin heliup.xyz responds to requests with other host headers like astralics.com with the heliup.xyz certificate and the proper content", it's seeing the host header as astralics.com and saying "hey I don't have a config for this"
lunix
lunix•3w ago
mhm, do you have any info on how i could do that?
Chaika
Chaika•3w ago
the most simple assumption is you'd add it as another custom domain within railway. Obviously not too scalable though, depends if you have a unique IP with them and can just have a fallback for that all or how the platform works
lunix
lunix•3w ago
i have fallback for heliup.xyz which is the main domain and I can't add more custom domains to railway
Chaika
Chaika•3w ago
when I say "fallback" I mean within railway
lunix
lunix•3w ago
so my only solution ATM would be to purchase a VPS
Chaika
Chaika•3w ago
You could have your fallback domain within CF For SaaS be a worker which requests your railway site and pass a custom header indictating which customer it is but would have to pay worker costs
lunix
lunix•3w ago
mhm what would u recommend? getting a vps and using coolify as the PaaS
Chaika
Chaika•3w ago
coolify isn't a free pass out of it either is my understanding, I was actually helping someone else with it and CF For SaaS. had to use a custom traefik config to set a default ssl cert and they were having issues with renewal and such, maybe not too bad though espec if you've used it and traefik before. I would keep it simple and simple nginx w/ 15-year cf origin cert, and you can have fallback/everything you want and forward to anything. Could be even in front of coolify or whatever
lunix
lunix•3w ago
it might not be a full pass out of it but it would definitely have less issues than railway @Chaika apologies for pinging, would u be able to help if i got a vps and i was facing any issue with the cloudflare for saas service?
Chaika
Chaika•3w ago
To the same extent as here sure, we're just community volunteers who try to provide best effort support. I don't know every stack or possible configuration but CF For SaaS really isn't that complex, just need a fallback for any host that serves a valid cert for your own domain and whatever content you want.
lunix
lunix•3w ago
sounds good, thank you in advance. I will chat here again soon once i've purchased a VPS and set it up 🙂 hey! @Chaika are you here? I have configured a VPS with coolify and i've set everything up ( I think )
Want results from more Discord servers?
Add your server