In short
A PTR record is a reverse DNS (rDNS) record that maps an IP address back to a hostname. Every IP that sends mail from your own mail server needs a PTR record pointing to a name like mail.firmaniz.com, and that name's A record must resolve back to the same IP (FCrDNS). Without this match, Gmail may reject your mail with error 5.7.25. You request the PTR record from the provider that owns the IP address, not from your domain's DNS panel.
In this guide
- How does a PTR record work?
- FCrDNS: matching forward and reverse records
- Why do Gmail and Outlook reject mail without a PTR record?
- PTR, HELO and hostname: the trio that must match
- How to check your PTR record
- How to request a PTR record
- Common PTR mistakes
- A PTR record alone is not enough
- Next step: a mail server whose PTR you control
A PTR record (pointer record) is a reverse DNS (rDNS) record that maps an IP address back to a hostname. Regular DNS answers the question "Which IP address is mail.firmaniz.com on?" A PTR record answers the opposite: "Which server does 203.0.113.25 belong to?" If you send email from your own mail server, a PTR record is not optional. It is a baseline requirement. Gmail, Outlook and corporate spam filters reject or junk mail from IP addresses that have no PTR record, or whose PTR record does not match forward DNS.
How does a PTR record work?
Reverse DNS lookups happen in a special DNS zone. For IPv4 the zone is in-addr.arpa, and for IPv6 it is ip6.arpa. To find an IP address's PTR record, the address is reversed and appended to that zone:
; reverse DNS record for 203.0.113.25
25.113.0.203.in-addr.arpa. 3600 IN PTR mail.firmaniz.com.
The receiving mail server sees the IP address connecting to it and queries this zone. If it gets a hostname back, it has its first clue about who is on the other end of the connection.
Here is the critical detail most people miss: the reverse DNS zone belongs to the owner of the IP block, not to your domain. No matter how many records you add in your domain's DNS panel, you will not create a PTR record. Only the party that assigned you the IP address, meaning your server or data center provider, can set it.
FCrDNS: matching forward and reverse records
Having a PTR record alone is not enough. Receiving servers run an FCrDNS (forward-confirmed reverse DNS) check, which has two steps:
- Look up the PTR record of the connecting IP:
203.0.113.25 → mail.firmaniz.com - Look up the A record (or AAAA for IPv6) of the returned name:
mail.firmaniz.com → 203.0.113.25
If both lookups land on the same IP address, FCrDNS passes. This check stops anyone from setting a PTR to a domain they don't own to look legitimate, because they can't control the forward DNS of that fake name.
| Scenario | PTR record | A record | How the receiving server sees it |
|---|---|---|---|
| Correct setup | mail.firmaniz.com | 203.0.113.25 | FCrDNS passes, normal evaluation |
| No PTR | None | 203.0.113.25 | Rejection or high spam score |
| Generic PTR | 203-0-113-25.isp.example | Different or missing | Looks like a home connection or a bot |
| Mismatched records | mail.firmaniz.com | 198.51.100.7 | FCrDNS fails, Gmail error 5.7.25 |
Why do Gmail and Outlook reject mail without a PTR record?
Most spam botnets run on compromised home computers and randomly rented IP addresses. Those addresses either have no PTR record at all or carry a generic, ISP-generated one like 203-0-113-25.dsl.example.net. A legitimate mail server has its own meaningful, verifiable hostname. That is why major mailbox providers use the PTR check as their first and cheapest filter.
Google's sender guidelines require every IP address that sends mail to Gmail to have valid forward and reverse DNS records. When that rule fails, you get this response:
550-5.7.25 [203.0.113.25] The IP address sending this message does not have a
550-5.7.25 PTR record setup, or the corresponding forward DNS entry does not
550-5.7.25 point to the sending IP. As a policy, Gmail does not accept messages
550-5.7.25 from IPs with missing PTR records.
On the Microsoft side (Outlook.com, Hotmail, Microsoft 365), IP addresses with missing reverse DNS get a low reputation, so mail is either rejected or lands in the Junk folder. Filters such as SpamAssassin and Rspamd also add spam points to connections without a PTR; in SpamAssassin the rule shows up as RDNS_NONE. For Gmail's current requirements, see Google's email sender guidelines.
PTR, HELO and hostname: the trio that must match
When a mail server connects to another one, it starts the SMTP session with the EHLO command (or the older HELO) and announces its own name. In the cleanest setup, these three values are identical:
- PTR record:
mail.firmaniz.com - A record:
mail.firmaniz.com → 203.0.113.25 - EHLO name:
mail.firmaniz.com
If you use Postfix, the EHLO name is the myhostname value in /etc/postfix/main.cf. On mailcow installs, the name comes from the MAILCOW_HOSTNAME variable in mailcow.conf. Making sure the server's TLS certificate covers the same name prevents warnings on encrypted connections.
# Postfix: /etc/postfix/main.cf
myhostname = mail.firmaniz.com
# mailcow: /opt/mailcow-dockerized/mailcow.conf
MAILCOW_HOSTNAME=mail.firmaniz.com
How to check your PTR record
On Linux or macOS, check the reverse and forward records together with dig:
# Reverse lookup: which name does the IP point to?
dig -x 203.0.113.25 +short
# Forward lookup: does that name resolve back to the same IP?
dig A mail.firmaniz.com +short
# If you have an IPv6 address, check it too
dig -x 2001:db8::25 +short
On Windows, you can run the same check from PowerShell or Command Prompt:
nslookup 203.0.113.25
nslookup mail.firmaniz.com
To confirm the result with a real message, send a test email to a Gmail address and open Show original. In the line Received: from mail.firmaniz.com (mail.firmaniz.com [203.0.113.25]), the name inside the parentheses is your PTR record. If you see "unknown" there, the record is missing.
How to request a PTR record
- Choose the server hostname. A subdomain like
mail.firmaniz.comis the usual choice. Set a single PTR record per IP address; multiple PTR records look inconsistent to some filters. - Create the A record first. In your domain's DNS panel, add an A record for
mailpointing to your server IP, plus an AAAA record if you use IPv6. Most providers won't set a PTR for a name that has no forward record. - Send the request to the IP owner. Ask for the PTR record through your server provider's client panel or a support ticket. State the IP address and the hostname you want clearly. Sunucu Atlas mail server plans come with a dedicated IP address assigned to you, so you can submit your PTR request through a support ticket.
- Set the EHLO name. Make sure your mail software identifies itself with the same name.
- Don't forget IPv6. If your server also sends mail over IPv6, that address needs a PTR too. If you can't set one, send outbound mail over IPv4 only; in Postfix the setting is
inet_protocols = ipv4. - Verify. After the record is added, wait for the TTL to expire so old answers drop out of caches, then check both directions with the commands above.
If you use shared mail hosting, you don't need to deal with these steps: mail goes out from the provider's IP addresses, and the provider manages the PTR records. For small teams that don't want to manage their own IP, business email hosting is the lower-maintenance option.
Common PTR mistakes
- Leaving the provider's generic PTR: The automatic name your server ships with is not suitable for a mail server.
- Pointing the PTR to a name with no matching A record: Setting the PTR to the bare domain (
firmaniz.com) while that name's A record points to your website on another server breaks FCrDNS. - Leaving the EHLO name as
localhost: This is common on default installs and is penalized by almost every filter. - Forgetting IPv6: Even with a flawless IPv4 setup, mail can reach Gmail over IPv6 and get rejected.
- Not updating the record after a server move: When you switch to a new IP, plan the PTR request for the new IP and the change to the old A record together.
A PTR record alone is not enough
A PTR record is only one of the layers that prove your mail server's identity. For domain-level authentication you also need SPF, DKIM and DMARC records; see the guide to creating SPF, DKIM and DMARC records for step-by-step setup. If your PTR is correct and mail is still rejected, your IP address may be on a blacklist; the IP blacklist check and removal article covers how to check. If you are torn between running your own server and using a managed service, the own mail server vs. mail hosting comparison can help.
Next step: a mail server whose PTR you control
Running your own mail server starts with an IP address that is yours and whose reverse DNS you can manage. Sunucu Atlas mail server plans run in Istanbul and come with mailcow preinstalled, your own IP address, SOGo webmail, the Rspamd spam filter, ClamAV virus scanning and automatic SSL certificates, with no limit on accounts or domains. For a few domains and dozens of mailboxes, SA-MAILSERVER-1 is a good starting point; for more mailboxes and archiving, consider SA-MAILSERVER-2 with 8 GB RAM and a 500 GB NVMe disk. Once your server is delivered, create your A record first, then submit your PTR request through a support ticket.
Frequently asked questions
Can I add a PTR record from my domain's DNS panel?
No. A PTR record lives in the IP address's reverse DNS zone, and that zone belongs to the owner of the IP block. You need to request the record from your server provider.
What does Gmail error 550 5.7.25 mean?
The sending IP address has no PTR record, or the A record of the name the PTR points to does not resolve back to the same IP. Once the PTR and A records match, the error goes away.
What hostname should a PTR record point to?
It should point to the name your mail server uses in its EHLO command, usually a subdomain like mail.firmaniz.com. That name's A record must point to the same IP.
Can one IP address have more than one PTR record?
Technically yes, but it is not recommended. Some filters treat multiple PTR records as inconsistent; use a single, clear PTR record for a mail server.
Do I need to worry about PTR records with shared hosting or mail hosting?
No. Mail is sent from the provider's IP addresses, and the provider manages the PTR records. Your responsibility is your domain's SPF, DKIM and DMARC records.
How long does a PTR record take to take effect?
It is live on the authoritative servers as soon as it is set, but old answers can stay in caches until the TTL expires. That usually takes no more than a few hours.