all guides

// how to fix

Gmail bounce "550 5.7.25": reverse DNS (PTR) required

Gmail refuses your email because your sending IP has no reverse DNS, or one that does not point back to the IP. Ask your host to set a proper PTR.

What it means

Your email to a Gmail or Google Workspace address bounces with:

550 5.7.25 The IP address sending this message does not have a PTR record setup, or the corresponding forward DNS entry does not point to the sending IP.

Every IP address can have a reverse DNS name, stored in a PTR record. It answers the question "which name belongs to this IP?". Gmail requires that your sending IP has one, and that the name points back to the same IP. This two-way match is called forward-confirmed reverse DNS.

Example of a good setup:

203.0.113.10  →  PTR  mail.yourdomain.com
mail.yourdomain.com  →  A  203.0.113.10

Why it matters

  • Gmail rejects your email outright: it is not even sent to spam.
  • Many other providers also treat a missing PTR as a strong spam signal.
  • This mostly affects people running their own server on a VPS or at home. Big providers like Google Workspace or Microsoft 365 already have correct PTRs.

How to check

  • Send a test email to the address on the home page /. The reverse DNS section of the report shows the PTR of your sending IP and whether it points back to the same IP.
  • From a terminal, you can also run:
    dig -x 203.0.113.10 +short
    dig mail.yourdomain.com A +short
    The first command should show your mail name, the second your IP.

How to fix it

  1. Choose a name for your mail server, such as mail.yourdomain.com.
  2. Create the forward record in your domain's DNS: an A record for mail pointing to your server's IP (and an AAAA record if you send over IPv6).
  3. Set the PTR at your hosting company. The PTR is not set in your domain's DNS: it belongs to whoever owns the IP. Look for "Reverse DNS" or "PTR" in your VPS control panel, or ask your host's support.
  4. Use the same name in HELO. Configure your mail server to introduce itself with the same name, for example myhostname = mail.yourdomain.com in Postfix.
  5. Check IPv6. If your server has IPv6, it may send to Gmail over IPv6. That address needs its own PTR too, or you can tell your server to send over IPv4 only.

Sending from a home connection

Home internet IPs usually cannot get a custom PTR and are often blocked anyway. Send through your provider's SMTP server or an email service instead.

Check that it is fixed

PTR changes are usually visible within an hour, but can take up to 24 hours. Send a new test email from the home page: the reverse DNS line should show a matching name. Then send an email to a Gmail address to confirm it is accepted.

Check that it is fixed

DNS changes can take from a few minutes to a few hours. Then send a new test email or scan your domain again.

Related guides