What a PTR record is, and how to read one
Reverse DNS is the lookup and the PTR record is what it returns. For 8.8.8.8 the answer is dns.google, and for 1.1.1.1 it is one.one.one.one. The record is stored under a name built by reversing the address, and it is set by whoever controls the reverse zone for the address block, usually the network operator, not by the owner of the domain it names. If you only need the answer for one address, our reverse DNS lookup shows the PTR name and whether it resolves back. The rest of this page shows how to run the same check from a terminal and how to read each result.
Check a PTR record with dig, host or nslookup
All three tools turn the address into a query name. RFC 1035 gives the example that data for 10.2.0.52 sits at 52.0.2.10.in-addr.arpa: the four octets in reverse order under in-addr.arpa. The order is reversed so that each network's slice of the tree can be handed to that network as its own zone. With dig, the -x option builds this name for you, and +comments keeps the status line, which matters when there is no answer.
dig -x 8.8.8.8 +noall +answer +comments | grep -E "status|PTR"
# ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39627
# 8.8.8.8.in-addr.arpa. 7237 IN PTR dns.google.
dig -x 1.1.1.1 +noall +answer +comments | grep -E "status|PTR"
# ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57046
# 1.1.1.1.in-addr.arpa. 1514 IN PTR one.one.one.one.Read the answer line from left to right: the reversed query name, the TTL in seconds (how long a resolver may cache it, so your number will differ), the class, the record type PTR, and the hostname with a trailing dot. NOERROR with a PTR line is the normal success case. For scripts, dig +short -x prints only the name, and host and nslookup give the same answer in their own formats.
dig +short -x 8.8.8.8
# dns.google.
host 1.1.1.1
# 1.1.1.1.in-addr.arpa domain name pointer one.one.one.one.
nslookup 8.8.8.8
# Non-authoritative answer:
# 8.8.8.8.in-addr.arpa name = dns.google.nslookup also prints the address of the resolver it asked. We removed those lines from the output above because they describe our machine, not the record. Non-authoritative only means a caching resolver answered rather than the zone's own nameserver.
IPv6 works the same way under ip6.arpa, except that RFC 3596 reverses the address one hex digit (nibble) at a time, which gives 32 single-digit labels before ip6.arpa. dig -x accepts the short form of the address and expands it. Our IPv4 vs IPv6 guide explains the nibble format; here is the result for Google's IPv6 resolver.
dig -x 2001:4860:4860::8888 +noall +answer
# 8.8.8.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.8.4.0.6.8.4.1.0.0.2.ip6.arpa. 20160 IN PTR dns.google.From code, the IPCheckHQ API returns the PTR name as reverse_dns next to the network that announces the address. This is the response for 8.8.8.8, trimmed to those fields. Like dig, it reports the name and does not confirm it.
curl -s https://ipcheckhq.com/api/v1/ip/8.8.8.8 \
| jq '{ip, reverse_dns, asn: .network.asn, asn_name: .network.asn_name}'
# {
# "ip": "8.8.8.8",
# "reverse_dns": "dns.google",
# "asn": 15169,
# "asn_name": "Google LLC"
# }When there is no name: NXDOMAIN and SERVFAIL
Two different failures look alike if you only check for an empty answer. NXDOMAIN means an authoritative server for the enclosing reverse zone says the name does not exist, so no PTR is published. SERVFAIL means the resolver could not get an answer at all. Documentation addresses had no PTR in public DNS, so they show the first case; the second case below is what our resolver, and 1.1.1.1 when asked directly, returned for one public resolver address at that time.
dig -x 203.0.113.50 +noall +comments | grep status
# ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 36847
host 192.0.2.1
# Host 1.2.0.192.in-addr.arpa. not found: 3(NXDOMAIN)
dig -x 2001:db8::1 +noall +comments | grep status
# ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 31627
dig -x 185.228.168.9 +noall +comments | grep status
# ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 58794
dig @1.1.1.1 -x 185.228.168.9 +noall +comments | grep status
# ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30261
host 185.228.168.9
# Host 9.168.228.185.in-addr.arpa not found: 2(SERVFAIL)Treat SERVFAIL as unknown, not as missing. A retry later or from another network may return a name, while an NXDOMAIN is the zone's own statement that nothing is published.
Check that the name points back to the address
Anyone who controls a reverse zone can put any hostname in it, so a PTR name proves nothing until the name's own A or AAAA records lead back to the same address. This is called forward-confirmed reverse DNS. RFC 8601 states the test precisely: collect every name the PTR query returns, collect every address those names resolve to, and the check succeeds if the original address is in that set. One name that maps back is enough.
dig +short A dns.google
# 8.8.4.4
# 8.8.8.8
dig +short A one.one.one.one
# 1.0.0.1
# 1.1.1.1To run the check on many addresses, this Node script does a PTR lookup, resolves each name with A or AAAA to match the address family, and compares addresses with net.BlockList rather than as strings, so two spellings of the same IPv6 address still match. It uses only built-in modules and your system resolver.
// Usage: node fcrdns.mjs <ip> [ip...] (tested on Node 23.7.0, no dependencies)
import { reverse, resolve4, resolve6 } from "node:dns/promises";
import { BlockList, isIP } from "node:net";
const fam = (a) => (isIP(a) === 6 ? "ipv6" : "ipv4");
for (const ip of process.argv.slice(2)) {
let names = [];
try { names = await reverse(ip); } catch (e) { console.log(`${ip}\tno PTR (${e.code})`); continue; }
const self = new BlockList();
self.addAddress(ip, fam(ip)); // compares addresses, not strings, so IPv6 spellings match
for (const name of names) {
const lookup = fam(ip) === "ipv6" ? resolve6 : resolve4;
const back = await lookup(name).catch((e) => []);
const ok = back.some((a) => self.check(a, fam(a)));
console.log(`${ip}\tPTR ${name}\t-> ${back.join(", ") || "(no address)"}\t${ok ? "forward-confirmed" : "NOT confirmed"}`);
}
}We ran it on 3 December 2026 at 03:09 UTC against 18 well-known public resolver addresses, 16 IPv4 and 2 IPv6. The table shows what our resolver returned at that time. Results depend on the resolver and its cache, and a row says nothing about how its operator runs the service.
| Address | PTR name(s) | Forward lookup returned | Result |
|---|---|---|---|
| 8.8.8.8 | dns.google | 8.8.4.4, 8.8.8.8 | confirmed |
| 8.8.4.4 | dns.google | 8.8.4.4, 8.8.8.8 | confirmed |
| 1.1.1.1 | one.one.one.one | 1.1.1.1, 1.0.0.1 | confirmed |
| 1.0.0.1 | one.one.one.one | 1.1.1.1, 1.0.0.1 | confirmed |
| 9.9.9.9 | dns9.quad9.net | 9.9.9.9, 149.112.112.9 | confirmed |
| 149.112.112.112 | dns.quad9.net | 149.112.112.112, 9.9.9.9 | confirmed |
| 208.67.222.222 | dns.opendns.com, dns.umbrella.com, resolver1.opendns.com, dns.sse.cisco.com | each name includes 208.67.222.222 | confirmed (4 names) |
| 208.67.220.220 | dns.sse.cisco.com, resolver2.opendns.com, dns.umbrella.com, dns.opendns.com | each name includes 208.67.220.220 | confirmed (4 names) |
| 4.2.2.1 | a.resolvers.level3.net | 4.2.2.1 | confirmed |
| 4.2.2.2 | b.resolvers.level3.net | 4.2.2.2 | confirmed |
| 64.6.64.6 | rec1pubns1.ultradns.net | 64.6.64.6 | confirmed |
| 156.154.70.1 | rdns1.ultradns.net | 156.154.70.1 | confirmed |
| 94.140.14.14 | dns.adguard-dns.com | 94.140.14.14, 94.140.15.15 | confirmed |
| 76.76.2.0 | p0.freedns.controld.com | 76.76.2.11 | not confirmed |
| 77.88.8.8 | dns.yandex.ru | 87.250.251.101 | not confirmed |
| 185.228.168.9 | no answer (dig: SERVFAIL) | not run | no result |
| 2001:4860:4860::8888 | dns.google | 2001:4860:4860::8844, 2001:4860:4860::8888 | confirmed |
| 2606:4700:4700::1111 | one.one.one.one | 2606:4700:4700::1001, 2606:4700:4700::1111 | confirmed |
That is 15 confirmed, 2 not confirmed and 1 with no result. We also ran the long spelling 2001:4860:4860:0:0:0:0:8888, which was confirmed like the short form, and the documentation address 203.0.113.50, which had no PTR. In our run the script printed the same error code, ENOTFOUND, for the SERVFAIL address and for the NXDOMAIN one, so use dig when you need to tell those two apart.
RFC 8601, which defines how a mail server records this check in the Authentication-Results header, names four outcomes for it, called iprev. They map onto the run like this.
| iprev result | What RFC 8601 means by it | In our run |
|---|---|---|
| pass | The reverse and forward lookups both returned results and agreed | 15 addresses |
| fail | Both lookups returned results that disagree, or the forward lookup returned nothing | 76.76.2.0 and 77.88.8.8 |
| temperror | The check could not finish because of a likely transient error such as SERVFAIL; a later attempt may succeed | 185.228.168.9 |
| permerror | No PTR data is published for the address, for example NXDOMAIN; a retry is unlikely to change that | 203.0.113.50 (documentation address) |
The two OpenDNS addresses each returned four PTR names, and every one of them resolved back. The RFC's test passes as long as one name maps back, so several names do not break it, but they do matter for mail, as the next section shows.
Crawlers use the same test
Google's instructions for confirming one of its crawlers are this same two-way test with a domain check in between: take the PTR name, make sure it sits under one of Google's crawler domains, then resolve it and compare with the logged address. A spoofed user agent coming from an unrelated network fails because its operator cannot make Google's names resolve to it. Our guide to verifying a crawler IP covers the domain lists, published IP ranges and a script.
What a missing or mismatched PTR means for mail
For a server that sends email, reverse DNS is a delivery requirement, not a nicety. Google's sender guidelines, which apply to mail sent to personal Gmail accounts from 1 February 2024, say sending domains or IPs must have valid forward and reverse DNS, and that the sending IP must match the address of the hostname in its PTR record. The same page notes that an IPv6 authorization error can mean the sending server's PTR is not set up for IPv6, so an IPv6 sender needs its own PTR.
The M3AAWG Sender Best Common Practices, version 4.0 updated in August 2026, go a step further. The sending IP must have reverse DNS, there must be only one reverse DNS name per IP, and that name must exactly match the server's primary forward name. The document describes that match as now required for direct mail to major mailbox providers.
The idea is old. RFC 1912, from 1996, tells administrators to keep PTR and A records matching, to give every address of a multi-homed host its own PTR, and warns that a mismatch can cost a host service much as if it were missing from DNS. RFC 8601 adds that a receiving server often simply rejects a connection that fails this check. We did not test any receiving server and list no rejection codes.
The OpenDNS rows illustrate the gap between the RFC test and the mail practice. Those resolvers pass the RFC test with four names each, which is fine for a DNS resolver, but a mail server published that way would not meet the M3AAWG practice of one name per IP. For a sending IP, set one PTR, make it the name the server uses for itself, and confirm it with the forward lookup above before you send.
Who can change a PTR record
Reverse zones are delegated along address blocks, which is the point of the reversed order in RFC 1035. You can see who holds a block by asking for the nameservers of its reverse zone. On 3 December 2026, 8.8.8.in-addr.arpa was served by Google's nameservers and 1.1.1.in-addr.arpa by Cloudflare's. For 113.0.203.in-addr.arpa, the block that contains the documentation range 203.0.113.0/24, the query returned NXDOMAIN, and the authority section carried the SOA record of the parent zone 203.in-addr.arpa, whose primary nameserver is APNIC's ns.apnic.net.
dig NS 8.8.8.in-addr.arpa +short
# ns1.google.com.
# ns4.google.com.
# ns2.google.com.
# ns3.google.com.
dig NS 1.1.1.in-addr.arpa +short
# mira.ns.cloudflare.com.
# alec.ns.cloudflare.com.
dig SOA 113.0.203.in-addr.arpa +noall +comments +authority | grep -E "status|IN.SOA"
# ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41819
# 203.in-addr.arpa. 1794 IN SOA ns.apnic.net. read-txt-record-of-zone-first-dns-admin.apnic.net. 3006154491 7200 1800 604800 3600In practice that means you ask whoever gave you the address, your ISP or hosting provider, often through a reverse DNS setting in their control panel or a support request. Unless the reverse zone has been delegated to you, your domain registrar and the DNS host for your domain cannot set it. If you are not sure who operates an address, an ASN lookup shows the network that announces it. Addresses on home and business connections often carry a generic name the ISP generated, and our static vs dynamic IP guide shows what those names can and cannot tell you.
Questions readers ask
What is the difference between reverse DNS and PTR?
Reverse DNS is the lookup: going from an address to a name. A PTR record is the record type that holds the answer, stored under the reversed name in in-addr.arpa or ip6.arpa. When a tool reports the reverse DNS of 1.1.1.1 as one.one.one.one, it is showing you that PTR record.
What is a DNS reverse zone?
A reverse zone is the part of in-addr.arpa or ip6.arpa that covers one block of addresses, delegated to the network that holds it. Its NS records show who that is: in our run 8.8.8.in-addr.arpa pointed to ns1 to ns4.google.com. The zone holds the PTR records published for addresses in the block.
How do I check a PTR record?
Run dig -x followed by the address, or host followed by the address, and read the PTR name in the answer; then resolve that name and confirm it returns the same address. To do both steps in a browser, use the reverse DNS lookup.
Does a PTR record have any relation with my domain's DNS?
Only through the name it points to. The PTR itself sits in the reverse zone of the address owner, not in your domain's zone, so unless that reverse zone has been delegated to you, you cannot add it at your registrar or DNS host. You can, and for mail should, make the name it points to a hostname in your domain with an A or AAAA record that leads back to the same address.
