Reverse DNS (PTR) Does Not Match: How to Fix It
Reverse DNS mismatch: the sending IP has a PTR record, but its name does not point back to the same IP. How to spot each kind of mismatch and fix it.
A reverse DNS mismatch means the sending server's IP address does have a PTR record, but the name in it does not lead back to the same IP. Receivers check both directions: the IP must point to a name, and that name must point to the same IP. When the two disagree, strict servers refuse the mail and others score it as suspicious. This page covers the mismatch case. If the IP has no PTR record at all, Gmail's 550-5.7.25 PTR guide covers that. The fix belongs to whoever runs the sending server.
Quick answer
Look up the PTR of your sending IP, then look up the name it returns. If that name does not point back to the same IP, make them agree: either change the PTR in your hosting provider's panel to a name that points to this IP, or add an A record for the PTR's name pointing to this IP. Use that same name as the server's own hostname. If you use a hosted email provider, this is their job, not yours. If you see this on mail from a hosted provider, a device or app is probably sending directly instead of through the provider.
What it means in plain words
A normal DNS lookup turns a name into a number, like looking up a phone number in a phone book. Reverse DNS goes the other way: you start with the number and ask whose it is. That answer comes from a PTR record, which is set by the company that owns the IP address. Mail servers do both lookups and compare. If the IP says "I am mail.example.com" but mail.example.com says "my number is something else", the two do not agree. Mail admins call a matching pair forward-confirmed reverse DNS, or FCrDNS. Google's sender rules ask for it on every sending IP, and Yahoo asks for reverse DNS that is "valid, meaningful, non-generic".
Is it your side or theirs?
The sender's. Reverse DNS is about the server that delivered the message, not your domain and not the person receiving it. If you run the server, a VPS or a web host that sends mail directly, you fix it. If you send through a hosted provider, the provider owns the IP and must fix it. The receiver only reports the problem. The one exception is a receiver whose own DNS lookups are failing, which makes every sender look broken; that shows up as many unrelated senders bouncing at once.
The kinds of mismatch you will see
- The PTR name has no A record at all. For example, the PTR says mail.example.com but nobody ever created that name in DNS.
- The PTR name points to a different IP. Common after moving to a new server: the A record moved, the old PTR stayed, or the other way round.
- A generic PTR from the host, such as static.25.113.0.203.provider.net, that does not resolve back. Many receivers treat these as home or untrusted connections.
- IPv6 forgotten. The IPv4 pair is perfect, but the server also sends over IPv6, and that address has no matching name.
- Several PTR records on one IP, each pointing to a different site. Use one PTR per sending IP.
- A HELO name that differs from the PTR. HELO is the name the server announces when it connects. A different HELO is not always fatal, but some filters score it, so keep them the same.
Check both directions
Run these from any computer. The name in step one must give back the IP you started with in step two:
# 1. IP to name (reverse)
dig -x 203.0.113.25 +short
# mail.example.com.
# 2. name back to IP
dig mail.example.com A +short
# 203.0.113.25 <- must match the IP above
# IPv6 too, if the server has it
dig -x 2001:db8::25 +short
dig mail.example.com AAAA +short
# Windows
nslookup 203.0.113.25
nslookup mail.example.comFree business email on your own domain
OquMail gives you up to 15 mailboxes on your domain — free — with guided SPF/DKIM/DMARC, webmail, IMAP/SMTP for any mail app, and a send API. Setup is a few DNS records; changes usually take effect within minutes, occasionally up to 48 hours. Start at oqumail.com.
Fix it, step by step
- Write down every IP your server sends mail from, IPv4 and IPv6. The bounce or your server's network settings show them.
- Pick one hostname per IP, such as mail.yourdomain.com.
- In your domain's DNS, create an A record for that name pointing at the IPv4 address, and an AAAA record for the IPv6 address if there is one. Remove old records for the name that point elsewhere.
- In your hosting provider's panel, open the IP's reverse DNS or PTR setting and set it to the same name. This lives with the IP owner, not in your domain's DNS. Many hosts only accept it once the A record exists.
- Set the mail server's hostname and HELO name to that name too. In Postfix this is myhostname.
- Wait for the old values to expire, often minutes to a few hours, then repeat the checks above from outside your network.
- If you cannot change the PTR at all, as on most home and office lines, send through a provider's SMTP server instead. What an SMTP relay is explains the setup.
What the bounce usually looks like
Wording depends on the receiver. Postfix servers with the strictest check say "450 4.7.1 Client host rejected: cannot find your hostname", explained in the cannot find your hostname fix. Gmail uses 5.7.25 for both a missing and a mismatched PTR. Other filters do not bounce at all and simply send the mail to spam, which is why a mismatch can hide for months. If mail lands in junk only at some providers, check reverse DNS early.
If you use OquMail
OquMail's sending servers have matching reverse DNS: the sending IP points to mail.oqumail.com, and mail.oqumail.com points back to the same IP. There is no PTR record for you to add on your own domain. If a receiver still complains about reverse DNS, the message did not leave through OquMail. Check that the app, website or printer is set to mail.oqumail.com, port 587, STARTTLS, with the full mailbox address as the username. Then confirm your five dashboard records are live: ownership TXT, MX, SPF (v=spf1 mx a:mail.oqumail.com ~all), DKIM and DMARC. The MX lookup and SPF checker help.
Common questions
Does my PTR have to match my email domain?
No. It must match the server's own name in both directions. Mail from shop.com can leave a server called mail.provider.com. A name on your own domain only matters if you run the server.
Where do I change a PTR record?
With whoever owns the IP address: your hosting or cloud provider for a server, your internet provider for an office line. Your domain registrar's DNS panel cannot set it.
Can a reverse DNS mismatch send email to spam?
Yes. Many filters do not bounce on it but count it against the message. Fixing it often moves mail from junk to the inbox at stricter providers.
Want to see how your own domain is set up? Use the free SPF checker and MX lookup: they run in your browser and store nothing.