A hostname is a label assigned to a device (a host) on a network. It distinguishes 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 new laptop, Guest-Desktop, or FamilyPC.
A computer’s hostname may instead be referred to as a computer name, sitename, 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 with its hostname written off to the side:
- www.google.com: www
- images.google.com: images
- products.office.com: products
- www.microsoft.com: www
The hostname (like products) is the text that precedes the domain name (for example, office), which is the text that comes before the top-level domain (.com).
How to Find a Hostname in Windows
Executing hostname from the Command Prompt is the easiest way to show the hostname of a computer.
Using the ipconfig command to execute ipconfig /all is another method. Those results are 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 your hostname and 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 through System Properties, which also lets you change the hostname.
More About Hostnames
Hostnames can’t contain a space because these names can only be alphabetical or alphanumerical. A hyphen is the only allowed symbol.
The www portion of a URL indicates a subdomain of a website, similar to products being a subdomain of office.com.
To access google.com’s images section, you must specify the images hostname in the URL. Likewise, the www hostname is always required unless you’re after a specific subdomain.
For example, entering www.lifewire.com is technically always required instead of only lifewire.com. This is why some websites are unreachable unless you enter the www portion before the domain name.
However, most websites you visit open without specifying the www hostname—either because the web browser does it for you or because the website knows what you’re after.