Last reviewed:
Translated from German; if the versions differ, the German version applies.
Reverse DNS
In short: Reverse DNS (rDNS) is the reverse lookup in the Domain Name System: instead of finding the IP address for a name, it leads from an IP address to a hostname. This mapping is stored as a PTR record in a separate part of the DNS (RFC 1035, Section 3.5).
How the reverse lookup works
For IPv4 addresses there is the special domain in-addr.arpa. The four numbers of the address appear there in reverse order; the data for the address 10.2.0.52 is therefore found under 52.0.2.10.in-addr.arpa (RFC 1035, Section 3.5). The reversal looks awkward, but it allows the administration of entire address ranges to be delegated to their holders.
For IPv6 the special domain is called ip6.arpa. There, the address is split into single hexadecimal digits, again from back to front, separated by dots (RFC 3596, Section 2.5).
This leads to a practical peculiarity: whoever has registered a domain usually cannot create the PTR record themselves. Responsibility lies with whoever has been allocated the block of IP addresses – for a rented server, its provider; for a sending service, the service.
Why mailbox providers care
Gmail requires all senders to ensure that sending domains or sending IP addresses have valid forward and reverse DNS records. The IP address must match the hostname named in the PTR record, and this hostname needs an A or AAAA record that points back to the same address. Yahoo likewise requires valid records in both directions and recommends PTR names that are not generic and recognisably belong to your own domain; senders should avoid names that look like a dynamically assigned address.
How it differs
- Reverse DNS and SPF: SPF is maintained by the domain and lists permitted servers. The PTR record is maintained by the holder of the address range and names one server. The two complement each other.
- Reverse DNS and MX: The MX record says where email for a domain is delivered. It has nothing to do with sending; reverse DNS concerns the sending server.
- Reverse DNS and blocklists: DNS-based blocklists also reverse the IP address, but append it to the name of the list instead of
in-addr.arpa(RFC 5782, Section 2.1).
Easily confused
- “PTR record for the domain”: A PTR record does not exist for a domain, but for an IP address. Created in the zone of your own domain, it will not be found by the reverse lookup.
- Reverse proxy: Despite the similar name, a server that passes requests on to other servers. It has nothing to do with the reverse lookup.
Example
A mail server with the example address 192.0.2.25 and the name mail.example.de. For the check in both directions to pass, two records are needed, located in two different zones:
; in the zone of the domain (maintained by the domain owner)
mail.example.de. A 192.0.2.25
; in the zone of the address range (maintained by the holder of the IP address)
25.2.0.192.in-addr.arpa. PTR mail.example.de.
A name such as host-192-0-2-25.dynamic.provider.example has the right form, but is exactly the kind of generic name that Yahoo advises against.
Frequently asked questions
How do I check the reverse DNS record? Look up the PTR record of the sending IP address, for example with nslookup 192.0.2.25, and then the address of the name returned. Both answers must match.
Do I have to take care of this myself as a newsletter sender? If a sending service sends for you, it uses its own servers and their records. Senders who send via their own server or their own IP address have to take care of it themselves.
Does this also apply to IPv6? Yes. Gmail expressly mentions the AAAA record for IPv6; the PTR record is then located under ip6.arpa.
Related terms
Matching tool
- Pre-send checklist: the technical points before a mailing, to tick off.