datracka
By:
datracka

Point a Subdomain of the main domain to a secondary droplet

July 21, 2014 1.9k views

Hi there,

I have to droplets:

dataforgood.co (95.85.51.69)
prep.dataforgood.co (146.185.189.143)

and I have a domain "dataforgood.co" which is managed by digital ocean's DNS to resolve the domain name to the main drolet dataforgood.co. its working fine.

BUT, I don' know how to configure the DNS to point the subdomain "prep.dataforgood.co" to the droplet "prep.dataforgood.co" with IP: 146.185.189.143

I created an A record "prep.dataforgood.co -> 146.185.189.143" and a CNAME record "prep -> prep.dataforgood.co" but no results.

the server nevertheless is reachable by IP directly in the browser, so the web server is responding.

it's a DNS issue or I am missing some configuration in my droplet (maybe BIND?) ?

Thanks a lot for your help,
Vicens.

1 Answer

All you need in this case is the A record pointing from prep to the IP address:

prep IN A 146.185.189.143

Check out this article for more info:

How To Set Up and Test DNS Subdomains with DigitalOcean's DNS Panel

by Assaf Gordon
Here's some documentation on how to set up and test DNS subdomains with DigitalOcean's DNS panel.
Have another answer? Share your knowledge.