Gmail "550 5.7.25 The IP address sending this message does not have a PTR record setup": how to fix

What's happening: Gmail rejected your message because the IP that sent it has no reverse DNS (PTR) record, or the PTR name doesn't resolve back to the same IP. Gmail requires every sender to have matching forward and reverse DNS. This is about the sending server's IP, not your domain's SPF, DKIM or DMARC, so those can all pass and you still get this bounce.

How to fix it

  1. Find the sending IP in the bounce or in the message headers (the first Received line from your server).
  2. Look up its PTR: run nslookup or dig -x on the IP. No answer means there is no PTR record.
  3. PTR records are set by whoever owns the IP, not in your domain's DNS. On a VPS or cloud server, set the reverse DNS name in your host's control panel (often by naming the server, e.g. mail.yourdomain.com). Otherwise ask your hosting provider or ISP.
  4. Make the forward record match: mail.yourdomain.com must have an A (or AAAA for IPv6) record pointing back to the same IP. Gmail checks both directions.
  5. If you send over IPv6, the IPv6 address needs its own PTR. The quickest fix is often to send over IPv4 only.
  6. If you send through Google Workspace, Microsoft 365 or a big email service, their IPs already have PTRs: the bounce means some mail is leaving from your own server or app instead. Route that mail through your provider.

Not sure which record is wrong? Check your domain free: it shows which of SPF, DKIM and DMARC is failing, in 5 seconds, no signup.

Other fix guides