Question

What is the Droplet Hostname?

  • Posted August 31, 2013

When creating a droplet, you have to fill in a “Hostname”. I’m a newbie and curious what it’s used for and what it is. Is it just what separates each droplet from each other or is it much more then that? Isn’t the hostname supposed to be “Localhost”? I’m really confused!

Subscribe
Share

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.

Think of it in this context:<br/><br/>Imagine a large [western] family. Instead of humans, however, picture a cluster of computers. Just as every person in a family has a common last name and a different first name…<br/><ul><li>hostname is to domain name (in the networking world) as a person’s first name is to that person’s lastname/family-name.</li> <br></ul>Have you ever heard the saying, <b>Don’t put all your eggs in one basket</b>? Among other reasons, a computer admin. may wish to distribute various tasks across multiple (cloud) servers, e.g. pop.yourdomain.tld; smtp.yourdomain.tld; www.yourdomain.tld; cdn.yourdomain.tld; ns1.yourdomain.tld; ns2.yourdomain.tld; loadbalancer1.yourdomain.tld; loadbalancer2.yourdomain.tld; and so on.<br/><br/>In this example, the <b>xxx</b> in <b>xxx.yourdomain.tld</b> is the hostname. Where you’re getting confused, I believe, is that every host, e.g. cdn.yourdomain.tld, can have more than one hostname (or, host alias); hence, why you often see the reference to <b>localhost</b> on EVERY computer or cloud instance.<br/><br/>Our friends @ Google are also usually very helpful with questions such as this.

Think of it in this context:<br/><br/>Imagine a large [western] family. Instead of humans, however, picture a cluster of computers. Just as every person in a family has a common last name and a different first name…<br/><ul><li>hostname is to domain name (in the networking world) as a person’s first name is to that person’s lastname/family-name.</li> <br></ul>Have you ever heard the saying, <b>Don’t put all your eggs in one basket</b>? Among other reasons, a computer admin. may wish to distribute various tasks across multiple (cloud) servers, e.g. pop.yourdomain.tld; smtp.yourdomain.tld; www.yourdomain.tld; cdn.yourdomain.tld; ns1.yourdomain.tld; ns2.yourdomain.tld; loadbalancer1.yourdomain.tld; loadbalancer2.yourdomain.tld; and so on.<br/><br/>In this example, the <b>xxx</b> in <b>xxx.yourdomain.tld</b> is the hostname. Where you’re getting confused, I believe, is that every host, e.g. cdn.yourdomain.tld, can have more than one hostname (or, host alias); hence, why you often see the reference to <b>localhost</b> on EVERY computer or cloud instance.<br/><br/>Our friends @ Google are also usually very helpful with questions such as this.

A droplet/server’s hostname is basically its name. You can name it anything you want, such as your domain name or the name of a Greek god ;) <br> <br>Your IP’s PTR/rDNS record is set to your droplet’s hostname so if you’re going to run a mailserver you have to set it to your FQDN.

For me, the public IP was the hostname. I used it to find the “host” “hash” with: ssh-keygen -H -F <my.ip.was.here>

can I use the same hostname for different droplets?

When using a FQDN do you also need to create an A record for the name that you pick?

Thanks pablo for your detailed answer … You are really good it helped me alot .