What if two droplet have same virtual host?

September 28, 2013 2k views
This is a general question and it makes me very curious. What if two separate droplets have same virtual hosts? for example XYZ.COM is tied to NS1.DIGITALOCEAN.COM, NS2.DIGITALOCEAN.COM, NS3.DIGITALOCEAN.COM and two droplet has virtual hosts for the same server XYZ.COM. What happens? Which droplet owns it in that case
4 Answers
It will go to whatever droplet that the A record for xyz.com is pointing too.
The droplets will have different IP addresses.

The domain will only be tied to one IP, and will therefore only go to one server/droplet
Thanks for the info. How do I control the domain to go to a specific IP? I have a domain in godaddy and all I provide in godaddy is name servers (NS1, NS2). Both the droplets have same Name servers too.

Is there any way I can attach a domain to a specific IP?
Sounds like, based on the nature of your questions, you need to brush up on all that is DNS. Google comes in handy, in that regard.

"How do I control the domain to go to a specific IP?"

You have to create DNS records for your domain. You have a choice on where to manage them: (1) GoDaddy; (2) DigitalOcean's DNS Manager; or (3) yourself.

If you're using DigitalOcean's name servers, check out: How To Create Vanity or Branded Nameservers with DigitalOcean Cloud Servers.
by Etel Sverdlov
This article walks you through setting up the DNS for your site. The tutorial includes steps to set up an A records, point your nameservers, and provides some information about MX records.
Have another answer? Share your knowledge.