Reverse DNS Lookup: What Hostname Does This IP Have?
Normal DNS turns a name into an address. Reverse DNS goes the other way: give it an IP address and it returns the hostname published for it in a PTR record. It also checks whether that hostname points back at the same address, which is the test mail servers apply before they trust a sender.
How reverse DNS works
A PTR record lives in a special corner of DNS built from the address written backwards. The IPv4 address 8.8.4.4 is looked up as 4.4.8.8.in-addr.arpa, and IPv6 uses ip6.arpa. The record there holds a hostname, such as dns.google.
The part people trip over is who controls it. The PTR record belongs to whoever owns the IP address, normally your hosting company or ISP, not whoever runs your domain's DNS. To change one you usually ask your host or find a setting in their control panel.
What this tool queries, and what the badges mean
The tool accepts one IPv4 or IPv6 address and refuses private, loopback and reserved ranges, which include the documentation blocks 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24. That means the examples on this page cannot be pasted into the box, and they are illustrations only. For a public address it asks a recursive resolver for the PTR record and shows up to five hostnames.
For each hostname it then looks up the A and AAAA records and compares them with the address you entered. If one matches, the name gets the Forward-confirmed badge. If none matches, it shows Not confirmed, which means the PTR names a host that does not point back at this address.
It does not show who owns the address, where it is, whether it is on a blocklist, or the TTL. It does not connect to the server, so it cannot check that a mail server announces the same name in its SMTP greeting. Answers come through a caching resolver, so a change made minutes ago may still show the old hostname.
What “forward-confirmed” means
Anyone who controls a PTR record can write any hostname into it, including one that belongs to someone else. So the standard check is to resolve that hostname and see whether it points back at the original IP. When it does, the pair is forward-confirmed reverse DNS (FCrDNS). When it doesn't, treat the PTR as a claim, not proof.
Mail software uses the same two-step test, which RFC 8601 calls iprev when a receiver records the result in the Authentication-Results header.
Reverse lookup of an IPv4 address, by example
The steps are the same whichever tool you use. The address 192.0.2.25 is a documentation address, so this is an illustration of the format, not a real lookup.
Address: 192.0.2.25 Reverse name: 25.2.0.192.in-addr.arpa PTR answer: mail.example.com. dig -x 192.0.2.25 +short nslookup 192.0.2.25 Resolve-DnsName 25.2.0.192.in-addr.arpa -Type PTR Forward check: dig +short A mail.example.com 192.0.2.25
The octets are reversed because DNS reads names from right to left, so the network part of the address sits closest to the root. The dig and nslookup commands accept the plain address and build the reverse name for you. The trailing dot after mail.example.com is normal: it marks a fully qualified name. The forward check at the end is what the Forward-confirmed badge reports.
IPv6 reverse names, nibble by nibble
IPv6 does the same thing at a finer grain. Each hexadecimal digit, called a nibble, becomes its own label, so the reverse name has 32 labels before ip6.arpa. Take the documentation address 2001:db8::25 and work through it.
- Expand every group to four digits and fill in the zeros hidden by the double colon: 2001:0db8:0000:0000:0000:0000:0000:0025.
- Remove the colons to get 32 digits: 20010db8000000000000000000000025.
- Reverse the order of the digits and put a dot between each one.
- Add ip6.arpa at the end.
5.2.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 dig -x 2001:db8::25 +short Resolve-DnsName 5.2.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 -Type PTR
The tool does this conversion itself, and it also treats different spellings of one IPv6 address as equal when it compares the forward result. A server that uses both IPv4 and IPv6 needs a PTR record for each address it sends from, and each hostname needs a matching A or AAAA record.
Where reverse DNS matters
- Email delivery. Many receiving servers reject or penalise mail from an address with no PTR, or one that isn't forward-confirmed. If your mail is landing in spam, check this early.
- Logs and monitoring. A hostname is easier to read than an address when you scan connection logs or security alerts.
- Network diagnostics. Tools such as traceroute use PTR names to label each hop.
- Access controls. Some older systems still allow or block connections by the caller's hostname.
Why there may be no result
- The owner of the address never published a PTR record. That's common for home and mobile connections and for cheap hosting plans.
- The address is private or reserved, such as 192.168.1.1. Those have no public reverse DNS, and this tool doesn't query them.
- The record exists in the provider's system but isn't delegated to the right nameservers yet, so resolvers can't find it.
Common problems and what to do about them
| What you see | Likely cause | What to do |
|---|---|---|
| No PTR record | The address owner never published one | Ask your host or ISP to set it |
| PTR found, Not confirmed | The hostname has no A or AAAA record for this address, or points to a different one | Add the matching forward record, or change the PTR to a name that already points here |
| A generic name such as 192-0-2-25.dyn.example.net | The provider's default name for the address | Ask for a custom name that you control. Receivers often treat generic names on mail servers as a warning sign |
| Two or more hostnames | Several PTR records on one address | Ask the provider to keep only the name your mail server uses |
| The old name after a change | A cached answer is still being served | Wait for the old TTL to expire and check again, or query the provider's nameserver directly with dig |
| Result looks fine but mail still fails | The server sends from a different address than the one you looked up | Take the address from the Received header of a delivered message. The mismatch is common with NAT or a shared outbound gateway |
Blocks smaller than a /24 are the awkward case. The ISP keeps the reverse zone for the whole /24 and points individual addresses at the customer's records, a method described in RFC 2317. If you rent a handful of addresses, the PTR is still something you request from them.
Setting a PTR record for a mail server
- Choose a hostname that you control, such as mail.example.com. It does not have to be in the same domain as the mail you send, but a name you own is easier to keep consistent.
- Create an A record for it, and an AAAA record if the server sends over IPv6, pointing at the sending address.
- Set the PTR through your host's control panel or a support request. Your DNS provider cannot do this for you unless it also owns the address.
- Make the server identify itself with the same name in its SMTP greeting, which most mail guides recommend.
- Run the address through this tool. You want one hostname, and it should carry the Forward-confirmed badge.