What should be the IP Address for new domains under a droplet?

Posted February 28, 2016 2.2k views
UbuntuGetting StartedDNS

I just set up a droplet and got its IP address. Now, I know for adding a domain under this droplet: I need to update the name servers of my domain from domain registrar. I did it.

1. Now, coming back to domain configurations, the hostname equals my domain name but, what is the meaning of custom Ip or droplet ip there?
3. Secondly, when I’ll sub domain under that domain then, hostname equals my subdomain.mydomain.etc but again, what would be the IP address next to it?

Please, clear me with these confusions.
Looking forward to a response. Thank you!

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.

Submit an Answer
1 answer

Hey there,

All the domains hosted on a Droplet would point to the same IP address. The web server software will interpret requests and send users to the right websites. If you are using Apache as your web server, this type of configuration is referenced as VirtualHosts. Here is a tutorial that talks about setting up virtualhosts on a Droplet, in other words, multiple sites hosted on a single Droplet.

Happy coding,

Jon Schwenn
Platform Support Specialist

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.