Trace reverse mapping with nslookup and dig -x
When you need to dig into reverse DNS — not just get a hostname, but understand the chain behind it — nslookup and dig -x are the tools. Here’s how to use them to trace reverse mappings on any server.
The quick answer with dig -x
On Linux or macOS, dig -x handles the reverse lookup in one step:
dig -x 8.8.8.8
The full output shows the PTR record in the ANSWER section, plus which DNS servers were authoritative. Add +short for just the hostname, or +trace to watch the resolution walk down from the root servers.
What does dig -x actually do?
Reverse DNS uses a special domain: an IP like 8.8.8.8 is looked up as 8.8.8.8.in-addr.arpa (reversed, under the in-addr.arpa zone). The -x flag just does that reversal and formatting for you. You can see it explicitly by querying the PTR type directly: dig 8.8.8.8.in-addr.arpa PTR.
Using nslookup (cross-platform)
nslookup works on Windows, Linux, and macOS:
nslookup 8.8.8.8
To query a specific DNS server instead of your default — useful for checking whether a change has propagated — add it: nslookup 8.8.8.8 1.1.1.1.
Confirming the full round trip (FCrDNS)
To verify Forward-Confirmed Reverse DNS, do both directions. First reverse: dig -x <IP> +short to get the hostname. Then forward: dig <hostname> +short to get the IP. If the forward result matches the IP you started with, FCrDNS passes. A mismatch is exactly what FCrDNS errors flag.
Checking propagation
Reverse DNS changes can take hours to spread. Query several public resolvers (1.1.1.1, 8.8.8.8) and your provider’s to see whether they agree yet. For a quick no-terminal check, our Reverse DNS tool shows the current PTR for any IP.
Related: Reverse DNS lookup commands · Reverse DNS tool