The hostname is a freely selectable name for a host. For example, you could call a server in a company network responsible for the central administration of emails “mail” or “mail123”.
However, if a computer needs to be available over the internet as well as locally, the hostname needs to be supplemented by information that indicates what part of the internet the computer is located in. In the internet, computers can be uniquely assigned using a combination of hostname and domain. These uniquely identifiable name chains are known as a “Fully Qualified Domain Name“ (FQDN). An example of an FQDN would be:
mail123.example.com.
If you read the terms of the hierarchy from right to left, you can recognize the components of the FQDN in the following order: root label (empty), top level domain (.com), second level domain (example) and hostname (mail123).
An FQDN is a human-readable form of addressing. Unlike humans, computers work with numerical IP addresses to uniquely identify computers on the internet. Within the framework of a website visit, an intermediate step is necessary so that the alphanumeric domain can be translated into a numeric IP address.
The domain name system (DNS) is responsible for this name resolution. The entered domain is assigned to the corresponding IP address and then the searched-for page is called up. The purpose of this system is so that humans do not have to enter the IP address every time they visit a website, but can use a name that will be easier to remember instead.