PTR Record — Reverse DNS Lookup
Learn how PTR records enable reverse DNS lookups, mapping IP addresses back to domain names. Essential for email server reputation and network diagnostics.
Zone File Entry
50.113.0.203.in-addr.arpa. IN PTR mail.example.com.
Detailed Explanation
What Is a PTR Record?
A PTR record (Pointer record) maps an IP address back to a domain name — the reverse of what an A or AAAA record does. Reverse DNS lookups using PTR records are critical for email server verification, network troubleshooting, and security logging.
BIND Zone File Syntax
; IPv4 reverse DNS (in-addr.arpa zone)
; For IP 203.0.113.50, reverse the octets:
50.113.0.203.in-addr.arpa. 3600 IN PTR mail.example.com.
; IPv6 reverse DNS (ip6.arpa zone)
; For IP 2001:db8::1, expand and reverse each nibble:
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. 3600 IN PTR mail.example.com.
How Reverse DNS Zones Work
Reverse DNS uses a special domain hierarchy:
- IPv4: The
in-addr.arpadomain. IP octets are reversed — the IP203.0.113.50becomes50.113.0.203.in-addr.arpa. - IPv6: The
ip6.arpadomain. Each hex nibble of the fully expanded address is reversed and dot-separated.
The reversal is necessary because DNS is hierarchical from right to left, while IP addresses are hierarchical from left to right. Reversing the IP address aligns it with the DNS tree structure.
Who Manages PTR Records?
Unlike forward DNS records (A, CNAME, MX), you typically cannot manage PTR records at your domain registrar. PTR records are controlled by whoever owns the IP address block:
- Hosting providers: Most VPS and dedicated server providers allow you to set PTR records through their control panel
- ISPs: For business internet connections, contact your ISP to set PTR records
- Cloud providers: AWS, Google Cloud, and Azure provide reverse DNS configuration in their networking dashboards
- IP block owners: If you own an IP allocation from a RIR (ARIN, RIPE, etc.), you manage the reverse zone yourself
Why PTR Records Matter for Email
Receiving mail servers frequently check whether the sending server's IP address has a valid PTR record that matches its HELO/EHLO hostname. This is called a Forward-Confirmed Reverse DNS (FCrDNS) check:
- Server at
203.0.113.50connects and says HELOmail.example.com - Receiver queries PTR for
203.0.113.50→ getsmail.example.com - Receiver queries A for
mail.example.com→ gets203.0.113.50 - Forward and reverse match → FCrDNS passes
If the PTR record is missing or does not match, many mail servers will reject the message or score it as spam.
Best Practices
- Set PTR for every mail server IP: Missing PTR records are the most common cause of email delivery failures
- Ensure forward-reverse match: The PTR hostname should resolve back to the same IP
- Use a meaningful hostname: Generic PTR records like
host-203-0-113-50.isp.comlook suspicious to email receivers - One PTR per IP: While technically multiple PTR records are allowed, most applications only use the first result
Use Case
Configure PTR records for your mail server IP addresses to pass reverse DNS checks, which is essential for email deliverability and avoiding spam filters.