-1

We are building a hosting platform for specific use cases.

We need to be able to host other people content under their own domain, i.e., they would configure their DNS, add a CNAME towards our servers and we would deliver their content under their own domain.

blog1.com => would deliver the content of ourwebsite.com/blog1

blog2.com => would deliver the content of ourwebsite.com/blog2

blog3.com => would deliver the content of ourwebsite.com/blog3

and our client would only configure a CNAME and we would handle all other technical aspects.

The first solution we found involved using AWS custom domains and a lambda proxy but we face restrictions in the number of domains we can get and AWS told us that is not the good way to build that.

Can someone here detail what is the preferred solution for such a use case? How do webflow or wordpress manage something like this?

Thank you for your help.

Sébastien
  • 250
  • 3
  • 9

1 Answers1

1

The easiest way to handle this with a service dedicated to handling custom domains like Approximated, CloudFlare's SSL for SaaS, etc.

Those will all put a managed reverse proxy service in front of your app, you create custom domain configurations through their APIs, and customers point their domain A or CNAME records at the IP they'll provide you. They'll handle SSL certs and send requests on to your app.

Otherwise, you could set up your own reverse proxy in front of your app with something like Caddy server (the one I'd most recommend for this). It would be the same process as the services above, except you'd need to maintain and manage the Caddy server, dealing with any issues that come up. Caddy has an admin API you can use. Depending on your budget, scale, and resources you want to devote to this, that could be a good option.

In my personal experience though, it's almost always much cheaper (and easier) to use one of the services. There's a lot of potential pitfalls automating SSL certs in particular for more than a few domains, and the services start at around the price of a small VPS anyways.

Carter
  • 11
  • 1