A hostname is a label that identifies a device on a network. For devices on the internet, the hostname is usually a domain name (like www.example.com) that the DNS system resolves to an IP address. On local networks, devices may have simple hostnames (like my-macbook or printer-01) that the local DNS or mDNS resolves.

Hostname vs IP Address

AspectHostnameIP Address
FormatHuman-readable (mail.example.com)Numeric (203.0.113.42)
ChangesRarely (you choose it)Can change (dynamic IP)
Resolved byDNSDirectly routable
Used forUser-facing labelsActual network routing

Parts of a Hostname

A fully qualified domain name (FQDN) like mail.example.com has three parts:

  • Subdomain: mail (the specific service)
  • Domain: example (registered domain name)
  • TLD: .com (top-level domain)

How to Find Your Hostname

People Also Ask

What is an example of a hostname?
mail.google.com (Google's mail server), ns1.example.com (a nameserver), or my-laptop (a device name on a local network). On the internet, hostnames are usually FQDN format.
What's a hostname or IP address?
They identify the same thing from different angles. A hostname is a human-readable name; an IP address is the numeric address used for actual routing. DNS translates between the two.

Related: Hostname Lookup | Reverse DNS | DNS lookup