Host the backend on the subdomain

Hello. I have a Nodejs + React app and I host my backend on Render. I want to host the backend on the same domain as the frontend. It is important because I need cookies to not be third-party to get them working in safari. How can I host it like that: ?

1 Like

Hey there,

We let you add custom domains to services ( so you could have (www.) on your frontend and then use on the backend.

Alternatively, you could rewrite a path in the static site to your backend to your API, eg /api → and then your React static site can just make requests to /api/someendpoint and it would be responded to by the server the path is being written to.


John B

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