DNS Tools

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 tool

What 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

  1. Enter a hostname such as example.com.
  2. Select Resolve Hostname.
  3. 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:

TermExample and meaning
Domainexample.com: the name registered with a registrar
Subdomainshop.example.com: a name the domain's owner creates under it
Hostnamemail.example.com: the name of a particular machine or service, which can also be the bare domain
FQDNmail.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

RecordWhat it holds
AAn IPv4 address, such as 192.0.2.10
AAAAAn IPv6 address, such as 2001:db8::10
CNAMEAnother 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.

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.

Ping Test