Back to blog
Reputation··3 min read·WillItInbox Team

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.

PTRrDNSInfrastructure

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.

DNS record
HostTypeValueTTL
42.113.0.203.in-addr.arpaPTRmail.example.com.3600
PTR record example. Note the reversed IP in the host name.

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.

Verifying FCrDNSshell
# 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

ProviderHow to set PTR
AWS EC2Submit Elastic IP PTR request via console (only works for verified domains)
DigitalOceanSet droplet name to a FQDN; PTR is automatic
LinodePer-IP rDNS field in the network settings
HetznerrDNS field per IP in Cloud or Robot console
GCPConsole: VM → External IP → set PTR domain
Self-managed datacenterAsk your IP allocator (RIR or upstream ISP)
ESPs (SendGrid, Mailgun)Handled for you — verify in their docs
PTR setup by hosting type.

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.

Postfix main.cf — matching HELO and PTRconf
# PTR for 203.0.113.42 returns mail.example.com
myhostname = mail.example.com
smtp_helo_name = mail.example.com

Verifying

  1. Run dig +short -x <your-ip>. Expect a hostname on a domain you control.
  2. Run dig +short A <returned-hostname>. Expect your IP back.
  3. Send a test through WillItInbox — the report's infrastructure category breaks PTR results out individually.
  4. Watch the message header — most receivers add an X-Originating-IP or Received: ... helo=... line that reveals what they thought of you.

Frequently asked questions

Keep reading