What is the Droplet Hostname?

Posted August 31, 2013 36.8k views
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!

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
6 answers
Think of it in this context:

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...
  • hostname is to domain name (in the networking world) as a person's first name is to that person's lastname/family-name.

Have you ever heard the saying, Don't put all your eggs in one basket? 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.

In this example, the xxx in xxx.yourdomain.tld 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 localhost on EVERY computer or cloud instance.

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 ;)

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.
Thanks pablo for your detailed answer .. You are really good it helped me alot .
When using a FQDN do you also need to create an A record for the name that you pick?

can I use the same hostname for different droplets?

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