Hello, I run a saas where our customers can create a booking process. For this, the connection of an own domain is also possible. So it must be possible to point different domains to certain parts of the app. The customers can connect their own domains with an A record. Is that also possible here?

Thanks in advance :)

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.

×
1 answer

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.

As for routing, we pass in the original HTTP Host header with all requests. This should allow your application to differentiate a request addressed to customer-a.com from one addressed to customer-b.com. If you need to route traffic from customer-a.com to your PHP service, and from customer-b.com to your Ruby service, we recommend splitting those into two apps. We have per-domain component routing within the same app on our road-map, but it’s not yet supported.

Lastly, you mention A records. App Platform domains are configured for with CNAMEs. For example, to create www.example.com you would add a CNAME record for www with the target example-app.ondigitalocean.app to your example.com domain zone. For apex domains (without subdomains, ex. example.com), it’s necessary to use CNAME flatting (sometimes called A-NAMEs, or alias records). If the domain is managed by DNS, App Platform will automatically create the alias records. Not all providers support CNAME flattening; NameCheap, and DNSimple are known to work.

  • Hi @cbaker ,
    I am attempting to do a similar thing as written above by lukas.

    What i want is for our customers to be able to forward their domain to our app, without us having to manually add their domains in the app platform. The app will then handle the domain inside the app and configurate the application. Is this possible? I’m currently testing via cloudflare to forward the root and www cname to my domain.ondigitalocean.app, no luck so far.

    Hope you have a solution for me.

    Kind regards,
    Kevin

Submit an Answer