Key takeaways
- Run dig -x on the sending IP, then run a forward lookup on the hostname it returns.
- If the forward lookup does not return the same IP, fix the A record first.
- If the reverse lookup returns a generic name you did not request, the PTR change has not been applied, so contact Mailgun support with the IP and the hostname.
Most reverse DNS problems with Mailgun come down to one mismatch: the IP's PTR points to a hostname that does not resolve back to that same IP, or the PTR never changed from what Mailgun set by default. Google's sender requirements say the sending IP must match the IP of the hostname in its PTR record, so a mismatch is a real problem, not a cosmetic one. Use the table to find your symptom, then run the two checks in the last section.
Research checked: 12 November 2026
This guide is for diagnosis. The setup steps are in the how-to guide.
The short answer
Run `dig -x` on the sending IP, then run a forward lookup on the hostname it returns. If the forward lookup does not return the same IP, fix the A record first. If the reverse lookup returns a generic name you did not request, the PTR change has not been applied, so contact Mailgun support with the IP and the hostname.
Troubleshooting table
| Symptom | Likely cause | Check |
|---|---|---|
| `dig -x` returns nothing | No PTR published for this IP | `dig -x <your-ip> +short` on the IP your mail uses |
| PTR is a generic hostname you did not request | Your change was never applied | Compare with the hostname in your support ticket |
| PTR matches, forward lookup fails | A record missing, wrong or in the wrong zone | `dig +short A mail.example.com` |
| Forward lookup returns a different IP | A record points to an old or shared IP | Compare with the IP in your Mailgun account |
| Gmail reports a reverse DNS problem | Sending IP does not match the PTR hostname | Read the original headers and the IP in `Received` |
| Your change works on one IP but not another | You added the hostname to one IP only | Run the two checks for each dedicated IP |
| Ticket open for days with no change | Request lacks the IP or hostname | Resend with both values written out exactly |
The two checks
Replace `203.0.113.10` with your sending IP. This is a documentation address used as a placeholder.
``` dig -x 203.0.113.10 +short ```
Expected output is one hostname with a trailing dot, such as `mail.example.com.`
``` dig +short A mail.example.com ```
Expected output is `203.0.113.10`. If both lines match, the PTR is correct in forward and reverse. If either line differs, use the table.
Fixes by cause
No PTR at all. Check that the IP is dedicated. Mailgun's reverse DNS article says custom rDNS is handled for dedicated IPs through a support request, and it cannot be set on shared IPs. A shared IP will not produce the result you want however many times you check it.
Forward lookup mismatch. Edit only the A record in your DNS zone. Do not add a second A record for the same hostname, because that gives two answers. Remove any old A record that points to a different IP.
Generic PTR after a request. Send Mailgun support the IP, the hostname, and the A record you published, then ask them to confirm the PTR. Mailgun's article is dated 29 August 2022, so ask for the current process if the ticket response differs from it.
One hostname for several IPs. Mailgun's article says rDNS "can only resolve for one hostname" for an IP. If you want two dedicated IPs to present the same name, that is a shared-name setup you should not rely on. Give each IP its own hostname.
Verify after the fix
Run both checks again after the DNS change has propagated. Then send one message to a Gmail account you own and open the original headers. Confirm that the sending IP in `Received` is the IP you checked. Do not rely on the headers of an earlier test, because they show what was sent before the fix.