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 according to the 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 nicknames, 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 a host computer. This is usually a combination of the host's local name with its parent domain's name. For example, "" consists of a local hostname ("en") 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 computer 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 a 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. A hostname may be a domain name, if it is properly organized into the domain name system. A domain name may be a hostname if it has been assigned to an Internet host and associated with the host's IP address.

Restrictions on valid host names

Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "" is a hostname. Each label must be between 1 and 63 characters long, and the entire hostname has a maximum of 255 characters.

RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.

Systems such as DomainKeys and service records use the underscore as a means to assure their special domain names are not confused with hostnames. As a notable example of non-compliance, Windows systems often use underscores in hostnames. Since some systems will reject invalid hostnames while others will not, the use of invalid hostname characters has caused many subtle problems in systems that connect to the wider world. For example, RFC-compliant mail servers will refuse to deliver mail for Windows computers with names containing underscores.

So, the hostname "" is made up of the DNS labels "en", "wikipedia" and "org". 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. The hostname "" terminates with the top-level domain "org" and is thus fully-qualified. Depending on the system, an unqualified hostname such as "compsci" or "wikipedia" 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 automatically qualified by the mail systems so that it is sent to "".

Choosing host names

General guidelines on choosing 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).

Notes and references

See also

External links

  • RFC 952 - "DoD Internet host table specification."
  • RFC 1034 - "DOMAIN NAMES - CONCEPTS AND FACILITIES" (In particular, section 3.5)
  • RFC 1035 - "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION" (In particular, section 2.3.1)
  • RFC 1123 - "Requirements for Internet Hosts - Application and Support."
  • RFC 1178 - "Choosing a Name for Your Computer"
  • RFC 3696 - "Application Techniques for Checking and Transformation of Names"

Search another word or see hostnameon Dictionary | Thesaurus |Spanish
Copyright © 2015, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature