Guides / The SPF ptr mechanism: why to remove it and what to use instead
The SPF ptr mechanism: why to remove it and what to use instead
Some SPF records still contain the word ptr, often in an old default such as "v=spf1 a mx ptr ~all" that a hosting panel or an SPF wizard filled in years ago. The SPF standard itself tells you not to publish it. Below: what ptr does, why it's a problem, how it differs from the reverse DNS (PTR) record your mail server needs, and exactly what to replace it with.
What the standard says
SPF is defined in RFC 7208. Section 5.5 is titled "ptr (do not use)" and says plainly: "This mechanism SHOULD NOT be published." The note at the end of that section gives the reasons: the mechanism "is slow, it is not as reliable as other mechanisms in cases of DNS errors, and it places a large burden on the .arpa name servers", and "after many years of SPF deployment experience, it has been concluded that it is unnecessary and more reliable alternatives should be used instead."
Receivers still have to support it (the same section says compliant implementations "MUST support it"), so a record with ptr isn't broken. It just isn't doing anything useful, and it has costs.
What ptr actually checks
For each message, the receiver takes the IP address of the server that connected, looks up that IP's reverse DNS name (the PTR record in in-addr.arpa or ip6.arpa), then looks up that name's addresses to confirm it points back to the same IP. If the confirmed name is your domain or a subdomain of it, ptr matches. With a domain after it, as in ptr:example.net, the name has to be in that domain instead.
So ptr only matches when the sending server's reverse DNS is under your domain. That was common when companies ran their own mail server on their own IP. It's rare today.
Why it usually authorizes nothing
Reverse DNS for an IP is set by whoever owns the IP, not by you. Section 4.6.4 of RFC 7208 points this out: PTR records "are under control of the owner of the IP address actually making the connection." Mail sent through Google Workspace, Microsoft 365 or a sending tool comes from the provider's IPs, and their reverse DNS names are in the provider's domain. For that mail, ptr never matches your domain, so the provider's own include is what makes SPF pass.
When ptr is the only thing in the record that could cover a server, mail from that server falls through to the closing all and gets softfail (~all) or fail (-all).
The costs of leaving it in
- It uses up your lookup budget. Section 4.6.4 lists ptr with include, a, mx and exists as terms that cause DNS queries, and the total of those terms is limited to 10. Over the limit, SPF returns a permanent error (permerror). A record that is close to the limit gets one lookup back when ptr goes.
- It fails quietly. Section 5.5 says that if a DNS error occurs during the PTR lookup, the mechanism simply "fails to match". So a slow or broken reverse zone can make a server that used to pass suddenly stop passing, with no error to point at.
- It is slow for the receiver, because every message needs a reverse lookup plus forward lookups, and each PTR name can trigger up to 10 address lookups.
ptr is not the PTR record your mail server needs
These are easy to mix up. The ptr mechanism is a word inside your SPF record. A PTR record (reverse DNS) is a DNS record on the sending server's IP address. Gmail and other receivers do expect the IP that sends your mail to have reverse DNS that matches its forward DNS, and if you use Google Workspace, Microsoft 365 or a sending platform, the provider already handles that. Removing ptr from SPF doesn't touch reverse DNS at all. See Gmail 550 5.7.25: no PTR record if a bounce mentions reverse DNS.
What to use instead
Replace ptr with terms that name your senders directly:
- Google Workspace, Microsoft 365 or a sending tool: the provider's include, such as include:_spf.google.com or include:spf.protection.outlook.com. See the SPF record for Google Workspace.
- Your own server on a fixed IP: ip4:203.0.113.10 (or ip6: for IPv6). ip4 and ip6 don't cost any DNS lookups.
- A host whose address changes: a:mail.example.com.
- Your own inbound mail servers also send: mx. Keep a and mx only if those hosts really send mail for the domain.
Example: "v=spf1 a mx ptr include:_spf.google.com ~all" becomes "v=spf1 a mx include:_spf.google.com ~all". If the web server (a) and inbound servers (mx) don't send mail either, "v=spf1 include:_spf.google.com ~all" is cleaner and saves two more lookups.
How to change it safely
- Run the free checker on your sending domain. If the SPF row shows a ptr heads-up, it also shows the record without ptr.
- List every service that sends as your domain (mailboxes, cold email tool, CRM, billing, website forms) and confirm each one has its own include or IP in the record.
- Edit the one TXT record that starts with v=spf1 and delete the ptr term. Don't add a second SPF record; a domain can only have one.
- Run the check again, then send a test to a Gmail address and look for spf=pass in Show original.
Keep the record clean
SPF records drift: tools get added, old ones stay, and defaults nobody chose stick around. OutboxWatch checks SPF, DKIM, DMARC, MX and blocklists on your sending domains every day and emails you when something changes, so a record that creeps toward the 10-lookup limit or loses an include gets caught before it costs you replies.
Frequently asked questions
Does having ptr in my SPF record make SPF fail?
Not by itself. Receivers must still support it. But it rarely matches modern senders, it counts toward the 10-lookup limit, and it stops matching quietly when reverse DNS lookups fail, so the standard says not to publish it.
Is the SPF ptr mechanism deprecated?
RFC 7208 titles it "ptr (do not use)" and says it SHOULD NOT be published. It remains in the protocol only because some records still use it, and the RFC says records "ought to be updated to avoid" it.
Will removing ptr break my email?
Only if a server you send from is covered by ptr and nothing else. Before removing it, make sure each sending service has its own include, ip4/ip6, a or mx term in the record.
Is the ptr mechanism the same as reverse DNS?
No. ptr is a term inside your SPF record. Reverse DNS (a PTR record) is set on the sending server's IP by whoever owns that IP. Receivers still expect your sending IPs to have reverse DNS; removing ptr from SPF doesn't change that.
Does ptr count toward the SPF 10 lookup limit?
Yes. RFC 7208 section 4.6.4 lists ptr with include, a, mx, exists and redirect as the terms that count toward the limit of 10.
Related guides
- SPF record: too many DNS lookups, and how to fix it
- SPF void lookup limit: why a dead include makes SPF fail
- Gmail 550 5.7.25: "the sending IP address doesn't have a PTR record" and how to fix it
- SPF record for Google Workspace: the exact value and common mistakes
- SPF ~all vs -all: which one should a cold email domain use?
- Cold email deliverability checklist
- All guides
- Monitoring plans