A reverse DNS lookup (rDNS) is a DNS query that maps an IP address to a hostname, the opposite direction of the usual forward lookup that turns a name into an address. It works by querying a PTR (pointer) record stored in special zones under the in-addr.arpa domain for IPv4 and ip6.arpa for IPv6.
In the DNS, reverse lookups are mainly used for identification and trust signals rather than for reaching a service. Mail servers, logging systems, network diagnostics and security tools rely on rDNS to attach a readable name to an otherwise anonymous address on the Internet.
How a reverse DNS lookup works
A reverse lookup works by rewriting the IP address as a domain name and asking the DNS for its PTR record. For IPv4, the four octets are reversed and the suffix in-addr.arpa is appended, so 192.0.2.25 becomes 25.2.0.192.in-addr.arpa. The reversal is needed because DNS names grow more specific from right to left, while IP addresses grow more specific from left to right.
For IPv6, the address is expanded to all 32 hexadecimal nibbles, which are reversed and separated by dots under ip6.arpa. A DNS resolver then follows the ordinary delegation chain from the root name server through the arpa zone to the authoritative DNS server for that address block, exactly as it would for a forward name.
The table below shows how each address type is transformed into a reverse query name.
| Address type | Example address | Reverse query name |
|---|---|---|
| IPv4 | 192.0.2.25 | 25.2.0.192.in-addr.arpa |
| IPv6 | 2001:db8::1 | 1.0.0.0 … 8.b.d.0.1.0.0.2.ip6.arpa (32 nibbles) |
| IPv4 /24 zone | 192.0.2.0/24 | 2.0.192.in-addr.arpa |
Command-line tools perform the transformation automatically: dig -x 192.0.2.25 and nslookup 192.0.2.25 both build the reverse name and return the PTR target, such as mail.example.com.
Who controls reverse DNS records
Reverse DNS is controlled by whoever holds the IP address block, not by the owner of the forward domain name. Regional Internet registries delegate reverse zones to ISPs and hosting providers along with their address allocations, and those providers either manage PTR records themselves or delegate authority to customers.
This split ownership explains a frequent surprise: a company can own example.com yet be unable to set the PTR record for its server until the hosting provider changes it or delegates the zone. Delegation on octet boundaries is simple, while smaller blocks need the classless delegation method described in RFC 2317, which uses CNAME records to point individual addresses into a customer-managed zone.
| Hosting situation | Who sets the PTR | Typical method |
|---|---|---|
| Cloud virtual server | Customer through provider console | Per-address setting or API call |
| Dedicated server | Hosting provider on request | Support ticket or control panel |
| Business fiber line | ISP or delegated customer | RFC 2317 delegation for small blocks |
| Own address space | Organization itself | Reverse zone on its authoritative servers |
| Residential broadband | ISP only | Generic names, rarely customizable |
Forward-confirmed reverse DNS
Forward-confirmed reverse DNS (FCrDNS) is the practice of checking that a PTR result resolves back to the original address. Because anyone who controls a reverse zone can write any name into a PTR record, a lone reverse result proves little; the forward check confirms that the domain owner also points the name at that address.
The process takes two queries: first the PTR lookup for the address, then an A or AAAA lookup for the returned hostname. If the original address appears in the forward answer, the pair is consistent, and receiving systems treat the hostname as more credible.
The comparison below separates the three lookup patterns that are often confused.
| Lookup type | Input | Record queried | What it proves |
|---|---|---|---|
| Forward lookup | Hostname | A or AAAA | Where a name points |
| Reverse lookup | IP address | PTR | Which name the address holder claims |
| FCrDNS | IP address | PTR, then A or AAAA | Both sides agree on the pairing |
Practical uses of rDNS
The most consequential use of rDNS is email deliverability. Large mailbox providers commonly reject or penalize SMTP connections from addresses with missing or generic PTR records, and many expect the PTR name to match the server greeting in the HELO or EHLO command. A sending server without valid reverse DNS often sees messages deferred or filed as spam.
- Network diagnostics: traceroute output shows router names that often reveal location and carrier.
- Log analysis: web and firewall logs become readable when addresses resolve to hostnames.
- Access decisions: some services verify crawlers, such as search engine bots, through FCrDNS.
- Abuse handling: PTR names help identify the network operator responsible for traffic.
For servers that send mail, a sound baseline is a unique PTR per sending address, a hostname that resolves back via forward lookup, and consistency with SPF, DKIM and the HELO name. Generic names such as host-192-0-2-25.isp.example signal a dynamic or residential line and are treated with suspicion.
Limitations and common mistakes
Reverse DNS is weak as a security control on its own, because the PTR content is chosen by the address holder and can name any domain. Only forward confirmation, and ideally cryptographic validation through DNSSEC, raises confidence.
The table below lists frequent problems, their causes and the fix that usually resolves them.
| Symptom | Likely cause | Fix |
|---|---|---|
| Mail rejected for missing PTR | No PTR record for the sending IP | Request a PTR from the address provider |
| FCrDNS check fails | PTR name has no matching A record | Add a forward record for the hostname |
| PTR change ignored | Old answer still in DNS cache | Wait for the time to live to expire |
| Slow application logins | Server performs reverse lookups on every connection | Disable or cache lookups in the service |
| Several names expected | Multiple PTR records per address | Keep one PTR per address |
A further pitfall is IPv6 coverage. Address blocks are so large that providers rarely populate every PTR, and some generate answers dynamically, so administrators should define PTR records explicitly for every IPv6 address that sends mail or offers public services.
The short version
Most of the time, the Internet works like a phone book: you look up a name and get a number. A reverse DNS lookup does the opposite. It starts with the number, the IP address, and asks which name belongs to it.
This matters because computers use that name as a quick identity check. An email server that receives a message from an unnamed address is more cautious, much as a person is more careful with a call from an unknown number. A proper reverse record helps a server look trustworthy, but it is a hint, not proof.
Where it makes a difference
A mid-sized accounting firm moves its outgoing mail server to a new virtual machine at a cloud provider. Within a day, clients report that invoices sent from the firm arrive in their spam folders, and some large mailbox providers return temporary rejections.
The administrator runs dig -x on the new address and finds a generic provider hostname that does not match the server greeting, mail.firm.example. Through the provider console, the PTR is changed to mail.firm.example, and an A record for that name is confirmed to point at the same address, so the pair passes forward-confirmed reverse DNS.
After the old cached answers expire, roughly within the configured time to live of one hour, rejections stop and delivery to inboxes returns to normal without any change to message content.