Skip to content
Panel Newsletters Mail Account Choose a plan

PTR Record (Reverse DNS): Why Email Needs It and How to Set It Up

PTR Record (Reverse DNS): Why Email Needs It and How to Set It Up

A PTR record (rDNS, reverse DNS) maps an IP address back to a hostname, and mail servers check it on every incoming connection: Google explicitly requires the sending IP to have a PTR record and the PTR hostname to have an A or AAAA record pointing to the same IP (this is called FCrDNS). Only the owner of the IP block, that is your hosting or VPS provider, can change a PTR record; your domain’s DNS panel cannot. On shared hosting the provider sets the server’s PTR, on a VPS you set it in the provider’s panel or via support, and you check it with dig -x IP plus a forward lookup of the returned name.

How we tested

  • Live lookups: 25.10.2026 around 14:50 UTC over DNS-over-HTTPS to dns.google/resolve and cloudflare-dns.com/dns-query. We took the MX and SPF records of gmail.com, outlook.com and ukr.net, picked IPs from their SPF ranges and followed the chain IP -> PTR -> A/AAAA. Both resolvers returned identical PTR answers.
  • Bench: RichHost test bench, an isolated container with 2 vCPU / 8 GB, Ubuntu 24.04, BIND 9.18.39 and Unbound 1.19.2 on free ports 127.0.0.1:15353-15355. Zones for 203.0.113.0/24 (TEST-NET-3, RFC 5737) and the domains example.com / example.net, validated with named-checkzone and queried with dig -x. The servers were stopped after the test. These are not RichHost production servers.
  • Sources checked 25.10.2026: Google Email sender guidelines, Gmail SMTP errors and codes, Outlook.com Policies, Practices, and Guidelines, RFC 1912 (section 2.1) and RFC 2317.

What a PTR record is and why your domain panel can’t set it

A forward lookup asks “what is the IP of mail.example.com”, a reverse lookup asks “what is the name of 209.85.220.41”. For IPv4 reverse lookups the octets are written in reverse order under in-addr.arpa: 209.85.220.41 becomes 41.220.85.209.in-addr.arpa. Forward records are covered in our guide to DNS records and domain management.

The key difference is who controls the zone. A, MX and TXT records live in your domain’s zone, while PTR records live in the reverse zone of the IP block, which the regional registry (RIPE NCC in Europe) delegates to the address holder. The SOA records of the reverse zones we queried for mail IPs show this clearly:

IP Reverse zone Served by (SOA)
209.85.220.41 (Gmail) 220.85.209.in-addr.arpa ns1.google.com
40.92.18.10 (Outlook.com) 92.40.in-addr.arpa ns1-07.azure-dns.com (Microsoft)
212.42.83.53 (ukr.net) 83.42.212.in-addr.arpa dns1.fwdcdn.net, hostmaster.ukr.net.ua
5.9.20.30 (a server at Hetzner) 20.9.5.in-addr.arpa ns1.your-server.de (Hetzner)

That is why changing your domain’s nameservers or adding a “PTR” to your domain zone has no effect on reverse DNS: resolvers look for the answer in the IP owner’s zone, not yours.

Live checks: Gmail, Outlook.com, ukr.net

MX records show where mail arrives (gmail-smtp-in.l.google.com, outlook-com.olc.protection.outlook.com, mxs.ukr.net), but for PTR what matters is where mail leaves from. SPF shows that: Google publishes _spf.google.com with 74.125.0.0/16 and 209.85.128.0/17, Outlook.com spf2.outlook.com with 40.92.0.0/16 and 52.103.0.0/17, and ukr.net _spf.ukr.net with several 212.42.x.x networks and single /32 addresses. How MX and SPF affect delivery is explained in our guides to MX record setup and SPF, DKIM and DMARC.

This is what a passing FCrDNS check looks like for a Gmail address (dns.google responses shortened):

GET https://dns.google/resolve?name=41.220.85.209.in-addr.arpa&type=PTR
{"Status":0, "Question":[{"name":"41.220.85.209.in-addr.arpa.","type":12}],
 "Answer":[{"name":"41.220.85.209.in-addr.arpa.","type":12,"TTL":14063,
            "data":"mail-sor-f41.google.com."}]}

GET https://dns.google/resolve?name=mail-sor-f41.google.com&type=A
{"Status":0, "Answer":[{"name":"mail-sor-f41.google.com.","type":1,"TTL":3600,
            "data":"209.85.220.41"}]}

The IP returned a name and the name returned the same IP, so the check passes. Summary for all addresses:

IP address PTR A/AAAA of the name FCrDNS
209.85.220.41 (Gmail) mail-sor-f41.google.com 209.85.220.41 yes
74.125.82.50 (Gmail) mail-dl1-f50.google.com 74.125.82.50 yes
40.92.18.10 (Outlook.com) mail-co1nam11olkn2010.outbound.protection.outlook.com 40.92.18.10 yes
40.92.58.12 (Outlook.com) mail-dbaeur03olkn2012.outbound.protection.outlook.com 40.92.58.12 yes
212.42.83.71 (ukr.net) ecto.ukr.net 212.42.83.71 yes
212.42.83.53 (ukr.net) small.ng46.ukr.net NXDOMAIN no
212.42.83.51 (ukr.net) NXDOMAIN - no
5.9.20.30 (Hetzner) static.30.20.9.5.clients.your-server.de 5.9.20.30 yes, but generic name

212.42.83.53 is a telling case: the PTR exists, but the name small.ng46.ukr.net does not, so FCrDNS fails:

GET https://cloudflare-dns.com/dns-query?name=53.83.42.212.in-addr.arpa&type=PTR
{"Status":0, "Answer":[{"name":"53.83.42.212.in-addr.arpa","type":12,"TTL":300,
            "data":"small.ng46.ukr.net."}]}

GET https://cloudflare-dns.com/dns-query?name=small.ng46.ukr.net&type=A
{"Status":3, "Authority":[{"name":"ukr.net","type":6,
  "data":"ns1.fwdcdn.net. hostmaster.ukr.net. 2026102201 36000 3600 604800 86400"}]}

Both ukr.net addresses without valid FCrDNS are simply listed in the SPF record. We don’t know whether ukr.net currently sends external mail from them, so treat this as an illustration of the failure, not a statement about ukr.net deliverability. The Hetzner address, by contrast, passes FCrDNS but carries the generic name the provider assigns to every customer by default. Such a name says nothing about a mail server and won’t match your HELO, so on a mail VPS you replace it with your own.

IPv6. For IPv6 the address is expanded to 32 hex digits, written one per label in reverse order under ip6.arpa (nibble format). Gmail address 2a00:1450:4864:20::135 from the _spf.google.com range:

GET https://dns.google/resolve?name=5.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.ip6.arpa&type=PTR
{"Status":0, "Answer":[{"type":12,"TTL":21275,"data":"mail-lf1-x135.google.com."}]}
# AAAA mail-lf1-x135.google.com -> 2a00:1450:4864:20::135

2a00:1450:4864:20::42a (mail-wr1-x42a.google.com) and the Outlook.com address 2a01:111:f403:2800::801 passed FCrDNS the same way. If your server has IPv6, it needs a PTR record there too.

PTR and FCrDNS check results for Gmail, Outlook.com, ukr.net and Hetzner mail IP addresses
Six of seven addresses have a PTR, but for one ukr.net address the PTR name does not resolve back

What mailbox providers require

  • Google (Email sender guidelines; in force since February 1, 2024 for everyone sending to Gmail): the requirements for all senders include valid forward and reverse DNS records (PTR) for sending domains or IPs. The infrastructure section adds that the public IP of a sending SMTP server must have a PTR record resolving to a hostname, and that hostname must have an A or AAAA record resolving to the same IP. Google suggests its Admin Toolbox Dig for checking.
  • Microsoft Outlook.com (Policies, Practices, and Guidelines): the sender policy page states that mail servers must have valid reverse DNS records. Separately, since May 5, 2025 domains sending over 5,000 messages a day to Outlook.com must pass SPF, DKIM and DMARC; otherwise mail goes to junk and may later be rejected with 550 5.7.515.
  • RFC 1912 (February 1996, Informational), section 2.1: PTR and A records should match, every IP should have a PTR record in in-addr.arpa, and a PTR must point to a name with an A record, not to a CNAME alias.

The PTR does not have to match the domain in the From header: one IP can carry hundreds of domains but has a single PTR. SPF, DKIM and DMARC authenticate the sender domain; the PTR shows that the IP belongs to a properly configured mail server.

Who can change a PTR record

Your situation Who controls the PTR What to do
Shared hosting, mail leaves from the provider’s server Hosting provider Don’t try to change it for your domain. If you get PTR-related rejections, send the provider the error text and the IP from the message headers
VPS or dedicated server The provider that owns the IP Look for Reverse DNS / rDNS / PTR in the panel or ask support, giving the IP and the desired name
Small block from a provider (/26, /28) The provider, which may delegate a subzone to you Ask for RFC 2317 (CNAME) delegation or set PTRs through the provider
Your own block from RIPE NCC You Delegate the reverse zone to your nameservers and manage PTRs yourself

The order on a VPS: first an A (and AAAA) record for a name like mail.example.com in your domain zone, then the PTR at the provider pointing to that name, then the same name in the mail server config (in Postfix, the myhostname and smtp_helo_name parameters). To find which IP a server or site uses, see how to find a website’s IP address. If you are unsure whether you need your own mail server at all, compare the options in when a VPS no longer suffices.

Bench: a provider’s reverse zone and /26 delegation

We built 113.0.203.in-addr.arpa the way a provider runs it: a PTR for a customer VPS, a default PTR, a deliberate mistake and RFC 2317 delegation of 203.0.113.64/26 to a customer. Reverse zones split on octet boundaries (/24), so a smaller block cannot be delegated with a plain NS record. The provider adds a CNAME for every address of the block into the subzone 64/26, and the customer runs that subzone on their own nameserver.

; db.203.0.113 - provider zone
$TTL 3600
@       IN SOA  ns1.provider.example. hostmaster.provider.example. (
                2026102501 7200 3600 1209600 3600 )
        IN NS   ns1.provider.example.
10      IN PTR  mail.example.com.
11      IN PTR  static-203-0-113-11.provider.example.
12      IN PTR  mail.example.org          ; mistake: no trailing dot
64/26   IN NS   ns1.example.net.
$GENERATE 64-127 $ IN CNAME $.64/26

; db.64-26.203.0.113 - customer zone (64/26.113.0.203.in-addr.arpa)
70      IN PTR  mail.example.net.
71      IN PTR  smtp2.example.net.
$ named-checkzone 113.0.203.in-addr.arpa db.203.0.113
zone 113.0.203.in-addr.arpa/IN: loaded serial 2026102501
OK
$ named-checkzone -D -o - 113.0.203.in-addr.arpa db.203.0.113 | grep "^100\."
100.113.0.203.in-addr.arpa.   3600 IN CNAME 100.64/26.113.0.203.in-addr.arpa.

Queries to the provider’s authoritative server and to a resolver that follows the delegation:

$ dig @127.0.0.1 -p 15353 -x 203.0.113.10 +short
mail.example.com.
$ dig @127.0.0.1 -p 15353 -x 203.0.113.12 +short
mail.example.org.113.0.203.in-addr.arpa.
$ dig @127.0.0.1 -p 15353 -x 203.0.113.70 +norecurse +noall +answer +authority
70.113.0.203.in-addr.arpa. 3600 IN CNAME 70.64/26.113.0.203.in-addr.arpa.
64/26.113.0.203.in-addr.arpa. 3600 IN NS ns1.example.net.
$ dig @127.0.0.1 -p 15355 -x 203.0.113.70 +noall +answer
70.113.0.203.in-addr.arpa. 3600 IN CNAME 70.64/26.113.0.203.in-addr.arpa.
70.64/26.113.0.203.in-addr.arpa. 3600 IN PTR mail.example.net.

Two takeaways. First, named-checkzone does not flag a PTR without a trailing dot: the zone name is simply appended, so instead of mail.example.org you publish mail.example.org.113.0.203.in-addr.arpa. Only a dig -x query catches it. Second, with RFC 2317 delegation the answer starts with a CNAME followed by the PTR. That is normal; if the subzone has no PTR, the resolver returns the CNAME and NXDOMAIN (as 203.0.113.80 did). RFC 2317 warns that some software may not handle “/” in labels, so some providers use a hyphen instead; BIND 9.18 worked fine with the slash.

For IPv6, dig -x builds the nibble name itself, so you don’t need to expand the address by hand:

$ dig -x 2001:db8::25 +noall +question
;5.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. IN PTR

FCrDNS check script

The script runs the same check a receiving mail server does: it fetches the PTR, looks up A or AAAA for each name and searches the answers for the original IP. It skips CNAMEs from classless delegation. By default it queries 1.1.1.1; pass IPv6 addresses in compressed form, as dig prints them.

#!/bin/sh
# FCrDNS check: IP -> PTR -> A/AAAA -> same IP
# Usage: sh fcrdns.sh IP [resolver] [port]
IP="$1"; NS="${2:-1.1.1.1}"; PORT="${3:-53}"
TYPE=A; case "$IP" in *:*) TYPE=AAAA;; esac
NAMES=$(dig @"$NS" -p "$PORT" -x "$IP" +noall +answer | awk '$4=="PTR"{print $5}')
[ -z "$NAMES" ] && { echo "FAIL: $IP has no PTR"; exit 1; }
for N in $NAMES; do
  BACK=$(dig @"$NS" -p "$PORT" "$N" "$TYPE" +noall +answer | awk -v t="$TYPE" '$4==t{print $5}')
  if echo "$BACK" | grep -qx "$IP"; then echo "OK: $IP -> $N -> $IP"; exit 0; fi
  echo "FAIL: $IP -> $N -> ${BACK:-no $TYPE}"
done
exit 1
$ for ip in 203.0.113.10 203.0.113.70 203.0.113.71 203.0.113.12 203.0.113.200; do
    sh fcrdns.sh $ip 127.0.0.1 15355; done
OK: 203.0.113.10 -> mail.example.com. -> 203.0.113.10
OK: 203.0.113.70 -> mail.example.net. -> 203.0.113.70
FAIL: 203.0.113.71 -> smtp2.example.net. -> 203.0.113.99
FAIL: 203.0.113.12 -> mail.example.org.113.0.203.in-addr.arpa. -> no A
FAIL: 203.0.113.200 has no PTR

Symptom, check, fix

The Gmail codes and texts below come from Google’s SMTP error reference (as of 25.10.2026); real bounces may include extra lines.

Symptom Check Fix
Gmail: 550 5.7.25 “…the sending IP address doesn’t have a PTR record, or the forwarding DNS entry doesn’t reference the sending IP address” dig -x IP +short, then the A record of the returned name Set the PTR at the IP owner and an A record for the name pointing to the same IP
Gmail: temporary 451 4.7.23 or 421 4.7.0 with the same PTR explanation Same, plus a check via dns.google and 1.1.1.1 (stale cache?) Fix PTR/A; your server will retry deferred mail
Gmail: 550 5.7.1 “…does not meet IPv6 sending guidelines regarding PTR records and authentication” Which address the message left from (Received header), dig -x for the IPv6 PTR and AAAA for IPv6, or send mail over IPv4 only
PTR returns a name ending in .in-addr.arpa dig -x IP +short Add the trailing dot to the name in the reverse zone
Generic PTR (static…clients…, provider name) dig -x IP +short, compare with the server’s HELO Ask the provider for a PTR to mail.yourdomain and align HELO
Shared hosting, mail from the site isn’t delivered Bounce headers: IP, SPF, DKIM The PTR isn’t yours to set: configure SPF/DKIM/DMARC and SMTP, and contact the provider about the PTR

If the problem is mail sent from a WordPress site rather than from a mail server, start with why WordPress is not sending emails.

FAQ

Can I create a PTR record in my domain’s DNS zone?

Technically you can add the record, but nobody will ever query it: reverse lookups go to the IP owner’s in-addr.arpa zone. The SOA table above shows these zones are run by Google, Microsoft, ukr.net or Hetzner, not by domain owners.

Do I need a PTR record on shared hosting?

The server needs one, and the provider sets it. Your part is SPF, DKIM and DMARC for your domain. If mail is rejected specifically because of the PTR, contact the provider with the error text.

How long does a PTR change take?

As long as the old record stays in resolver caches, i.e. its TTL. In our lookups PTR TTLs ranged from 300 seconds (ukr.net) to several hours (Google).

Can one IP have several PTR records?

It can, but a mail server is better off with one PTR that matches its HELO. Extra names complicate checks and add nothing to deliverability.

If you’d rather not run a mail server yourself, RichHost shared hosting plans include unlimited mailboxes, sending from clean IPs and our own control panel with an AI assistant.

More on this topic

All articles
Check Website Speed: PageSpeed, Lighthouse and curl (Tested)
Hosting Performance03.12.2026

Check Website Speed: PageSpeed, Lighthouse and curl (Tested)

How to check website speed with PageSpeed Insights, Lighthouse and curl: our 7-run test, the effect of a heavy image vs a…

Domain Expired: What to Do and How to Recover It in Time
Domains and DNS29.11.2026

Domain Expired: What to Do and How to Recover It in Time

How many days you have after a .com or .ua domain expires under ICANN and Hostmaster rules, what breaks first, real RDAP…

.tech Domain Registration: $88 a Year at RichHost
Domains and DNS22.11.2026

.tech Domain Registration: $88 a Year at RichHost

Register a .tech domain at RichHost for $88 a year, renewal at the same price. Registry facts checked with Radix and IANA:…