Reverse DNS lookup: how PTR records turn an IP address into a name
By TechCompare · Updated · How we check
A reverse lookup asks for the PTR record at a name built from the IP address. Only whoever holds the address can set it, and mail servers trust it only when that name points back to the same address.
A normal DNS lookup goes from a name to an address. A reverse lookup goes the other way: it starts with an IP address and finds the name that belongs to it. DNS has no index of addresses, so the address gets turned into a special name, and the answer sits in a PTR record there.
How this is calculated
For IPv4, the four numbers are written backward under in-addr.arpa, so 192.0.2.10 becomes 10.2.0.192.in-addr.arpa. The order flips because DNS names get more specific to the left, while IP addresses get more specific to the right. For IPv6, every hex digit of the full address is written backward under ip6.arpa (RFC 3596). That makes a name with 32 digits, one per label.
The reverse zone belongs to whoever holds the address block, not to the owner of a domain. Regional registries like ARIN and RIPE NCC hand reverse zones to the networks they give addresses to, and those pass control on to their customers, or keep it. So you can't add a PTR record at your domain's DNS host. You set it at your hosting, cloud or internet provider, often in a reverse DNS field next to the server's IP address.
A PTR record on its own proves little, since the address holder can type in any name, including yours. That's why mail servers check both ways. They read the PTR name, look up that name's A or AAAA records, and expect the same address back. This is called forward confirmed reverse DNS. Gmail requires it of every sender, and a server that fails it gets error 550 5.7.25, which says the IP has no PTR record or its name doesn't point back.
Private addresses, like 192.168.x.x and 10.x.x.x (RFC 1918), have no names in public DNS, so public resolvers answer NXDOMAIN for them. Only the DNS server on that network, like a router or an Active Directory server, can know their names.
Type an IP address into the DNS Lookup and it asks for the PTR record, then looks up each name it finds to see if it points back. Try 8.8.8.8: its PTR record is dns.google, and dns.google points back to 8.8.8.8.
Verdict
If you run a mail server, set its PTR record at your provider to a name you control, then give that name an A or AAAA record with the same address. Check both directions before you send any mail. For a web server, reverse DNS is optional, but a clear name still helps anyone reading logs or a traceroute.
More DNS scenarios
Related guides
Frequently asked questions
Why can't I add a PTR record at my DNS host?
Does every IP address have a reverse DNS name?
Is reverse DNS the same as a reverse IP lookup?
Related tools
Subnet Calculator
Calculate network address, broadcast address, and usable IP ranges for IPv4/IPv6.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use toolJWT Decoder & Validator
Decode JWT headers and claims, check exp, nbf and iat, and verify signatures locally with your own key.
Use tool