Hostname Lookup
Enter a hostname such as www.example.com or api.example.com to see the IPv4 and IPv6 addresses it resolves to in public DNS right now.
Jump to toolWhat Is Hostname Lookup?
A hostname lookup resolves a name, such as mail.example.com, to the IP addresses it points to. It is the everyday DNS step behind every connection, done on demand so you can see the answer yourself.
Enter a hostname and the tool queries public DNS for its A (IPv4) and AAAA (IPv6) records. To go the other way, from an address to a name, use Reverse DNS Lookup.
How to Resolve a Hostname to an IP Address
- Enter a hostname such as example.com.
- Select Resolve Hostname.
- Read the IPv4 and IPv6 addresses it points to.
Hostname, Domain, Subdomain and FQDN
These terms overlap, which causes a lot of confusion when setting up DNS:
| Term | Example and meaning |
|---|---|
| Domain | example.com: the name registered with a registrar |
| Subdomain | shop.example.com: a name the domain's owner creates under it |
| Hostname | mail.example.com: the name of a particular machine or service, which can also be the bare domain |
| FQDN | mail.example.com. with a final dot: the complete name, all the way up to the root of DNS |
What Happens When a Hostname Is Resolved
Every connection starts with these steps, usually within a few milliseconds:
- Your device checks its own cache and its hosts file.
- It asks a recursive resolver, normally your provider's or a public one such as 8.8.8.8 or 1.1.1.1.
- If the resolver has no cached answer, it asks a root server which servers handle the top-level domain, such as .com.
- The top-level domain's servers point it to the domain's authoritative nameservers.
- Those nameservers return the A and AAAA records, which the resolver keeps for as long as the record's TTL allows.
A, AAAA and CNAME Records
| Record | What it holds |
|---|---|
| A | An IPv4 address, such as 192.0.2.10 |
| AAAA | An IPv6 address, such as 2001:db8::10 |
| CNAME | Another hostname that this name is an alias of; use DNS Lookup to see it |
Why a Hostname Doesn't Resolve
NXDOMAIN: the name does not exist
- The name is misspelt, the record was never created, or the domain has expired.
No addresses returned
- The name exists but has no A or AAAA record, for example a name used only for mail or verification.
An old address comes back
- Resolvers are still serving a cached answer until its TTL runs out.
Different answers inside and outside an office
- The organisation runs split DNS, giving internal users private addresses for the same name.
When to Use It
- Check that a new subdomain points where you expect before you share it.
- Confirm an API or mail hostname has both IPv4 and IPv6 addresses.
- Compare public DNS with what a server's hosts file says.
- Get the address of a hostname so you can ping it, check its ports or look it up.
References
Disclaimer
Answers come from public DNS at the moment of the query. Private networks can return different addresses for the same name.
Hostname Lookup FAQ
Is the host responding?
Measure how quickly it answers from our server.
Related Tools
Tools that often come next after this one