Hostname
Definition
Hostname (formerly nodename) is a unique term that identifies individual computers, servers, or nodes within networks. Both local area networks (LANs) and wide area networks (WANs), such as the internet, use hostnames. With the rise of the internet, assigning unique hostnames was one of the basic requirements that allowed computers to communicate with each other as part of a network. The hostname initially consisted of a simple sequence of alphanumeric characters and optionally a hyphen.
In the context of websites, the domain name is appended to the actual hostname to ensure a unique assignment. A period separates the domain from the host-specific name. Thus, for the URL https://www.example.com the domain name would be example.com and the hostname would be www, which is the usual host for web servers. Another possible hostname would be m, for example, as the name for servers providing websites for mobile devices. Mail servers, on the other hand, often have the name mail.
If the domain name is complete, as above, including the top-level domain (.com), it is called a fully qualified domain name, FQDN.
Hostnames containing DNS domains are stored in the Domain Name System (DNS), along with the IP addresses of the host they represent. This system assigns host names to IP addresses and vice versa.
== How do hostnames work? ??
Since the early days of network technology, it has been considered user-friendly to assign a hostname to a computer or server while the computer maintained its internal host number or network address. The true "name" a computer needs to communicate within a network is actually just a set of numbers, the IP address. Early computers used small integers as their host number on the internet. One of the first internet “Request for Comments” (RFC), named “Standardizing Host Mnemonics”, lists the table with all associated host numbers and hostnames for the first computers connected to the internet. This table was stored in a file called HOST.TXT on each computer that wanted to communicate with other computers on the web.
While the original file was only 20 entries long, it quickly became clear that this solution was not scalable or flexible enough to handle the rapidly growing number of host computers and servers connected to the Internet. To address the problem of connecting all new devices, DNS was developed.
The Domain Name System is similar to a phone book. Each IP address required for communication between network computers is linked to a readable and memorable name in the DNS. TCP/IP, the main protocol used by the Internet, requires each computer to have a network IP address that follows certain rules to ensure its uniqueness and validity. However, the IP address cannot determine a computer’s assigned function within a network. As a result, each computer receives a hostname with its own IP address so that it can be uniquely addressed in the network.
Policies for hostname assignment
There is no standard format for local network hostnames; they can be assigned free of conventions. However, they may not contain spaces or special characters such as commas, periods, or apostrophes.
The rules for public hostnames were first standardized in the original hostname specification "DoD Internet Host Table Specification". This standard said that the name should be a text string consisting of the letters A through Z (case sensitive), the digits 0 through 9, the minus sign (-), and the period (.). To date, no spaces are allowed as part of a host name. The first character had to be a letter and the last character could not be a minus sign or a period. It was also recommended not to exceed 24 characters.
However, this protocol, known as RFC 953, was replaced in 1989 by the newer RFC 1123. Since then, the first character can be either a letter or a number, the domain name must not end with a hyphen, and it can be up to 63 characters long.