Hostname
What is a hostname?
A hostname is nothing but unique labels assigned to specific devices on a network. This makes it easy for humans in identifying devices on both local networks as well as internet. This name eliminates the need to remember the difficult IP address of a specific computer, printer, or any other systems. The definition of a hostname is pretty clear- it is a readable, human-assigned name of devices that is linked to an IP address.
How does hostname work?
Its working relies on a process known as name resolution (also known as hostname resolutions). The hostname is connected to an IP via DNS (Domain Name System). Actually, whenever a user types this name, the DNS servers automatically search for the matching IP address. This way, computers can find any particular device on a network, which eventually makes communication smoother.
Furthermore, host names work well with local hosts in a local network. Every device connected to a network has a different hostname. Also, when you change it, the DNS records this. This is how the internet comes to know which systems to contact when a user request is made.
Hostname vs. Domain Name
Hostname and domain name are both entirely different terms. As mentioned above hostname is a unique name given to any device by a human. In simple words, it points to a particular printer, router, or computer in a network. Whereas a domain name is the name given to a specific email address or a website. A domain name is globally unique; however, there is no such condition for the hostname.
Pros & Cons
Pros:
- Make device identification simple.
- Remembering is much easier than learning IP addresses.
- Works well in large-sized local networks.
Cons:
- Needs technical skills for proper setup.
- The glitch might occur if DNS servers are down.
- Not work well where IP changes frequently.
Example of Hostname
Let us suppose that a laptop is assigned the name Ankita-pc manually. This is a hostname. Now, when this device is connected to local Wi-Fi, the other devices on the local networks will find this laptop via the name Ankita-pc in place of the IP address. Also, changing the hostname is pretty easy. It can be done in seconds by altering simple settings.