Is it possible to use the same domain for the backend?

Hello,

I currently have the frontend portion of my web application successfully hosted on a Google domain via Netlify. I am wondering if I could also host my backend on the same domain as well (eg. https://www.webapp.com (client) && https://api.webapp.com (server)). If so, how would I go about doing so? I have tried listing api.webapp.com on my Netlify custom domains but have been unsuccessful in trying to connect my Digital Ocean Droplet to it.

Thanks!
Brian

Hey @qmfkdldjsrla

Yes, you can have webapp.com and www.webapp.com configured to the frontend, and api.webapp.com configured for the backend.

The method of configuration will differ depending on how the domain is configured: using Netlify DNS or using external DNS.

Thanks for the prompt response @coelmay , I’ll definitely give it a go!