What is a DNS lookup?
A DNS lookup asks the Domain Name System (DNS) for the records stored for a domain name. DNS is the internet's phone book: it turns a name like example.com into the data computers need, such as the IP address of a website or the servers that receive its email.
This free DNS lookup tool queries public DNS resolvers and shows you the A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records for any domain. You can also run reverse DNS on an IP address, and check SPF and DMARC with one click.
DNS record types explained
| Type | Purpose | Example value |
|---|---|---|
A | Maps a name to an IPv4 address | 93.184.216.34 |
AAAA | Maps a name to an IPv6 address | 2606:2800:220:1::1 |
CNAME | Makes one name an alias of another | www → example.com |
MX | Mail servers, with a priority (lower is tried first) | 10 mail.example.com |
NS | The authoritative name servers for the domain | ns1.dnshost.com |
TXT | Free text: SPF, DKIM, DMARC, ownership proofs | v=spf1 include:_spf.google.com ~all |
SOA | Zone details: primary server, admin email, serial, timers | ns1.dnshost.com admin.example.com 2026111901 … |
CAA | Which certificate authorities may issue certificates | 0 issue "letsencrypt.org" |
SRV | Host and port of a service | 10 5 5060 sip.example.com |
PTR | Reverse DNS: IP address back to a name | dns.google |
How does DNS resolution work?
- Your device asks a recursive resolver (your ISP's, or one like Google or Cloudflare) for the record.
- If the answer is not cached, the resolver asks a root server, which points to the servers for the top-level domain, such as
.com. - The TLD servers point to the domain's authoritative name servers.
- The authoritative server returns the record, and the resolver caches it for the record's TTL and passes it to you.
SPF, DKIM and DMARC records
These three TXT-based records protect your domain's email from spoofing and help your messages reach the inbox.
- SPF lists the servers allowed to send email for your domain. It is a TXT record on the domain starting with
v=spf1. A domain should have only one SPF record. - DKIM publishes a public key at
selector._domainkey.yourdomain.com. Receivers use it to check that a message was signed by your domain. - DMARC tells receivers what to do when SPF and DKIM fail, and where to send reports. It is a TXT record at
_dmarc.yourdomain.comstarting withv=DMARC1.
Use the SPF and DMARC buttons above to check yours. For DKIM, type the full name, for example google._domainkey.example.com, and choose TXT.
DNS response status codes
| Status | Meaning | What to do |
|---|---|---|
NOERROR | The query worked. There may be zero records of that type. | If a record is missing, add it at your DNS host. |
NXDOMAIN | The domain name does not exist. | Check the spelling and that the domain is registered. |
SERVFAIL | The resolver could not get a valid answer. | Check name servers and DNSSEC settings. |
REFUSED | The server refused to answer. | Check the name server configuration. |
TTL and DNS propagation
TTL (time to live) is the number of seconds a resolver may cache a record. After you change a record, resolvers that cached the old value keep serving it until its TTL runs out. This delay is often called DNS propagation. It is not a single event, only caches expiring at different times.
- Lower the TTL (for example to 300 seconds) a day before a planned change, then raise it again afterward.
- Look up the record with both Google and Cloudflare to see whether caches differ.
- The TTL shown in the result is the time left in the resolver's cache, so it counts down between lookups.
DNS lookup on the command line
| Tool | Command |
|---|---|
dig (macOS, Linux) | dig example.com MX +short |
nslookup (Windows, all) | nslookup -type=TXT example.com |
host (macOS, Linux) | host -t NS example.com |
| Reverse lookup | dig -x 8.8.8.8 +short |
Common DNS problems and fixes
- Website does not load after a change: check the A or CNAME record, then wait for the old TTL to expire.
- Email not arriving: check the MX records exist and point to the right servers, and that there is no typo in the host name.
- Email going to spam: check SPF, DKIM and DMARC. Make sure you have only one SPF record.
- CNAME at the root domain: a CNAME cannot sit beside other records, so it is not allowed on the root. Use an A record or your host's alias feature.
- SSL certificate not issuing: check CAA records. If they exist, they must allow your certificate authority.
Need other utilities? Browse all developer tools, try the IP address lookup, JWT generator and regex tester.