What is a Hostname?

A hostname is the label (the name) assigned to a device (a host) on a network and is used to distinguish one device from another on a specific network or over the Internet.

The hostname for a computer on a home network may be something like a new laptopGuest-Desktop, Servers or FamilyPC.

Hostnames are also used by DNS servers so you can access a website by a common, easy-to-remember name to avoid having to remember a string of numbers (an IP address) just to open a website. For example, in the URL pcsupport.about.com, the hostname is PC support. More examples are shown below. A computer’s hostname may instead be referred to as a computer namesitename, or nodename. You may also see hostname spelled as host name.

Examples of a Hostname

Each of the following is an example of a Fully Qualified Domain Name (FQDN) with its hostname written off to the side:

  • pcsupport.nocroom.com: pcsupport
  • www.google.com: www
  • images.google.com: images
  • products.nocroom: products
  • www.nocroom.com: www

As you can see, the hostname (like pcsupport) is simply the text the precedes the domain name (e.g. about), which is, of course, the text that comes prior to the top-level domain (com).

How to Find a Hostname in Windows

Executing hostname from the Command Prompt is by far the easiest way to show the hostname of the computer that you’re working on.

Never used Command Prompt before? See my How To Open Command Prompt tutorial for instructions.

This method works in a terminal window in other operating systems too, like Mac OS X and Linux.

Using the ipconfig command to execute ipconfig /all is another method, but those results are a lot more detailed and include information in addition to the hostname that you might not be interested in.

The net view command, one of the several net commands, is another way to see not only your own hostname, as well as the hostnames of other devices and computers on your network.

How to Change a Hostname in Windows

Another easy way to see the hostname of the computer you’re using is via System Properties, which also lets you change the hostname.

System Properties can be accessed via the Advanced system settings link inside the System applet in Control Panel, but can also be launched by executing controlsysdm.cpl from Run or the Command Prompt.

More About Hostnames

Hostnames can not contain a space, as they can only be alphabetical or alphanumerical. A hyphen is the only allowed symbol.

The www portion of a URL is actually indicating a subdomain of a website, similar to pcsupport being a subdomain of About.com, and images being one of the subdomains of Google.com.

To access About.com’sSupport section, you must specify the pcsupport hostname in the URL. Likewise, the www hostname is always required unless you’re after a specific subdomain (like images or pcsupport).

For example, entering www.about.com is technically always required instead of just about.com. This is why some websites are unreachable unless you enter out the www portion before the domain name.

However, most websites you visit will still open without specifying the www hostname – either because the web browser does it for you or because the website knows what you’re after.