Report this

What is the reason for this report?

Pointing DNS record (A) to specific part of my Droplet

Posted on September 30, 2020

I’m running a simple backend using Python (flask) and I have set up an api which returns something on my droplet. I can access it by: http://<droplet-ip>/<app_route>. This works great but for the sake of not just giving out my server’s ip directly to everyone I wanted to add my domain to it. I have set my domain’s DNS records to DigitalOcean a while ago (over a month ago) and now I want to use it.

I created an A record with example.mydomain.com and pointed it to my droplet. How do I make it so example.mydomain.com routes to the previously mentioned http://<droplet-ip>/<app_route>?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.