Hostname explained

A hostname (occasionally also, a sitename) is the unique name by which a network-attached device (which could consist of a computer, file server, network storage device, fax machine, copier, cable modem, etc.) is known on a network. The hostname is used to identify a particular host in various forms of electronic communication such as the World Wide Web, e-mail or Usenet.

On the Internet, the terms "hostname" and "domain name" are often used interchangeably, but there are subtle technical differences between them.


Hostnames are used by various naming systems, NIS, DNS, SMB, etc., and so the meaning of the word hostname will vary depending on naming system in question, which in turn varies by type of network. A hostname meaningful to a Microsoft NetBIOS workgroup may be an invalid Internet hostname. When presented with a hostname and no context, it is usually safe to assume that the network is the Internet and DNS is the hostname's naming system.

Host names are typically used in an administrative capacity and may appear in computer browser lists, active directory lists, IP address to hostname resolutions, email headers, etc. They are human-readable nick-names, which ultimately correspond to unique network hardware MAC addresses. In some cases the host name may contain embedded domain names and/or locations, non-dotted IP addresses, etc.

On a simple local area network, a hostname is usually a single word: for instance, an organization's CVS server might be named "cvs" or "server-1".

Internet hostnames

On the Internet, a hostname is a domain name assigned to the host. This is usually a combination of the host's local name with its parent domain's name. For example, "" consists of a hostname ("www") and the domain name "". This kind of hostname is translated into an IP address via the local hosts file, or the Domain Name System (DNS) resolver. It is possible for a single host to have several hostnames; but generally the operating system of the host prefers to have one hostname that the host uses for itself.

Any domain name can also be hostname, as long as the restrictions mentioned below are followed. So, for example, both "" and " are hostnames because they both have IP addresses assigned to them. The domain name "" is not a hostname since it does not have an IP address, but "" is a hostname. All hostnames are domain names, but not all domain names are hostnames.

Restrictions on valid host names

Hostnames, like all domain names, are made up of a series of "labels", with each label being separated by a dot. Each label must be between 1 and 63 characters long, and there is a maximum of 255 characters when all labels are combined.

Unlike domain names, hostname labels can only be made up of the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Labels can not start nor end with a hyphen. Special characters other than the hyphen (and the dot between labels) are not allowed, although they are sometimes used anyway. Underscore characters are commonly used by Windows systems but according to RFC 952 they are not allowed and several systems, such as DomainKeys and the SRV record deliberately use the underscore to make sure their special domain names are not confused with a hostname. Since some systems will check to make sure that hostnames contain only valid characters and others do not, the use of the invalid characters such as the underscore has caused many subtle problems in systems that connect to the wider world.

So, the hostname "" is made up of the DNS labels "www", "web-hosting-top" and "com". Labels such as "2600" and "3com" can be used in hostnames, but "-hi-" and "*hi*" are invalid.

A hostname is considered to be a fully qualified domain name (FQDN) if all the labels up to and including the top-level domain name (TLD) are specified. Depending on the system, an unqualified hostname such as "compsci" or "web-hosting-top" may be combined with default domain names in order to determine the fully qualified domain name. So, a student at Harvard may be able to send mail to "joe@compsci" and have it sent to

Choosing host names

General guidelines on choosing a good hostnames are outlined in RFC 1178. The folklore interest of hostnames stems from the creativity and humour they often display. Interpreting a sitename is not unlike interpreting a vanity licence plate; one has to mentally unpack it, allowing for mono-case and length restrictions and the lack of whitespace. Hacker tradition deprecates dull, institutional-sounding names in favour of punchy, humorous, and clever coinages (except that it is considered appropriate for the official public gateway machine of an organisation to bear the organisation's name or acronym). Mythological references, cartoon characters, animal names, and allusions to sci-fi or fantasy literature are probably the most popular sources for sitenames (in roughly descending order). The obligatory comment is Harris's lament: "All the good ones are taken!"

It is often possible to guess a hostname for a particular institution. This is useful if you want to know if they operate network services like anonymous FTP, World-Wide Web or finger. First try the institution's name or obvious abbreviations thereof, with the appropriate domain appended, e.g. "". If this fails, prepend "ftp." or "www." as appropriate, e.g. "". You can use the ping command as a quick way to test whether a hostname is valid.

<-- Previous | Home Glossary | Next -->

📣 Latest tweets mentioning Hostname

📖 Latest blogs mentioning Hostname

🏆 Alexa 770,715 - 📅 - SmarterMail Build 8853 - Build 8853 Added: Domain Hostnames to the auto-SSL process. Fixed: isn't accepted as a top-level domain suffix for eM Client. Fixed: An email with attachments loses its attachments on forward if a draft is saved prior to sending. Fixed: An ...
🏆 Alexa 1,094,199 - 📅 - Oscoda server - Correction: The new IP address is UPDATE 4: the rebuild of the drives on the old server is going to take a very long time. We have a new server online and are restoring accounts to that server. The server's hostname is ... Icon 🏆 Alexa 118,485 - 📅 - Change Hostname on Ubuntu 20.04 - The Device's hostname is a critical identifier, facilitating seamless navigation and maintenance within complex network infrastructures. This comprehensive guide dives deep into the essence of managing hostnames within Ubuntu 20.04, offering a ...
🏆 Alexa 5,601,953 - 📅 - How to Fix the “unable to resolve host” Error on Linux - After changing the hostname on your Linux system, you may encounter the error “unable to resolve host”. Here’s what that means, and what you can do to fix it. What Is a Hostname, and How Do You Change It? When you set up your Linux system—whether ... Icon 🏆 Alexa 15,884 - 📅 - Hostname vs Domain Name: What’s the Difference?  - Hostnames are devices or services within a domain, while domain names are addresses to locate them on the Internet. A guide to hostname vs domain name. The post Hostname vs Domain Name: What’s the Difference? appeared first on OnlyDomains Blog. Icon 🏆 Alexa 54,909 - 📅 - How to Install SSL on cPanel Hostname {Easy Steps} - Install SSL on cPanel hostname with an SSL (Secure Sockets Layer) certificate is crucial for protecting your site’s traffic through encryption. This guide focuses on installing an SSL certificate on a cPanel hostname, ensuring secure access to your ... Icon 🏆 Alexa 683,105 - 📅 - How To Change The Hostname in Centos 7. - Step 1: Open a terminal window. You can do this by pressing 'Ctrl + Alt + T' or by accessing the terminal from the Applications menu. Step 2: To check the current hostname, you can use the following command:- # [ hostname ] Step 3: To change the ...

📋 Latest news about Hostname

Netcraft Sees Steady Hostname Growth - 📅 - Internet research firm Netcraft ( announced on Monday it had released the results of its October Web Server Survey, receiving responses from 97,932,447 sites, an increase of 1.08 million from last month. That moderate growth follows four straight months of significant gains, ensuring ...