HOME

TheInfoList



OR:

In
computer networking A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
, a hostname (archaically nodename) is a label that is assigned to a device connected to a
computer network A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
and that is used to identify the device in various forms of electronic communication, such as the
World Wide Web The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
. Hostnames may be simple names consisting of a single word or phrase, or they may be structured. Each hostname usually has at least one numeric
network address A network address is an identifier for a node or host on a telecommunications network. Network addresses are designed to be unique identifiers across the network, although some networks allow for local, private addresses, or locally administere ...
associated with it for routing packets for performance and other reasons.
Internet The Internet (or internet) is the Global network, global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a internetworking, network of networks ...
hostnames may have appended the name of a
Domain Name System The Domain Name System (DNS) is a hierarchical and distributed name service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks. It associates various information ...
(DNS) domain, separated from the host-specific label by a period ("dot"). In the latter form, a hostname is also called a
domain name In the Internet, a domain name is a string that identifies a realm of administrative autonomy, authority, or control. Domain names are often used to identify services provided through the Internet, such as websites, email services, and more. ...
. If the domain name is completely specified, including a
top-level domain A top-level domain (TLD) is one of the domain name, domains at the highest level in the hierarchical Domain Name System of the Internet after the root domain. The top-level domain names are installed in the DNS root zone, root zone of the nam ...
of the Internet, then the hostname is said to be a
fully qualified domain name A fully qualified domain name (FQDN), sometimes also called an absolute domain name, is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System (DNS). It specifies all domain levels, including the top-level ...
(FQDN). Hostnames that include DNS domains are often stored in the Domain Name System together with the
IP address An Internet Protocol address (IP address) is a numerical label such as that is assigned to a device connected to a computer network that uses the Internet Protocol for communication. IP addresses serve two main functions: network interface i ...
es of the host they represent for the purpose of mapping the hostname to an address, or the reverse process.


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, ''en.wikipedia.org'' consists of a local hostname (''en'') and the domain name ''wikipedia.org''. This kind of hostname is translated into an IP address via the local
hosts file The computer file hosts is an operating system file that maps hostnames to IP addresses. It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for th ...
, or the
DNS resolver The Domain Name System (DNS) is a hierarchical and distributed name service that provides a naming system for computers, services, and other resources on the Internet or other Internet Protocol (IP) networks. It associates various informatio ...
. It is possible for a single host computer to have several hostnames but generally, the
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
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 ''en.wikipedia.org'' and ''wikipedia.org'' are hostnames because they both have IP addresses assigned to them. 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.


Syntax

Hostnames are composed of a sequence of
labels A label (as distinct from signage) is a piece of paper, plastic film, cloth, metal, or other material affixed to a container or product. Labels are most often affixed to packaging and containers using an adhesive, or sewing when affixed to ...
concatenated with dots. For example, "en.wikipedia.org" is a hostname. Each label must be 1 to 63
octets Octet may refer to: Music * Octet (music), ensemble consisting of eight instruments or voices, or composition written for such an ensemble ** String octet, a piece of music written for eight string instruments *** Octet (Mendelssohn), 1825 compos ...
long.RFC 1034, Section 3.1 "Name space specifications and terminology"
/ref> The entire hostname, including the delimiting dots, has a maximum of 253
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
characters. The Internet standards (
Request for Comments A Request for Comments (RFC) is a publication in a series from the principal technical development and standards-setting bodies for the Internet, most prominently the Internet Engineering Task Force (IETF). An RFC is authored by individuals or ...
) for protocols specify that labels may contain only the ASCII letters ''a'' through ''z'' (in a case-insensitive manner), the digits ''0'' through ''9'', and the hyphen-minus character ('-'). The original specification of hostnames required that labels start with an alpha character and not end with a hyphen. However, a subsequent specification permitted hostname labels to start with digits.
Internationalized domain name An internationalized domain name (IDN) is an Internet domain name that contains at least one label displayed in software applications, in whole or in part, in non-Latin script or alphabet or in the Latin alphabet-based characters with diacrit ...
s are stored in the Domain Name System as ASCII strings using
Punycode Punycode is a representation of Unicode with the limited ASCII character subset used for Internet hostnames. Using Punycode, host names containing Unicode characters are transcoded to a subset of ASCII consisting of letters, digits, and hyphens, w ...
transcription.RFC 3492, ''Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)'', A. Costello, The Internet Society (March 2003) While a hostname may not contain other characters, such as the underscore character (''_''), other DNS names may contain the underscore. Systems such as DomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example, ''_http._sctp.www.example.com'' specifies a service pointer for an
SCTP The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the ...
-capable webserver host (www) in the domain ''example.com''. Notwithstanding the standard, Chrome,
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curr ...
,
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
,
Edge Edge or EDGE may refer to: Technology Computing * Edge computing, a network load-balancing system * Edge device, an entry point to a computer network * Adobe Edge, a graphical development application * Microsoft Edge, a web browser developed by ...
, and
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
allow underscores in hostnames, although cookies in IE do not work correctly if any part of the hostname contains an underscore character. However, it is valid to attempt to resolve a hostname that consists of an underscore. E.g. ''_.example.com''. This is used by RFC 7816 to reduce the amount of information that is made available to intermediate DNS servers during an iterative query. The Query Name Minimisation feature is enabled by default in
BIND BIND () is a suite of software for interacting with the Domain Name System (DNS). Its most prominent component, named (pronounced ''name-dee'': , short for ''name Daemon (computing), daemon''), performs both of the main DNS server roles, acting ...
9.14.0. The hostname ''en.wikipedia.org'' is composed of the DNS labels ''en'' (hostname or leaf domain), ''wikipedia'' (second-level domain), and ''org'' (top-level domain). Labels such as ''2600'' and ''3abc'' may be used in hostnames, but ''-hi-'', ''_hi_,'' and ''*hi*'' are invalid. A hostname is considered to be a fully qualified domain name (FQDN) when all labels up to and including the top-level domain name (TLD) are specified. The hostname ''en.wikipedia.org'' terminates with the top-level domain ''org'' and is thus fully qualified. Depending on the operating system DNS software implementation, an unqualified hostname may be automatically combined with a default domain name configured into the system in order to complete the fully qualified domain name. As an example, a student at
MIT The Massachusetts Institute of Technology (MIT) is a private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of modern technology and sc ...
may be able to send mail to "joe@csail" and have it automatically qualified by the mail system to be sent to ''joecsail.mit.edu''. General guidelines on choosing a good hostname are outlined in RFC 1178.


Example

''saturn'' and ''jupiter'' may be the hostnames of two devices connected to a network named ''PC''. Within ''PC'', the devices are addressed by their hostnames. The domain names of the devices are ' and ', respectively. If ''PC'' is registered as a second-level domain name in the Internet, e.g., as ', the hosts may be addressed by the fully qualified domain names ' and '.


See also

* Domain hijacking


References

{{Reflist Computer networking Identifiers