I am building a multi-tenant social network platform of sorts. Something like you’d see at a squarespace or shopify where you as a customer can map your custom domain name eg, community,mywebsite,com to the hosted platform eg, app,socialnetwork,com
I’m sure some reverse proxy magic would need to be involved. And some kind of component for free automatic SSL creation. Traefik appears to be the answer!
I imagine whatever solution should be able to handle thousands of mapped domain names all pointing to the single location. With new domains added via API.
eg, community,customer1,com team,customer2,com something,customer17,com x10000 all mapping to app,socialnetwork,com
New domains added via API.
Currently the web app can be hosted as a static site, so i’ve had success with AWS CloudFront etc, but they have limits (10) on the number of domains and its a very manual process, although i did find some APIs. Just unsure if this is an acceptable use of their platform.
So i’m fairly certain what i need is:
- map customer’s domains to our stuff via API
- generate free ssl cert
- apply cert and route domain. There is nodejs code that looks like it would serve that using SNI and the https createServer SNICallback however i’m unsure just how many domains that could handle, suppose its dependant on how performant the callback code is when say requesting from a database the list of domains and certs
Appreciate any info, pointers in the right direction and naturally if theres an all in one service that does it all i’ll consider throwing money at the problem
I get the feeling the CloudFlare SSL Custom Hostnames enterprise feature might be what i’m after as an alternative. https://support.cloudflare.com/hc/en-us/articles/217371987-Managing-Custom-Hostnames-SSL-for-SaaS-
I’ve also asked this question on StackOverflow here https://stackoverflow.com/questions/57931882/multi-tenant-dynamic-multiple-domains-with-ssl-pointing-to-single-host-cdn
Any info is very appreciated.