How do you verify reverse DNS (PTR) alignment for bounce analysis?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
You send an email, it bounces with a vague 550 error, and the bounce message mentions something about reverse DNS. What does that actually mean, and how do you check it?
Every sending IP address should have a PTR record. A PTR record is the reverse of a regular DNS lookup. Instead of mapping a domain name to an IP, it maps an IP address back to a hostname. Receiving mail servers often check this during the SMTP handshake to confirm you are who you say you are.
The specific thing you're verifying is called Forward-Confirmed Reverse DNS, or FCrDNS. It works like this: you look up the PTR for your sending IP, get a hostname back, then look up that hostname in regular DNS. If the hostname resolves back to the same IP you started with, you pass. If it doesn't, or if there's no PTR at all, you have a problem.
There's also a second alignment check worth doing. Your PTR hostname should match the hostname your mail server announces in the SMTP EHLO or HELO banner. A mismatch between those two is a red flag for many receiving servers and can trigger generic 550 blocks or soft rejections that are easy to miss in SMTP transcripts.
How to verify it, step by step:
Step 1. Look up the PTR for your sending IP.
dig -x 192.0.2.1
In the answer section, you're looking for a line ending in PTR followed by a hostname like mail.yourdomain.com. If you see NXDOMAIN or an empty answer, no PTR is configured. That's your first problem to fix.
Step 2. Forward-resolve that hostname.
dig A mail.yourdomain.com
But the IP in the answer should match the sending IP you started with. If it points somewhere else, or gives you nothing, FCrDNS fails and receiving servers will know it.
Step 3. Check your SMTP banner hostname.
Run a quick telnet or openssl connection to your mail server on port 25. The hostname your server announces in the 220 greeting or EHLO response should match the PTR hostname from step 1.
What good results look like:
- PTR for
192.0.2.1returnsmail.yourdomain.com - Forward DNS for
mail.yourdomain.comreturns192.0.2.1 - SMTP banner says
220 mail.yourdomain.com ESMTP - All three match. You're good.
Common things that break this:
- No PTR record at all (most common, often because the IP owner never set one)
- PTR points to a generic hostname like
192-0-2-1.isp.netinstead of your mail server hostname - Forward DNS for the PTR hostname is missing or points to a different IP
- SMTP banner hostname doesn't match the PTR hostname
Now one thing worth knowing: you usually can't set your own PTR record. PTR records are managed by whoever owns the IP block, which is typically your hosting provider or ISP. If you're on a dedicated IP from your ESP, you need to ask them to set it. Most will do this once you have your sending domain confirmed. If you're on a shared IP, this is handled for you already.
If you're chasing down a delivery problem and suspect PTR is part of it, our free Email Header Analyzer can help you read what receiving servers actually reported during delivery. Or if things are actively broken right now, the SOS hotline is free and we'll look at it with you.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.