Reverse DNS lookup

Find the hostname behind an IPv4 or IPv6 address (its PTR record) and check that the name resolves back to the same IP, as mail servers require.

Reverse DNS (PTR)
Try:

Enter an IP address. We query the PTR record, then look the name up forwards to confirm it matches.

How the reverse name is built

DNS names are read right to left, most general first, while IP addresses are written left to right. To delegate reverse lookups the same way as the network hierarchy (a /8 to an RIR, a /24 to an ISP), the octets are reversed under in-addr.arpa. For IPv6, every one of the 32 hex digits becomes its own label, reversed, under ip6.arpa.

  • 192.0.2.25 → 25.2.0.192.in-addr.arpa
  • 2001:db8::1 → 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa

On the command line: dig -x 192.0.2.25 +short or nslookup 192.0.2.25.

Questions people ask

What is reverse DNS?
Normal DNS maps a name to an IP. Reverse DNS maps an IP back to a name using PTR records under the special zones in-addr.arpa (IPv4) and ip6.arpa (IPv6). The IP is written backwards: 8.8.4.4 becomes 4.4.8.8.in-addr.arpa.
Who controls the PTR record for my IP?
Whoever holds the IP block, usually your hosting provider or ISP, not your domain's DNS host. Set it in your cloud console (AWS, Hetzner, DigitalOcean and most VPS hosts have a "reverse DNS" field) or ask your ISP.
What is forward-confirmed reverse DNS (FCrDNS)?
The PTR name must itself resolve back to the same IP. Mail receivers like Gmail and Microsoft check this; a mail server without matching forward and reverse DNS is likely to be rejected or marked as spam.
Why is there no PTR record?
Many residential and cloud IPs have none, or a generic one like ec2-3-4-5-6.compute-1.amazonaws.com. That is fine for web servers; it only matters for sending mail.