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
| Aspect | Hostname | IP Address |
|---|---|---|
| Format | Human-readable (mail.example.com) | Numeric (203.0.113.42) |
| Changes | Rarely (you choose it) | Can change (dynamic IP) |
| Resolved by | DNS | Directly routable |
| Used for | User-facing labels | Actual 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
- Windows:
hostnamecommand in Command Prompt - Mac/Linux:
hostnamein Terminal - Your public IP's hostname: Use our Reverse DNS Lookup to find the hostname associated with an IP
- Any domain's hostname: Use our Hostname Lookup tool
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