What a DNS lookup tells you
DNS is the directory that turns a name into the facts a program needs to use it. Before your client can
send a single byte to api.example.com, it has to ask DNS for an address, and a wrong or
missing answer fails the request before HTTP is involved at all. A lookup shows you that answer
directly, taken from outside your own network, so you can separate “the name is wrong” from “the server
is down” from “my machine has something stale cached”.
The record types
| Type | Holds | You check it when |
|---|---|---|
A | An IPv4 address for the name | A host will not resolve, or resolves to the wrong server |
AAAA | An IPv6 address for the name | Requests fail only from IPv6 networks |
CNAME | Another name this one is an alias of | Pointing a subdomain at a CDN, a host or a SaaS product |
MX | The mail servers for the domain, with priorities | Email to the domain is bouncing |
NS | The name servers authoritative for the zone | Confirming a DNS provider change has taken effect |
TXT | Free text: SPF, DKIM, DMARC, domain verification | Proving ownership to a provider, or fixing mail authentication |
SOA | The zone's primary server, contact and timers | Checking the serial after an update, or the negative-cache time |
CAA | Which certificate authorities may issue for the domain | A certificate request is refused |
SRV | Host and port for a named service | Service discovery, for example _sip._tcp.example.com |
PTR | The name an IP address maps back to | Mail from your server is treated as spam |
“All common” runs the first eight in one go. SRV is left out of that set because its records
live at service-specific names rather than at the domain itself, and PTR is used
automatically when you enter an IP address.
Reading the results
TTL: how long an answer may be cached
Each record carries a time to live in seconds. A resolver that has fetched the record may reuse it for that long without asking again. The TTL shown here is what remains on the public resolver's cached copy, so it counts down between lookups and resets when the resolver refetches. This is the whole reason “DNS propagation” takes time: nothing is being pushed outward, old answers are simply expiring from caches at their own pace. Lower the TTL a day before a planned change, and the change will be seen everywhere within minutes.
“No records of this type” is not “does not exist”
A name can exist and have no record of the type you asked for. example.com may have an
A record and no AAAA; that is an empty answer, and it is normal.
NXDOMAIN is different: it means the name itself is not in DNS at all. If you expected
it to be, the usual causes are a typo, a record created in the wrong zone, or a domain whose
registration has lapsed.
A CNAME replaces everything else
A name that has a CNAME may not have any other record. Resolvers follow the alias, so a
lookup for A on such a name returns the addresses of the target. Two consequences catch
people out. A CNAME cannot be placed at the root of a domain, because the root must hold
NS and SOA records; DNS providers offer flattening or ALIAS
records to work around that. And a TXT verification record cannot be added to a subdomain
that is already a CNAME.
TXT records worth recognising
| Starts with | Found at | Purpose |
|---|---|---|
v=spf1 | The domain itself | SPF: which servers may send mail for the domain. There must be exactly one. |
v=DKIM1 | selector._domainkey.example.com | DKIM: the public key used to verify signed mail. |
v=DMARC1 | _dmarc.example.com | DMARC: what receivers should do when SPF and DKIM fail. |
google-site-verification= and similar | The domain itself | Proof of ownership for a third-party service. |
DKIM and DMARC live at their own names, so looking up the bare domain will not show them. Enter the full name, underscore included.
Why this answer may differ from what your machine sees
This tool asks two large public resolvers. Your computer asks whatever resolver your network assigned,
after first consulting its own cache and its hosts file. When the two disagree, the
difference is the diagnosis.
- Correct here, wrong for you. Something local is stale or overridden: the operating
system's DNS cache, the browser's own cache, a
hostsfile entry, or a company resolver serving an internal view of the name. - Wrong here, correct for you. You are probably seeing an internal or split-horizon record that the public internet does not get, which is why a webhook provider cannot reach a host that works from your desk.
- Different addresses each time. Normal for large services. They return several addresses in rotating order, or different ones by region, to spread load.
- Old value here after a change. The previous record's TTL has not run out yet on the public resolver. Wait that long before concluding the change failed.
To see your own machine's view, use nslookup example.com on Windows or
dig example.com on macOS and Linux. Adding a resolver address,
dig @1.1.1.1 example.com, asks a specific public one and should match what you see here.
DNS problems that look like API problems
- “Could not resolve host.” The client's error for a failed lookup; curl reports it
as exit code 6. Check the
Arecord here. If it exists, the fault is in the client's resolver, not the API. - A webhook that never arrives. The provider resolves your endpoint from the public
internet. If the name has no public
AorAAAArecord, nothing can be delivered. See how webhooks are delivered, and use the webhook tester for a URL that is certainly reachable. - A custom domain stuck on “pending”. The service is waiting to see a specific
CNAMEorTXTrecord. Look it up here to confirm it is published exactly as asked, at exactly the name asked. - A certificate that will not issue. A
CAArecord that omits your certificate authority forbids it from issuing. Once the certificate exists, the SSL checker shows whether it is installed correctly. - Right address, wrong response. If DNS is correct and the request still fails, the problem has moved up a layer. Send the request from the API tester and read the status code; a 502 or a Cloudflare 523 points at the server behind the name.
Frequently asked questions
What is a DNS lookup?
A query to the Domain Name System asking for the records attached to a name: the IP addresses it points to, the mail servers for the domain, its text records and so on. Every network connection to a host name starts with one.
How do I check the DNS records of a domain?
Enter the domain above, leave the type on All common, and press Look up. You will see its A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records as public resolvers currently report them.
What is the difference between an A record and a CNAME?
An A record maps a name directly to an IPv4 address. A CNAME maps a name to another name, and the resolver then looks up that second name to find the address. A CNAME cannot coexist with other records at the same name.
How long does a DNS change take to propagate?
As long as the TTL of the record that was replaced. Resolvers keep the old answer until it expires, so a record with a TTL of 3600 can be served for up to an hour after the change. Nothing needs to spread; caches just need to run out.
What does NXDOMAIN mean?
Non-existent domain. The DNS has no entry at all for that name. It is different from an empty answer, where the name exists and simply has no record of the type requested.
What is a reverse DNS lookup?
A lookup from an IP address to a name, using a PTR record. Mail servers use it to check that a sending address maps back to a plausible host name. Enter an IP address above to run one.
Is the domain I look up sent to your server?
Yes. A browser cannot send DNS queries itself, so the name is sent to api-tester.com, which queries the public resolvers 1.1.1.1 and 8.8.8.8 and returns the result. The names you look up are not logged or stored.
Related tools and reference
SSL Checker
Once the name resolves, check the certificate the server presents.
API Tester
Send a request to the host and read the status code and headers.
Webhook Tester
A public URL that records every request sent to it.
HTTP vs HTTPS
What happens after DNS: the TLS handshake and what it protects.
CORS Tester
Another check that depends on where the request is made from.
523 Origin Is Unreachable
What Cloudflare returns when a DNS record points at the wrong address.