DNS lookup

Query A, AAAA, MX, TXT, NS, CNAME and SOA records for any domain.

Have feedback or an idea for this tool?

What is a DNS lookup?

A DNS lookup asks the domain name system what records a domain publishes, turning a human name like example.com into the addresses and settings other services rely on. This tool queries the common record types: A and AAAA for IPv4 and IPv6 addresses, MX for mail servers, TXT for verification and policy strings such as SPF, NS for the authoritative nameservers, CNAME for aliases, SOA for the zone serial and timers, and CAA for which authorities may issue certificates. Enter a domain and pick a type to see the live answer straight from public resolvers. Use it to confirm a record you just changed, to debug mail or verification problems, or to check where a name currently points before you move a site to a new host or issue a fresh TLS certificate.

Key facts

  • A DNS lookup translates a human-readable name such as example.com into the records attached to it, most often an IP address but also mail routing and text records.
  • A DNS A record maps a hostname to an IPv4 address, while an AAAA record maps a hostname to an IPv6 address.
  • A CNAME record aliases one name to another name and cannot be placed at the zone apex, which is why the root usually needs an A or AAAA record instead.
  • An MX record names the mail servers that accept email for a domain, each with a priority value where a lower number is preferred.
  • A DNS TTL (time to live) is the number of seconds a resolver may cache a record before fetching it again, so a record with a TTL of 3600 can be served from cache for up to an hour.

What a DNS lookup is and how resolution works

A DNS lookup asks the Domain Name System to translate a human-readable name like example.com into the data attached to it - most often an IP address, but also mail routing, text records and more. It is the same step your browser or a curl request performs silently before any connection is made.

Resolution is recursive and hierarchical. Your resolver first asks a root server, which points to the TLD servers for the suffix (.com, .in, and so on), which point to the domain's authoritative nameservers, which finally return the record. Each answer carries a TTL, and the resolver caches it for that many seconds so the next lookup is instant.

This tool queries authoritative or public resolvers directly and returns the current answers per record type, so you see what the internet actually resolves for a domain right now rather than a possibly stale local cache.

How DNS works (MDN) · RFC 1035 - Domain Names, Implementation

The DNS record types, and what each is for

A points a name to an IPv4 address; AAAA points it to an IPv6 address. A single name can have multiple A records for simple round-robin load spreading.

CNAME aliases one name to another name (www to the apex, or an apex to a load balancer's hostname). You cannot place a CNAME at the zone apex alongside other records, which is why the root usually needs an A/AAAA record instead.

MX names the mail servers that accept email for the domain, each with a priority (lower is preferred). TXT holds free-form text and carries SPF, DKIM and DMARC policies plus domain-verification strings.

NS lists the authoritative nameservers for the zone, and SOA (start of authority) holds the zone's primary nameserver, admin contact, serial number and the timers that govern secondary transfers and negative caching. CAA states which certificate authorities may issue certificates for the domain, PTR maps an IP back to a name (reverse DNS), and SRV advertises the host and port of a specific service.

DNS record types (IANA registry)

TTL, caching and why a change is not instant

Every record has a TTL (time to live) in seconds. When a resolver fetches a record it keeps the answer for that long, so a record with a TTL of 3600 can be served from cache for up to an hour before the resolver checks again.

That is why editing a record does not take effect everywhere at once: resolvers around the world keep serving the old value until their individual copies expire. Lowering the TTL a day before a planned change shortens that window next time.

If you are watching a change roll out across many resolvers rather than inspecting one domain's full record set, a propagation checker is the right tool - this lookup shows you the authoritative answer and its TTL in one place.

Running the same lookup from the command line

dig is the reference tool on Linux and macOS. Query a specific type with: dig example.com MX, or all common types with dig example.com ANY (note many resolvers now refuse ANY). Add +short for just the answer, or +trace to follow the delegation from the root down.

To bypass your local cache and ask a public resolver directly, target it: dig @1.1.1.1 example.com A. On Windows, nslookup example.com or nslookup -type=mx example.com does the equivalent. When a lookup fails, the resolver's status - NXDOMAIN (no such name) versus SERVFAIL (resolver or zone error) - tells you whether the name is missing or the DNS itself is broken.

dig manual (ISC BIND)

Glossary

A record
An A record maps a hostname to a 32-bit IPv4 address. A single name can hold several A records so requests are spread across multiple servers in a simple round-robin.
AAAA record
An AAAA record maps a hostname to a 128-bit IPv6 address. It serves the same role as an A record but for the newer IPv6 address space.
CNAME record
A CNAME record aliases one hostname to another hostname rather than to an IP. It cannot exist at the zone apex alongside other records, so the root of a domain normally uses an A or AAAA record instead.
MX record
An MX record names the mail servers that accept email for a domain, each with a priority value where a lower number is preferred. Multiple MX records provide fallback delivery paths.
SOA record
The start of authority (SOA) record holds a zone's primary nameserver, administrative contact, serial number and the timers that govern secondary transfers and negative caching. Every zone has exactly one SOA record.
TTL
TTL (time to live) is the number of seconds a resolver may cache a record before fetching it again. A record with a TTL of 3600 can be served from cache for up to an hour after it changes.

Questions, answered.

What DNS records can I look up?+

A and AAAA (IPv4 and IPv6 addresses), MX (mail servers), TXT (SPF, DKIM, DMARC and verification strings), NS (nameservers), CNAME (aliases), SOA (zone details) and CAA (which certificate authorities may issue certificates). You can query one type or fetch them all in a single lookup.

How does a DNS lookup work?+

A resolver walks the hierarchy: it asks a root server, which points to the TLD servers (.com, .in and so on), which point to the domain's authoritative nameservers, which return the record. Each answer includes a TTL, and the resolver caches it for that many seconds before asking again.

What is the difference between an A record and a CNAME?+

An A record points a name straight at an IPv4 address, while a CNAME points one name at another name. You cannot place a CNAME at the root (apex) of a domain, which is why the apex normally needs an A or AAAA record instead of a CNAME.

What is a DNS TTL?+

TTL (time to live) is how many seconds a resolver may cache a record before fetching it again. A record with a TTL of 3600 can be served from cache for up to an hour. Lowering the TTL before a planned change makes updates propagate faster.

Why do my new DNS records not show up yet?+

Resolvers cache records for the length of their TTL, so a change can take minutes to hours to appear everywhere. The authoritative nameservers update immediately, but cached copies elsewhere expire on their own schedule. To watch a change roll out across resolvers worldwide, use a DNS propagation checker.

How do I do a DNS lookup from the command line?+

On Linux or macOS use dig, for example dig example.com MX for mail records or dig example.com A for the IPv4 address; add +short for a terse answer. To query a specific resolver use dig @1.1.1.1 example.com. On Windows, use nslookup example.com or nslookup -type=mx example.com.

What does DNS lookup failed mean?+

It usually means the resolver could not return an answer. NXDOMAIN means the name does not exist, SERVFAIL means the resolver or the domain's nameservers hit an error, and a timeout means the resolver was unreachable. Checking the record type and the nameservers here helps tell a missing record apart from a broken zone.

What is an SOA record?+

The SOA (start of authority) record holds a zone's core settings: the primary nameserver, the admin contact email, a serial number that secondaries use to detect updates, and timers for refresh, retry, expiry and negative (NXDOMAIN) caching. Every zone has exactly one SOA record.

Do you store the domains I look up?+

No. The lookup runs on ServerCake's servers and we do not keep a record of the domains you query.

Built by the ServerCake team

Cloud that speaks India.

These tools run on ServerCake infrastructure in India. When our cloud opens, you get VMs and managed databases priced in ₹, billed with GST, on India-resident infrastructure. Reserve your spot for early access.

Reserve your spot