On this page
What this issue is
Normal DNS turns a name into an IP address. Reverse DNS does the opposite: it turns an IP address into a name, using a PTR record. When your own mail server (for example Postfix or Exim on a VPS) sends an email, the receiving server looks up the PTR for your sending IP.
Why it costs you leads or sales
If your site sends form notifications, order confirmations or quote replies from a self-hosted server, a missing PTR can make those messages bounce or land in spam. You may not see an error on the site. The form says thank you, but the lead email never reaches your inbox, or your reply never reaches the customer.
- Visitor submits formForm shows a thank-you message
- Your mail server sendsConnects from an IP with no PTR
- Receiver checks reverse DNSNo PTR found, mail rejected or junked
- Lead in inbox or CRMNever arrives
- Sales follow-upNobody knows the lead exists
The form works, but the email is refused at the receiving server.
Example: share of 100 test emails reaching the inbox before and after adding a matching PTR. Your numbers will differ.
How to check if your site has it
First find the public IP your mail server sends from. Check the headers of a test email you sent, or look at your server's outbound IP. Then run a reverse lookup.
# Reverse lookup: should return your mail hostname
dig -x 203.0.113.10 +short
# Forward lookup: should return the same IP
dig mail.example.com A +short
# Alternative on Windows/macOS/Linux
nslookup 203.0.113.10- The reverse lookup returns a hostname, not an empty answer
- The hostname is your own (for example mail.example.com), not a generic provider name
- That hostname resolves back to the same IP
- The hostname matches what your server announces in its SMTP greeting (HELO/EHLO)
- Only one PTR is set for the IP
How to fix it
You cannot set a PTR in your own domain's DNS zone. The PTR lives in the zone of whoever owns the IP block, which is your hosting or cloud provider. That is the most common reason people cannot find the setting.
Pick the mail hostname
Choose a name such as mail.example.com. It should be a hostname you control and that your server uses in its HELO/EHLO greeting.
Create the A record
In your domain's DNS, add an A record from mail.example.com to the server's public IP (and an AAAA record if you send over IPv6).
Set the PTR at your IP provider
Open your host's control panel and look for 'Reverse DNS', 'rDNS' or 'PTR' on the server or IP settings. Enter mail.example.com. If there is no such option, open a support ticket and ask them to set it.
Align the server greeting
Set your mail software's hostname to the same name. In Postfix, set myhostname = mail.example.com in main.cf, then reload.
Wait for DNS to update and re-test
Run the dig commands again. Changes can take from minutes to a few hours to show everywhere.
sudo postconf -e 'myhostname = mail.example.com'
sudo systemctl reload postfix
postconf myhostnameHow to confirm it's fixed
Repeat the lookups
dig -x on the IP should return your mail hostname, and dig on the hostname should return the same IP.
Send a real test email
Send from the server to a Gmail and an Outlook address. Open the message and view the original headers.
Read the headers
Look at the Received lines and the Authentication-Results. The sending IP should show your hostname, not a bare IP or a generic name.
Check the mail log
On the server, check the mail log for deferrals or rejections that mention reverse DNS, 'PTR' or 'rDNS' and confirm they have stopped.
How to prevent it happening again
- Set the PTR as soon as you provision a new mail server or change its IP
- Update the PTR whenever you migrate servers or change the mail hostname
- Keep the A record, PTR and server hostname in sync
- Re-run the dig check after any provider or network change
- Keep SPF, DKIM and DMARC in place, since PTR alone does not guarantee delivery
- Document who at your host handles PTR requests
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. A reverse DNS record is a network and DNS setting on your mail server's IP, and FunnelGuard does not inspect it. The kind of tool that fits is an email deliverability or DNS and mail-server testing tool, such as a reverse DNS lookup, an SMTP diagnostics test or a blocklist and mail-health monitor.
Questions people ask
What is a PTR record and why does my mail server need one?
A PTR record is reverse DNS: it maps an IP address to a hostname. Receiving mail servers look it up to see whether a sender looks legitimate. Without one, your email is more likely to be rejected or marked as spam.
Why are my emails going to spam from my own mail server?
Common causes are a missing PTR record, missing SPF, DKIM or DMARC, and a poor IP reputation. Check the PTR first with dig -x on your sending IP, then review your authentication records.
How do I set up a PTR record for my mail server?
Ask the owner of the IP address, usually your hosting or cloud provider, to set it, or use the Reverse DNS option in their control panel. Point it to your mail hostname, such as mail.example.com. Make sure that hostname has an A record pointing back to the same IP.
Why can't I add a PTR record in my domain's DNS?
PTR records are stored in the reverse zone controlled by whoever owns the IP block, not in your domain's zone. Your domain registrar or DNS host usually cannot create it. Use your server host's panel or support.
How do I check if my reverse DNS is set correctly?
Run dig -x followed by your server's IP, or use nslookup on the IP. It should return your mail hostname, and a lookup of that hostname should return the same IP.
Does a missing PTR record affect Gmail and Outlook delivery?
Yes. Large providers can reject or junk mail from IPs with no reverse DNS or with one that does not match the forward record. Fixing the PTR does not guarantee inbox placement, but it removes a common reason for rejection.
Do I need a PTR if I send through SendGrid, Mailgun or Postmark?
Usually not for your own server, because the service sends from its own IPs with its own reverse DNS. You still need SPF and DKIM set up for that service. You only need your own PTR if you send directly from an IP you control.
Related issues
- DLV-057Sending domain or IP on a blocklist (Spamhaus, Barracuda)Fix guide
- DLV-058Shared hosting IP has poor reputationFix guide
- DLV-048Domain has no SPF recordFix guide
- DLV-052DKIM selector record missing or wrong keyFix guide
- DLV-053DMARC record missing (Gmail/Yahoo bulk sender requirement)Fix guide
- DLV-062TLS not offered by receiving MXFix guide