Also called a computer name, nodename, or sitename, a hostname is the name of a computer or device (host) on a network.

Hostname examples

Below is an example of a hostname that is assigned to a computer connecting to the Internet using Comcast.

  • Hostname examples.
  • How to see a computer’s hostname.
  • Hostname rules and restrictions.
  • Should I use “host name” or “hostname” in my writing?
  • Related information.

c-61-123-45-67.hsd1.co.comcast.net

In this example, the hostname has the IP address (61.123.45.67), “CO” for Colorado, and comcast.net, which is the ISP hosting the customer. This type of hostname would be stored in a Domain Name System to help with mapping the hostname to an address.

Local network hostname example

Another example would be a local network called “hope” with two computers on that network called “bart” and “homer.” On this network, the “bart” computer would have a hostname “bart.hope” and the “homer” computer would have the hostname “homer.hope.”

Internet hostname examples

On the Internet, a hostname is a domain name assigned to a host computer. For example, if Computer Hope had two computers on its network named “bart” and “homer,” the domain name “bart.computerhope.com” is connecting to the “bart” computer. The IP address of the “bart” computer is obtained by looking up the hostname “bart.computerhope.com” in the host’s file or DNS resolver.

How to see a computer’s hostname

There are many different ways to determine a computer’s hostname. On a Microsoft Windows computer, you can open the command line and run the hostname, ipconfig /all, or net view commands.

When referring to an Internet web page (e.g., computerhope.com) or Internet location, a hostname is more often called a domain name. If the domain name includes a TLD (top-level domain), then the hostname is an FQDN (fully qualified domain name).

  • Windows command line hostname command help.
  • Windows command line ipconfig command help.
  • Windows command line net command help.
  • How to find and change my computer’s name.

In the Linux command line, you can run the hostname command to view and set the hostname on the computer.

  • Linux hostname command help.

Hostname rules and restrictions

Below are a few rules and restrictions that must be followed for a hostname to be valid.

  • A hostname is a single word with no spaces.
  • A hostname may only have letters, numbers, periods, or a hyphen.
  • A hostname has a maximum length of 253 characters.
  • A DNS (Domain Name System) name may be appended to a hostname.
  • The hostname cannot have an underscore. However, an appended DNS contained in the hostname may have an underscore.
  • The early hostname specification in RFC 952 required that a hostname not begin with a number or hyphen character. However, this restriction was later changed in RFC 1123.
  • Further recommendations on naming a computer are also on RFC 1178.

Should I use “host name” or “hostname” in my writing?

When referring to a computer on a network, “hostname” should be written as one word with no space unless referencing a product that uses the two-word form.

A hostname can have uppercase or lowercase characters. However, some tools and systems ignore case and consider everything lowercase. We recommend always using lowercase characters in hostnames to prevent any possible problems or confusion.

DNS, Domain name, Host computer, Localhost, Network terms, rDNS

The Microsoft ipconfig, systeminfo, and other command line commands use “Host name” in the output.

  • See our system information script to view your hostname and other system settings.
  • Network and network card help and support.