Subdomain / DNS records setup on a single Ubuntu 18.04 droplet running with Django, Postgres, Nginx, Gunicorn


When I first created an Ubuntu 18.04 droplet I used domain name as and successfully completed all the steps documented here

and I did not use, and any where in any of the steps. I only used IP address.

Since my requirement is to use this droplet only for subdomain, I changed domain name from to ‘’.

My requirement is to setup another droplet for production to launch the site with domain name ‘’.

Now I need to install ‘TLS/SSL certificates’ by following steps documented here

But I need to setup all DNS records required for subdomain ‘’ so that we can use this domain during development of the application.

Note: the domain name ‘’ is registered with godaddy and I already pointed DO nameservers for this domain.

Could someone point right steps for adding DNS records for both main and subdomains to achieve my requirement.



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hello Alex,

Thank you for answering my question. Yes I’ve done what you suggested, but my requirement is to operate and independently as replicated hosts. That means both the sites will be accessible publicly.

I’m adding here details of the droplet that is created and configured so far. Production droplet is yet to be bought.

  1. Ubuntu 18.x droplet was created successfully
  2. Add the domain as
  3. Updated the domain at Godaddy with DO nameservers
  4. Created DNS records as follows 4.1. NS record is pointed to ns1,ns2, with hostname as ‘’ 4.2. A record with hostname: with value = ip1 4.3. A record with hostname: with value = ip1 4.4. CAA record with hostname: with value = 4.5. CAA record with hostname: with value = 4.6. MX record with hostname: with value =

Hope the above are correct and I would like to know what should be settings for production settings by considering the above is running in parallel. Sorry for my long question.

Best regards

Hello, @bengaltiger

If you’re using GoDaddy’s nameservers for you domain name than you can make the DNS change from their DNS control panel. Basically you need to make sure that the A record is pointed to the IP address of your droplet. The same goes for the subdomain -, the A record of the subdomain needs to be pointed to the IP address of your droplet/server.

Hope this helps. Let me know if you have any questions.

Regards, Alex