DNS PTR Record Explained — Reverse DNS Lookups
Learn how PTR records enable reverse DNS lookups, mapping IP addresses back to hostnames. Covers in-addr.arpa, ip6.arpa, FCrDNS, email deliverability, and practical dig examples.
Answer snapshot
A PTR (Pointer) record maps an IP address back to a hostname — the reverse of an A or AAAA record. Reverse DNS zones live under `.in-addr.arpa` (IPv4) and `.ip6.arpa` (IPv6), with the address octets reversed. PTR records are managed by whoever owns the IP block — usually your hosting provider or ISP, not your DNS provider. Critical for email deliverability: receiving mail servers reject mail from senders without matching forward and reverse DNS (FCrDNS).
What you'll learn
- Understand what PTR records are and how reverse DNS zones work for IPv4 and IPv6
- Learn why reverse DNS matters for email deliverability, security, and network operations
- Master Forward-Confirmed reverse DNS (FCrDNS) and how to verify it with dig
- Know who manages PTR records and how to request rDNS from your provider
Every DNS lookup you are familiar with is probably a forward lookup — you type a domain name like example.com and get back an IP address. A PTR (Pointer) record does the opposite. It maps an IP address back to a hostname, enabling what is known as a reverse DNS lookup (rDNS).
Reverse DNS is a critical piece of internet infrastructure. Mail servers rely on it to filter spam, security teams use it to identify hosts in log files, and network operators depend on it for troubleshooting. If you run any internet-facing server, understanding PTR records is essential.
How Forward DNS Differs from Reverse DNS
In forward DNS, A records map a domain name to an IPv4 address, and AAAA records map a domain name to an IPv6 address. PTR records reverse that relationship:
| Direction | Record Type | Example |
|---|---|---|
| Forward | A | mail.example.com -> 192.0.2.25 |
| Forward | AAAA | mail.example.com -> 2001:db8::25 |
| Reverse | PTR | 192.0.2.25 -> mail.example.com |
| Reverse | PTR | 2001:db8::25 -> mail.example.com |
Forward and reverse DNS are maintained independently. Creating an A record does not automatically create a matching PTR record. You must configure both sides separately, often with different providers.
Tip: Think of forward DNS as a phone book (name to number) and reverse DNS as caller ID (number to name).
How Reverse DNS Zones Work
Reverse DNS uses special domain namespaces managed under the .arpa top-level domain. The IP address is reversed and appended to the appropriate .arpa zone.
IPv4: in-addr.arpa
For IPv4, you reverse the four octets of the address and append .in-addr.arpa. For the IP address 192.0.2.25:
25.2.0.192.in-addr.arpa. 3600 IN PTR mail.example.com.The reverse zone for the /24 network 192.0.2.0/24 would be 2.0.192.in-addr.arpa. You can query this with dig:
# Reverse lookup for an IPv4 address
dig -x 192.0.2.25
# Equivalent manual query against the in-addr.arpa zone
dig PTR 25.2.0.192.in-addr.arpaIPv6: ip6.arpa
IPv6 reverse DNS works the same way but uses individual nibbles (4-bit hex digits) instead of octets. Each nibble is separated by a dot and the whole string is reversed under ip6.arpa.
For the address 2001:0db8:85a3:0000:0000:8a2e:0370:7334:
4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa. 3600 IN PTR mail.example.com.That is 32 nibbles separated by dots — the full expanded form of the IPv6 address. Query it with:
# Reverse lookup for an IPv6 address
dig -x 2001:db8:85a3::8a2e:370:7334The dig -x command handles the nibble expansion and zone construction automatically.
Tip: You never need to manually expand IPv6 nibbles for queries. The
-xflag indigdoes it for you.
Why Reverse DNS Matters
Email Deliverability
This is the single most important reason to configure PTR records. Major email providers — Gmail, Outlook, Yahoo — check the reverse DNS of connecting mail servers. Their logic is straightforward:
- An SMTP connection arrives from IP
192.0.2.25 - The receiving server performs a reverse lookup on
192.0.2.25 - If no PTR record exists, or the PTR hostname does not resolve back to
192.0.2.25, the email is flagged or rejected
Without valid reverse DNS, your emails will likely land in spam or be blocked entirely. PTR records work alongside SPF, DKIM, and DMARC to establish sender legitimacy. For any MX record you configure, the IP address it resolves to should have a matching PTR.
Security and Threat Analysis
Firewalls, intrusion detection systems, and SIEM platforms perform reverse lookups to enrich log data. An IP address like 198.51.100.47 in a log is hard to contextualize; the hostname scanner.malicious-actor.example is immediately informative.
Network Troubleshooting
Tools like traceroute and mtr use reverse DNS to display hostnames at each hop. This makes it far easier to identify which network or provider is causing latency or packet loss. Without PTR records on router interfaces, you see only raw IP addresses.
Who Manages PTR Records
This is where reverse DNS differs most from forward DNS. You typically do not manage PTR records in the same place you manage your A or AAAA records.
| Scenario | Who manages PTR records |
|---|---|
| Cloud VM (AWS, GCP, Azure) | The cloud provider — configure via their console |
| Dedicated server / colocation | The hosting provider or IP block owner |
| ISP-provided IP address | Your ISP — contact their support |
| Your own IP allocation (RIR) | You — delegate the reverse zone to your nameservers |
The entity that holds the IP allocation from a Regional Internet Registry (RIR) controls the reverse zone. If you lease a server from a hosting provider, they control the reverse zone for that IP range. You must ask them to set the PTR record for your IP.
How to Request rDNS from Your Provider
Most providers offer a self-service option:
- Cloud providers: Look for "Reverse DNS" or "PTR record" settings in the networking section of your instance or elastic IP configuration
- Hosting providers: Check your server control panel for an rDNS or PTR option
- ISPs: Open a support ticket requesting a PTR record for your static IP
When making the request, specify:
- The IP address (e.g.,
192.0.2.25) - The desired PTR hostname (e.g.,
mail.example.com) - Confirm that the forward A record for that hostname already points to the IP
Tip: Always create the forward A/AAAA record before requesting the PTR. Providers often verify that the forward record exists.
Forward-Confirmed Reverse DNS (FCrDNS)
FCrDNS is the gold standard for reverse DNS configuration. It means:
- The PTR record for an IP resolves to a hostname
- That hostname's A or AAAA record resolves back to the same IP
This bidirectional confirmation proves that the domain owner and the IP owner agree on the association. Many email providers and security tools require FCrDNS for full trust.
Verifying FCrDNS with dig
# Step 1: Reverse lookup — find the hostname for the IP
dig -x 192.0.2.25 +short
# Expected output: mail.example.com.
# Step 2: Forward lookup — verify the hostname points back
dig A mail.example.com +short
# Expected output: 192.0.2.25
# If both match, you have valid FCrDNSFor IPv6:
# Step 1: Reverse lookup
dig -x 2001:db8::25 +short
# Expected output: mail.example.com.
# Step 2: Forward lookup
dig AAAA mail.example.com +short
# Expected output: 2001:db8::25If either step fails or the results do not match, FCrDNS is broken.
PTR Records for Email Servers
Configuring PTR records correctly is one of the most important steps in mail server setup, right alongside configuring your MX records and SPF/DKIM/DMARC.
Requirements for Mail Server PTR
- PTR must exist: The IP your mail server sends from must have a PTR record
- PTR must match HELO/EHLO: The hostname in the PTR should match what your server announces in the SMTP HELO/EHLO greeting
- Forward record must match: The PTR hostname must have an A or AAAA record pointing back to the same IP (FCrDNS)
- Avoid generic hostnames: PTR values like
host-192-0-2-25.isp.examplesignal a residential or unmanaged IP — mail servers distrust these
Example: Complete Mail Server DNS
; Forward DNS (managed in your DNS zone)
mail.example.com. 3600 IN A 192.0.2.25
mail.example.com. 3600 IN AAAA 2001:db8::25
example.com. 3600 IN MX 10 mail.example.com.
; Reverse DNS (managed by your IP provider)
25.2.0.192.in-addr.arpa. 3600 IN PTR mail.example.com.Testing Your Mail Server PTR
# Check PTR record
dig -x 192.0.2.25
# Verify FCrDNS
dig A $(dig -x 192.0.2.25 +short) +short
# Check MX record points to a host with valid PTR
dig MX example.com +short
# Then check PTR for each MX target's IPIPv6 Reverse DNS: The Full Picture
IPv6 reverse DNS follows the same principles as IPv4 but is more complex because of the address length. A full IPv6 reverse record name contains 32 nibble labels.
Constructing an IPv6 PTR Name
Take the address 2001:db8:abcd:0012:0000:0000:0000:0001:
- Expand fully:
2001:0db8:abcd:0012:0000:0000:0000:0001 - Remove colons:
20010db8abcd001200000000000000001 - Reverse the characters:
1000000000000000002100dcba8bd01002 - Insert dots between each character:
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.1.0.0.d.c.b.a.8.b.d.0.1.0.0.2 - Append
.ip6.arpa:1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.1.0.0.d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
Tip: Use
dig -xto avoid manual nibble expansion. For programmatic generation, tools likeipv6calcor Python'sipaddressmodule can produce the.ip6.arpaname automatically.
IPv6 Reverse Zone Delegation
IPv6 reverse zones are typically delegated on nibble boundaries. Common delegation sizes:
| Allocation | Zone |
|---|---|
| /48 | 2.1.0.0.d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa |
| /32 | 8.b.d.0.1.0.0.2.ip6.arpa |
| /16 | 1.0.0.2.ip6.arpa |
If you have your own IPv6 allocation, you can host the reverse zone on your authoritative nameservers and manage PTR records directly through DNScale.
Practical dig Examples
# Basic reverse lookup
dig -x 8.8.8.8
# Returns: dns.google.
# Short output only
dig -x 8.8.8.8 +short
# Returns: dns.google.
# Query against a specific nameserver
dig -x 192.0.2.25 @ns1.dnscale.eu
# Reverse lookup with full answer section
dig -x 1.1.1.1 +noall +answer
# Returns: 1.1.1.1.in-addr.arpa. 1800 IN PTR one.one.one.one.
# IPv6 reverse lookup
dig -x 2606:4700:4700::1111 +short
# Returns: one.one.one.one.
# Trace the delegation path for a reverse lookup
dig -x 192.0.2.25 +traceCommon Mistakes
-
Forgetting the forward record: You set a PTR to
mail.example.combut never create the matching A record. FCrDNS fails and email deliverability suffers. -
Mismatched HELO hostname: Your mail server announces
smtp.example.comin HELO but the PTR points tomail.example.com. Some receiving servers will reject this. -
Multiple PTR records per IP: While technically allowed by the DNS protocol, having more than one PTR record per IP address causes unpredictable behavior. Stick to one PTR per IP.
-
Using the wrong provider: You try to create a PTR record in your forward DNS zone instead of with your IP provider. PTR records live in reverse zones controlled by the IP allocation holder.
-
Ignoring IPv6 PTR: You configure PTR for your IPv4 address but not for your IPv6 address. As IPv6 adoption grows, mail servers increasingly check IPv6 rDNS too.
-
Generic ISP hostnames: Leaving the default ISP-assigned PTR like
host-192-0-2-25.residential.isp.examplesignals that the IP is not a managed mail server.
Testing and Verification Checklist
Run these commands to verify your reverse DNS setup:
# 1. Check PTR exists
dig -x YOUR_IP +short
# 2. Verify FCrDNS
HOSTNAME=$(dig -x YOUR_IP +short)
dig A $HOSTNAME +short
# 3. Confirm HELO matches PTR (connect to your own mail server)
echo "EHLO test" | nc -w5 YOUR_IP 25
# 4. Check from an external perspective
dig -x YOUR_IP @8.8.8.8 +shortRelated Record Types
- A Record — Forward lookup: domain to IPv4 address
- AAAA Record — Forward lookup: domain to IPv6 address
- MX Record — Mail server designation, closely tied to PTR configuration
- SPF, DKIM, DMARC — Email authentication records that complement PTR
- DNS Record Types — Overview of all DNS record types
- What is DNS — Fundamentals of the Domain Name System
Conclusion
PTR records are the backbone of reverse DNS, and they play a decisive role in email deliverability, security logging, and network diagnostics. While forward DNS records like A and AAAA are managed in your DNS hosting provider, PTR records are controlled by whoever owns the IP address allocation. Always configure FCrDNS — matching forward and reverse records — and verify your setup with dig -x before putting any mail server into production.
Frequently asked questions
- Who manages PTR records — me or my DNS provider?
- Whoever controls the IP block. For IPs you rent from a cloud provider (AWS, GCP, Hetzner, OVH, etc.), the provider controls the reverse zone — you typically request a PTR via their dashboard or API, not your DNS provider. For IPs you own (your own ASN, RIR allocation), you manage the reverse zone yourself, often delegated to your DNS provider via the RIR.
- Why do receiving mail servers care about PTR records?
- Anti-spam. Forward-Confirmed reverse DNS (FCrDNS) — where the PTR resolves back to a name that A-records to the same IP — is a basic sanity check. Senders without matching forward/reverse DNS are statistically much more likely to be spammers. Major receivers (Gmail, Outlook, Yahoo) treat missing or mismatched rDNS as a strong negative signal.
- What's the format of the PTR record name?
- For IPv4: reverse the octets and append `.in-addr.arpa`. So 192.0.2.1 becomes `1.2.0.192.in-addr.arpa`. For IPv6: each nibble reversed, dot-separated, append `.ip6.arpa`. So `2001:db8::1` becomes `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`. Tools generate this; you rarely write it by hand.
- How do I check rDNS for an IP?
- `dig -x 192.0.2.1` — dig's `-x` flag does the arpa-name expansion and queries the PTR. Or `host 192.0.2.1`. To verify FCrDNS, run `dig -x` then `dig` on the returned name; the A record should resolve back to the original IP.
- Should I have a PTR for every IP I run?
- For mail-sending IPs: absolutely yes. For web-server IPs: not strictly required, but strongly recommended — many security scanners and audit tools flag missing PTR. For internal-only IPs: not necessary, but consistent rDNS makes troubleshooting easier.
Related guides
Records
DNS A Record Explained — What It Is and How to Use It
Learn what a DNS A record is, how it maps domain names to IPv4 addresses, and how to create, query, and troubleshoot A records with practical dig command examples.
Records
DNS AAAA Record Explained — IPv6 Address Mapping
Learn what a DNS AAAA record is, how it maps domain names to IPv6 addresses, and how to set up dual-stack DNS with practical dig command examples.
Records
DNS CNAME Record Explained — Aliases and Canonical Names
Learn how DNS CNAME records create domain aliases, when to use them over A records, and how to avoid common pitfalls like apex restrictions and CNAME chains.
Records
DNS MX Record Explained — Mail Exchange Configuration
Learn how DNS MX records route email to mail servers, configure priority-based failover, and set up MX records for Google Workspace, Microsoft 365, and self-hosted mail.
Ready to manage your DNS with confidence?
DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.
Start free