OquMail
Loading account…
DNS & Setup5 min read

550-5.7.25 Gmail PTR Record Missing: Reverse DNS Fix

Gmail 550-5.7.25 means the sending server's IP has no PTR record, or the PTR does not resolve back. Who sets reverse DNS, how to check it, and the fix.

Gmail's 550-5.7.25 says: "This message was blocked because the sending IP address doesn't have a PTR record, or the forwarding DNS entry doesn't reference the sending IP address. Gmail requires that sending IP addresses have a PTR record." A PTR record is reverse DNS: it maps an IP address back to a hostname. Gmail checks it for the server that connected, not for your domain. So the fix belongs to whoever runs the sending server. With a hosted email provider that is the provider's job; if you run your own server, it is yours.

Quick answer

Find the IP in the bounce, check its reverse DNS, and make sure it returns a hostname that in turn points back to the same IP. If the server is yours, set the PTR in your hosting or IP provider's control panel (not in your domain's DNS), add a matching A record for that hostname, and use the same name as the server's HELO greeting. If you send from a home or office connection where you cannot set PTR, send through your mail provider's SMTP server on port 587 instead. Hosted providers, OquMail included, already set PTR for their sending servers.

What Gmail checks

Google's sender guidelines say the public IP of a sending SMTP server must have a PTR record that resolves to a hostname, and that hostname must have an A or AAAA record pointing back to the same IP. Mail admins call this forward-confirmed reverse DNS. The standard code is listed by IANA as X.7.25, "Reverse DNS validation failed" (RFC 7372). Gmail uses it in two forms:

  • 550-5.7.25: a permanent block of that message.
  • 4.7.23: a temporary version with the same PTR wording, where Gmail rate limits mail from the IP instead of blocking it.
  • Older bounces may read "The IP address sending this message does not have a PTR record setup". It is the same check with older wording.

Why your domain records cannot fix it

Your domain's DNS zone holds records like MX, SPF and DKIM. A PTR record lives in a different place: the reverse zone of the IP address, which belongs to whoever owns the IP block. That is your hosting company for a VPS or dedicated server, or your internet provider for a home or office line. Adding a "PTR" entry in your domain's DNS panel does nothing for Gmail. The PTR record explainer shows how the two zones relate.

Check the sending IP

Take the IP from the bounce (or from the server's network settings) and run a reverse lookup, then a forward lookup of the name it returns. The two must agree:

# reverse lookup: IP to name
dig -x 203.0.113.25 +short
# expected: mail.example.com.

# forward lookup: name back to IP
dig mail.example.com A +short
# expected: 203.0.113.25

# Windows
nslookup 203.0.113.25

Free 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.

Get started free

Fix it on your own server

  1. Choose a hostname for the server, such as mail.yourdomain.com, and create an A record for it pointing at the sending IP. Add an AAAA record too if the server has IPv6.
  2. In your hosting provider's panel, find the reverse DNS or PTR setting for the IP (usually under networking or the IP address details) and set it to that hostname. Many providers only allow this after the A record exists.
  3. Do the same for the IPv6 address if the server has one. Servers often send to Gmail over IPv6 when it is available, so an IPv6 address without PTR triggers 5.7.25 even when IPv4 is perfect.
  4. Set the mail server's own hostname (the name it gives in HELO or EHLO) to the same name. In Postfix that is myhostname.
  5. Wait for the TTL to pass, then repeat the lookups above from outside your network.
  6. Send a test to a Gmail address and check Show original for SPF, DKIM and DMARC as well; Gmail checks those too.

If you cannot set PTR at all

Home broadband and most office lines use addresses whose reverse DNS you cannot change, and many of these addresses are also listed as non-mail IPs on blocklists. Running a mail server on such a line will keep failing at Gmail. Instead, have the server or app hand its mail to a hosted provider over authenticated SMTP (often called a smarthost; see what an SMTP relay is). Most mobile networks block port 25 as well; use 587.

What OquMail users should know

If you send through OquMail, the sending server is OquMail's, and its IP has forward-confirmed reverse DNS set to mail.oqumail.com. There is nothing to add on your domain for PTR. If a 5.7.25 bounce still appears, the mail did not leave through OquMail: check that the mail app, website or device uses mail.oqumail.com, port 587, STARTTLS, with the full mailbox address and password. Then confirm the five DNS records from the dashboard are live, especially SPF set to v=spf1 mx a:mail.oqumail.com ~all and the DKIM key shown in the dashboard. The free SPF checker and MX lookup show what is published. Each mailbox can send 250 messages a day.

Common questions

What does 550 5.7.25 mean?

It means Gmail blocked the message because the IP address of the server that sent it has no PTR (reverse DNS) record, or the PTR name does not point back to the same IP. The owner of the sending server has to fix it.

Can I add a PTR record in Cloudflare or my domain registrar?

No. A PTR record for an IP lives in the reverse zone controlled by the IP's owner. Ask your hosting provider, or set it in their panel. Your domain's DNS only holds the matching A record.

Does the PTR hostname have to match my email domain?

No. Gmail requires a PTR that resolves to a hostname which points back to the same IP. It does not need to match the From domain. Yahoo also asks for meaningful, non-generic reverse DNS, so a name like mail.yourdomain.com is better than a default provider name.

How long after setting a PTR record will Gmail accept my mail?

Once the new PTR is visible to outside resolvers, which depends on the provider's TTL and often takes minutes to a few hours. Retry a test message after the lookups above return the right answers. If tests then fail with 5.7.26 unauthenticated, the PTR is fixed and SPF or DKIM is next.

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.