What is Reverse DNS?
Learn what reverse DNS is, how PTR records map IPs to hostnames, and why rDNS matters for email deliverability.
Expected Interview Answer
Reverse DNS (rDNS) is the lookup that maps an IP address back to a hostname, the opposite direction of a normal DNS query, and it works by querying a special PTR record stored under the reversed IP octets in the in-addr.arpa (IPv4) or ip6.arpa (IPv6) zone.
A forward DNS lookup asks βwhat IP does example.com resolve to?β while a reverse lookup asks βwhat hostname owns 93.184.216.34?β To answer that, the resolver reverses the IP octets and appends in-addr.arpa (for example 34.216.184.93.in-addr.arpa) and queries for a PTR record at that name. Unlike A/AAAA records, PTR records are typically controlled by whoever owns the IP block β usually the hosting provider or ISP β not the domain owner, so setting up rDNS often means filing a request with your cloud provider rather than editing your own zone file. Mail servers rely heavily on reverse DNS: many receiving mail servers reject or flag messages from IPs that have no PTR record or whose PTR hostname does not match the sending server's claimed identity (forward-confirmed reverse DNS, or FCrDNS), because that mismatch is a strong spam signal. Logging and diagnostic tools also use rDNS to show human-readable hostnames instead of raw IPs in traceroutes and access logs.
- Maps an IP address back to its hostname via PTR records
- Uses the special in-addr.arpa / ip6.arpa reverse zones
- Critical for mail server reputation and deliverability checks
- Makes logs and traceroutes human-readable instead of raw IPs
AI Mentor Explanation
Reverse DNS is like working backward from a bat's serial number stamped in the willow to figure out which manufacturer's workshop produced it, instead of starting from the brand name to find the bat. A forward lookup goes brand-to-bat; a reverse lookup goes serial-to-brand, and only the manufacturer's own records can confirm the match. If the workshop has no record for that serial number, an umpire inspecting equipment treats it as suspicious, much like a mail server treats a missing PTR record as a red flag.
Step-by-Step Explanation
Step 1
Reverse the octets
The resolver flips the IP address (e.g., 93.184.216.34 becomes 34.216.184.93) for the query.
Step 2
Append the reverse zone
It appends .in-addr.arpa for IPv4 or .ip6.arpa for IPv6 to form the query name.
Step 3
Query for PTR
The resolver requests a PTR record at that name from the authoritative server for that IP block.
Step 4
Return the hostname
If a PTR record exists, the hostname is returned; mail and logging systems use it for trust and readability.
What Interviewer Expects
- Correct definition: IP-to-hostname lookup via PTR records
- Knows the in-addr.arpa / ip6.arpa reverse zone mechanism
- Understands the IP block owner (not domain owner) controls PTR records
- Connects rDNS to mail deliverability and FCrDNS
Common Mistakes
- Confusing reverse DNS with a normal forward A record lookup
- Assuming a domain owner can always set their own PTR record
- Not knowing PTR records live in a special reverse zone
- Forgetting rDNS is a common spam-filtering signal for mail servers
Best Answer (HR Friendly)
βReverse DNS is the opposite of a normal DNS lookup β instead of turning a domain name into an IP address, it turns an IP address back into a hostname. It matters most for email: many mail servers check that the sending IP has a valid reverse DNS entry that matches its claimed identity, and if it does not, your emails are more likely to get marked as spam.β
Code Example
# Reverse lookup an IP address to its hostname
dig -x 93.184.216.34 +short
# Equivalent using the classic tool
nslookup 93.184.216.34
# Manually query the reverse zone name
dig PTR 34.216.184.93.in-addr.arpa +shortFollow-up Questions
- What is FCrDNS (forward-confirmed reverse DNS) and why does it matter?
- Who controls the PTR record for a given IP address?
- How does reverse DNS differ for IPv6 addresses?
- Why do many mail providers reject email from IPs with no PTR record?
MCQ Practice
1. What DNS record type answers a reverse DNS query?
PTR (pointer) records map an IP address back to a hostname in the reverse DNS zone.
2. What special zone suffix is used for IPv4 reverse lookups?
IPv4 reverse lookups use the in-addr.arpa zone with the octets reversed.
3. Who typically controls the PTR record for a public IP address?
PTR records are set by whoever owns the IP address block, usually the ISP or cloud provider.
Flash Cards
What is reverse DNS? β A lookup that maps an IP address back to a hostname using PTR records.
Which record type is used? β PTR record, stored in the in-addr.arpa (IPv4) or ip6.arpa (IPv6) zone.
Who controls PTR records? β The owner of the IP address block, typically an ISP or cloud provider.
Why does rDNS matter for email? β Mail servers use it and FCrDNS to detect spoofed or spammy senders.