Jump to content

Hostname

From Wikipedia, the free encyclopedia

Incomputer networking,ahostname(archaicallynodename[1]) is a label that is assigned to a device connected to acomputer networkand that is used to identify the device in various forms of electronic communication, such as theWorld Wide Web.Hostnames may be simple names consisting of a single word or phrase, or they may be structured. Each hostname usually has at least one numericnetwork addressassociated with it for routing packets for performance and other reasons.

Internethostnames may have appended the name of aDomain Name System[2](DNS) domain, separated from the host-specific label by a period ( "dot" ). In the latter form, a hostname is also called adomain name.If the domain name is completely specified, including atop-level domainof the Internet, then the hostname is said to be afully qualified domain name(FQDN). Hostnames that include DNS domains are often stored in the Domain Name System together with theIP addressesof the host they represent for the purpose of mapping the hostname to an address, or the reverse process.

Internet hostnames

[edit]

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.orgconsists of a local hostname (en) and the domain namewikipedia.org.This kind of hostname is translated into an IP address via the localhosts file,or theDNS resolver.It is possible for a single host computer to have several hostnames but generally theoperating systemof 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, bothen.wikipedia.organdwikipedia.orgare 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.[3]

Syntax

[edit]

Hostnames are composed of a sequence oflabelsconcatenated with dots. For example, "en.wikipedia.org" is a hostname. Each label must be 1 to 63octetslong.[2]The entire hostname, including the delimiting dots, has a maximum of 253ASCIIcharacters.[4]

The Internet standards (Request for Comments) for protocols specify that labels may contain only the ASCII lettersathroughz(in a case-insensitive manner), the digits0through9,and the hyphen-minus character ('-'). The original specification of hostnames required that labels start with an alpha character and not end with a hyphen.[5]However, a subsequent specification permitted hostname labels to start with digits.[6]Internationalized domain namesare stored in the Domain Name System as ASCII strings usingPunycodetranscription.[7]

While a hostname may not contain other characters, such as the underscore character (_), other DNS names may contain the underscore.[8][9][10]Systems such asDomainKeysandservice recordsuse the underscore as a means to assure that their special character is not confused with hostnames. For example,_http._sctp.www.example.comspecifies a service pointer for anSCTP-capable webserver host (www) in the domainexample.com.Notwithstanding the standard,Chrome,Firefox,Internet Explorer,Edge,andSafariallow underscores in hostnames, although cookies in IE do not work correctly if any part of the hostname contains an underscore character.[11]

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.[12]The Query Name Minimisation feature is enabled by default inBIND9.14.0.[13]

The hostnameen.wikipedia.orgis composed of the DNS labelsen(hostname or leaf domain),wikipedia(second-level domain), andorg(top-level domain). Labels such as2600and3abcmay 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 hostnameen.wikipedia.orgterminates with the top-level domainorgand 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 atMITmay be able to send mail to "joe@csail" and have it automatically qualified by the mail system to be sent tojoe@csail.mit.edu.

General guidelines on choosing a good hostname are outlined in RFC 1178.[14]

Example

[edit]

saturnandjupitermay be the hostnames of two devices connected to a network namedPC.WithinPC,the devices are addressed by their hostnames. The domain names of the devices aresaturn.PCandjupiter.PC,respectively. IfPCis registered as a second-level domain name in the Internet, e.g., asPC.net,the hosts may be addressed by the fully qualified domain namessaturn.PC.netandjupiter.PC.net.

See also

[edit]

References

[edit]
  1. ^System V/AT Runtime System.Microport.
  2. ^abRFC 1034, Section 3.1 "Name space specifications and terminology"
  3. ^"Difference Between Hostname and Domain Name".11 December 2020.Retrieved2024-06-20.[better source needed]
  4. ^Chen, Raymond (12 April 2012)."What is the real maximum length of a DNS name?".Microsoftdevblog.Archived fromthe originalon 18 May 2019.Retrieved31 July2019.
  5. ^DOD Internet Host Table Specification.October 1985.doi:10.17487/RFC0952.RFC952.
  6. ^Requirements for Internet Hosts -- Application and Support.October 1989.doi:10.17487/RFC1123.RFC1123.
  7. ^RFC 3492,Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA),A. Costello, The Internet Society (March 2003)
  8. ^"Underscores in DNS".Retrieved2011-07-20.
  9. ^"Common DNS Operational and Configuration Errors".Retrieved2018-08-21.
  10. ^Elz, Robert;Bush, Randy(July 1997)."Name syntax".Clarifications to the DNS Specification.IETF.p. 13. sec. 11.doi:10.17487/RFC2181.RFC2181.RetrievedMay 23,2024.
  11. ^Internet Explorer Cookie Internals (FAQ)
  12. ^DNS Query Name Minimisation to Improve Privacy.doi:10.17487/RFC7816.RFC7816.
  13. ^"QNAME Minimization and Your Privacy".6 March 2019.Retrieved2019-07-17.
  14. ^Libes, D. (August 1990)."Choosing a Name for Your Computer".Ietf Datatracker.IETF (Integrated Systems Group/NIST).Retrieved21 November2021.