A hostname is a human-readable nickname that is associated with one or more IP addresses.
The term varies depending on the context in which it is used. The term can refer to:
squawky
wiki.gandi.net
, but wiki.gandi.net
can also be said to consist of a local hostname (wiki
) concatenated with a dot with a domain name (gandi.net
).A domain name can be a hostname as long as it has an IP address assigned to it (and meets restrictions on valid host names).
Inversely, a hostname can also be a domain name, provided it is properly organized into the domain name system.
When you create your server on Gandi's website, you are asked to enter a “host name” and password at the end of the process before payment. This “host name” is thus the name of your Gandi server.
Guidelines and suggestions on choosing good hostnames are imparted in RFC 1178, Choosing a Name for Your Computer:
Here are some examples of good hostnames:
galileo
, einstein
, curie
, tesla
…lark
, falcon
, raven
, penguin
, crow
…homer
, marge
, bart
, maggie
, lisa
, selma
…gracehopper
, adalovelace
, sallyride
…You probably want to avoid hostnames like this:
mydomain.tld
(unless you're naming a virtual host)blog
hostname
command displays the name of the current host machine, and can also be used to change or set the hostname. (Run hostname -s
to get just the hostname without the domain information.)