Hostname

Last Edited

by

in

Host Name is an alias given to a computer on a TCP/IP network to identify it on the network.

What is Hostname?

Hostname is an alias given to a computer on a TCP/IP network to identify it on the network. Hostnames are a friendlier way of identifying TCP/IP hosts than IP addresses, and hostnames can be resolved into IP addresses by host name resolution using a DNS server or hosts files.

Hostname
Hostname

Hostnames can include the characters a–z, A–Z, 0–9, period, and dash (-). To ensure full compatibility with the Domain Name System (DNS), do not use any other special characters in hostnames.

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, or the Domain Name System (DNS) resolver. It is possible for a single host computer to have several hostnames; but generally the operating system 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.

Hostname Restrictions

Hostnames are composed of a series of labels concatenated with dots. For example, “en.wikipedia.org” is a hostname. Each label must be from 1 to 63 characters long, and the entire hostname including the delimiting dots, but not a trailing dot, has a maximum of 253 ASCII characters.

The Internet standards (Requests for Comments) for protocols mandate that component hostname 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 in RFC 952 mandated that labels could not start with a digit or with a hyphen-minus character and could not end with a hyphen-minus. However, a subsequent specification (RFC 1123) permitted hostname labels to start with digits. No other symbols, punctuation characters, or white space are permitted. Internationalized domain names are stored in the Domain Name System as ASCII strings using Punycode transcription.

TIP


To find out the hostname of a computer running Windows, just type hostname at the command prompt.

hostname command
hostname command (all Windows OS, including Windows 10)

Search