PTR records and reverse DNS: the small fix with big impact
Why receivers reject mail from IPs without proper reverse DNS, how PTR records work, and the one-record fix most self-hosters miss.
Every receiver runs the same opening check on every connection: who is this IP, really? A reverse DNS (PTR) lookup is the cheapest way to ask. If your IP doesn't answer, or answers with generic nonsense, you've failed a vibes check before you sent a single byte of message.
What a PTR record looks like
PTR records live in the in-addr.arpa (IPv4) or ip6.arpa (IPv6) zone. The IP is reversed and concatenated with the zone suffix. For 203.0.113.42 the PTR query is 42.113.0.203.in-addr.arpa.
| Host | Type | Value | TTL |
|---|---|---|---|
| 42.113.0.203.in-addr.arpa | PTR | mail.example.com. | 3600 |
Forward-confirmed reverse DNS (FCrDNS)
Receivers don't just check that a PTR exists — they check that the hostname it returns also resolves back to the original IP via an A or AAAA lookup. This is FCrDNS, and it's the actual gate. A mismatch is treated the same as no PTR at all.
# Step 1: PTR lookup
dig +short -x 203.0.113.42
# Returns: mail.example.com.
# Step 2: Forward lookup of the result
dig +short A mail.example.com
# Should return: 203.0.113.42
# If both match, FCrDNS passes.Who sets the PTR
| Provider | How to set PTR |
|---|---|
| AWS EC2 | Submit Elastic IP PTR request via console (only works for verified domains) |
| DigitalOcean | Set droplet name to a FQDN; PTR is automatic |
| Linode | Per-IP rDNS field in the network settings |
| Hetzner | rDNS field per IP in Cloud or Robot console |
| GCP | Console: VM → External IP → set PTR domain |
| Self-managed datacenter | Ask your IP allocator (RIR or upstream ISP) |
| ESPs (SendGrid, Mailgun) | Handled for you — verify in their docs |
PTR for IPv6
Most major receivers — Gmail in particular — actively require PTR for IPv6 senders, often more strictly than for IPv4. The format is verbose: each hex digit reversed and dot-separated, ending in ip6.arpa. Most providers expose a friendly UI; you rarely write the raw record.
HELO/EHLO matching
The hostname your MTA announces in HELO/EHLO should match the PTR. Most filtering engines treat a HELO-PTR mismatch as another negative signal. Configure your MTA's myhostname (Postfix), dkimprovidername (Exim), or equivalent to match exactly.
# PTR for 203.0.113.42 returns mail.example.com
myhostname = mail.example.com
smtp_helo_name = mail.example.comVerifying
- Run
dig +short -x <your-ip>. Expect a hostname on a domain you control. - Run
dig +short A <returned-hostname>. Expect your IP back. - Send a test through WillItInbox — the report's infrastructure category breaks PTR results out individually.
- Watch the message header — most receivers add an
X-Originating-IPorReceived: ... helo=...line that reveals what they thought of you.
Frequently asked questions
Keep reading