How to deploy so that the same domain is used for React SPA app and Render Web Service?

I have a React SPA deployed on Netlify and a Go Web service deployed on Render.com. I want to be able to deploy the React SPA with the root domain (i.e. example.com) and the Golang Web service on an api subdomain (i.e. api.example.com). I’ve tried tried a couple of things (although I don’t know if I did it properly) and none of them seemed to work out. What would be the best way to go about doing this?

Hi @rndev2017,

You’ll just need to configure a custom domain for each application. See https://render.com/docs/custom-domains for instructions on setting this up in Render.

You can find similar instructions for your Netlify service here https://docs.netlify.com/domains-https/custom-domains/

Let me know if you have any questions about this approach.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.