What is Reverse DNS (PTR)?
Reverse DNS is the mirror image of a normal lookup: instead of turning a name into an IP address, it turns an IP address back into a name. It runs on special PTR records in a dedicated part of the DNS tree, and while most people never touch it, it quietly underpins email deliverability and shows up constantly in server logs and security checks. Here is how it works and why it matters.
What is reverse DNS?
Reverse DNS (rDNS) answers the opposite question to a normal lookup. A forward lookup asks what is the IP address for this name; a reverse lookup asks what is the name for this IP address. So while a forward query turns example.com into an address, a reverse query turns an address like 93.184.216.34 back into a hostname.
It relies on the same DNS infrastructure described in what is DNS, but it lives in a separate, specially structured part of the tree dedicated to addresses rather than names.
PTR records and in-addr.arpa
Reverse DNS is powered by the PTR record, which maps an IP address to a hostname. To make addresses fit into the DNS hierarchy, they are written backward under a special domain:
- IPv4 addresses live under
in-addr.arpa. The address93.184.216.34becomes the name34.216.184.93.in-addr.arpa, with the octets reversed. - IPv6 addresses live under
ip6.arpa, written as reversed hex digits.
The octets are reversed because DNS reads names from most specific on the left to most general on the right, while IP addresses are written the other way around. A PTR record at that reversed name then points to the hostname the address should resolve to.
Why it matters
The biggest reason to care about reverse DNS is email deliverability. Receiving mail servers routinely look up the reverse DNS of any IP that connects to them as a basic legitimacy check:
- A sending mail server with no PTR record at all looks suspicious and is often penalized.
- Many providers expect the PTR to match the server's hostname, and for that hostname to forward-resolve back to the same IP. This matching pair is sometimes called forward-confirmed reverse DNS.
- Beyond email, reverse DNS makes server logs, traceroutes, and security tools more readable by showing names instead of bare numbers.
If your mail is landing in spam, missing or mismatched reverse DNS is one of the first things to check, alongside the issues covered in why is my email going to spam.
Setting up reverse DNS
Reverse DNS works differently from your normal records in one important way: it is controlled by whoever owns the IP address, not by your domain registrar. Because IP addresses are allocated to networks, the reverse zone is delegated to the network operator.
- Identify who controls the IP, typically your hosting company, cloud platform, or internet provider.
- Find the PTR or reverse DNS setting in that provider's control panel, or open a support request if it is not self-service.
- Set the PTR record so the IP resolves to your chosen hostname, for example
mail.example.com. - Make sure that hostname also has a matching forward record pointing back to the same IP, so the pair confirms each other.
You generally cannot set reverse DNS from your own DNS provider unless you also control the IP block, which is why it is handled separately from the rest of your zone.
Checking reverse DNS
You can verify reverse DNS from the command line. With dig, run dig -x 93.184.216.34; with nslookup, run nslookup 93.184.216.34. Either will return the PTR record's hostname if one is set. Then do a forward lookup on that hostname to confirm it points back to the original IP.
Reverse DNS and the mail-related records around it can drift or be changed without warning, and a broken PTR can quietly start sending your email to spam. ZoneWatcher monitors your DNS records continuously and alerts you the moment something changes, so deliverability problems do not catch you by surprise.