How PTR Records Work
DNS typically works forward: you query a hostname (like mail.example.com) and get an IP address (like 192.0.2.1). PTR records work in reverse: you query an IP address and get a hostname.
Forward DNS (A record): mail.example.com → 192.0.2.1
Reverse DNS (PTR record): 192.0.2.1 → mail.example.com
This reverse lookup lets receiving mail servers verify that the IP address connecting to them has a legitimate hostname identity.
Why PTR Records Matter for Email
Mailbox providers use PTR records as a basic spam check. Legitimate email senders typically:
- Have static IP addresses (not dynamic residential IPs)
- Configure proper reverse DNS for their sending IPs
- Use hostnames that match or relate to their domain
Spammers often send from dynamic IPs, compromised computers, or servers without proper reverse DNS. Checking PTR records helps filter out these sources.
What Happens Without a PTR Record
If your sending IP lacks a PTR record:
- Some mailbox providers will reject email outright
- Others will add spam score points, increasing spam folder likelihood
- Your emails may be delayed while servers retry connections
- Reputation systems may view your IP as suspicious
PTR Record Best Practices
Match Forward and Reverse DNS
Your PTR record hostname should resolve back to your IP address. This is called Forward-Confirmed reverse DNS (FCrDNS).
Example of proper configuration:
- PTR for 192.0.2.1 returns mail.example.com
- A record for mail.example.com returns 192.0.2.1
Both directions match, confirming the relationship.
Use a Meaningful Hostname
The hostname in your PTR record should look legitimate:
- Good: mail.example.com, smtp.example.com, mx1.example.com
- Bad: 192-0-2-1.example.com, host123.genericserver.com
- Worst: No PTR record at all
Avoid hostnames that look automatically generated or unrelated to your domain.
One IP, One PTR
Each IP address should have exactly one PTR record. Multiple PTR records for the same IP can cause unpredictable lookup results.
How to Set Up a PTR Record
PTR records are different from regular DNS records. You cannot add them through your domain registrar or standard DNS provider.
Who Controls PTR Records
The organization that owns the IP address controls its PTR record. This is typically:
- Cloud providers: AWS, Google Cloud, Azure, DigitalOcean
- Hosting providers: Your server host
- ISPs: For IPs they assign
- Email service providers: For IPs they provide
Setup Process
- Identify who controls your sending IP address
- Contact their support or find their reverse DNS settings
- Request or configure the PTR record to point to your hostname
- Ensure your forward DNS (A record) matches
- Verify the configuration using lookup tools
Common Provider Instructions
AWS EC2: Request reverse DNS through the EC2 console or AWS support. Requires Elastic IP.
Google Cloud: Set PTR records for Compute Engine instances through the console.
DigitalOcean: PTR records are set automatically based on droplet name when using their DNS.
Checking Your PTR Record
Verify your PTR record configuration using these methods:
Command Line
On Linux or Mac, use the dig command:
dig -x 192.0.2.1
Or use nslookup:
nslookup 192.0.2.1
Online Tools
MXToolbox and similar services offer reverse DNS lookup tools. Enter your IP address to see the PTR record and verify it resolves correctly.
PTR Records and Shared IPs
If you send email through an email service provider using shared IPs, they handle PTR records for you. The PTR record will point to their hostname, not yours.
This is normal and expected. Receiving servers understand that shared infrastructure uses the provider's hostnames. Your domain reputation is established through authentication (SPF, DKIM, DMARC) rather than PTR records.
You only need to worry about PTR records when:
- You have dedicated sending IPs
- You run your own mail server
- You send from infrastructure you control
Troubleshooting PTR Issues
No PTR Record Found
Contact your IP provider to set up reverse DNS. This is the most common issue and usually requires a support ticket or configuration change with whoever assigned your IP.
PTR Does Not Match Forward DNS
Ensure the hostname in your PTR record has an A record pointing back to the same IP. Both lookups must be consistent.
Generic or ISP Hostname
If your PTR shows something like "192-0-2-1.isp.com", you have default ISP reverse DNS. Request a custom PTR record for your sending hostname.
Multiple PTR Records
If multiple PTR records exist for your IP, receiving servers may get inconsistent results. Remove duplicates so only one PTR record exists.