A PTR record maps an IP address back to a hostname. It is the opposite of an A record and is used for reverse DNS lookups. To check an address, use the reverse DNS tool to check the PTR record for an IP address. A correct result returns one hostname, such as mail.example.com, that matches the A record for the same host.
What a PTR record is and how it differs from an A record
A: mail.example.com -> 203.0.113.100
PTR: 203.0.113.100 -> mail.example.com
The two live in separate, parallel hierarchies. Reverse records sit in special ARPA zones, so the PTR for an address is not in your domain's zone.
What a PTR record looks like for IPv4 and IPv6
For IPv4, the octets are written in reverse order under in-addr.arpa. To find a host name, a resolver (the DNS software that answers lookups for applications) sends a PTR query for that reversed name. The zone for 203.0.113.0/24 is 113.0.203.in-addr.arpa. Inside it, the record name is the last octet, 100.
; zone 113.0.203.in-addr.arpa.
100.113.0.203.in-addr.arpa. 3600 IN PTR mail.example.com.
The trailing dot on the target matters. Without it, the server appends $ORIGIN. The target should be the FQDN (fully qualified domain name) of the host that uses the address.
For IPv6, the reverse zone is under ip6.arpa with the prefix nibbles (hex digits) reversed. For 2001:db8::/32 that is 8.b.d.0.1.0.0.2.ip6.arpa. The record name is the rest of the address in reverse nibble order. It must not use zero compression. For 2001:db8::5, the full name is 32 nibbles:
5.0.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. 3600 IN PTR mail.example.com.
Do you need a PTR record, and who sets it?
The DNS operational guidance says every IP address should have a matching PTR record, and PTR and A records should match. A host with several IP addresses (a multi-homed host) should have a PTR record for each one. Missing or mismatched records can cause loss of Internet services, and many Internet services refuse hosts that are not correctly registered.
For mail, PTR records historically kept outbound SMTP servers from being blocked by spam filters. SPF, DKIM and DMARC now provide better verification of domain ownership. Check those with the SPF checker, DKIM checker and DMARC checker. Today PTR records are mainly useful to owners of dedicated IP space, where they put readable names in traceroutes and security tools.
Common problems:
- No PTR record for the address.
- A PTR and A record that do not match.
- A PTR that points to a CNAME alias. It must point to a valid A record.
The two records are separate, so keep them consistent, ideally with automated checking or by generating both from one database.
Your registrar does not set the PTR. The owner of the IP block, usually the ISP or hosting provider, controls the reverse zone. If you do not own the prefix, ask the owner. A whois lookup on the address shows who holds it. If you hold your own prefix, the name servers are set at the Regional Internet Registry (RIR) for that prefix. When an ISP manages the range, delegation works like forward delegation, with the name servers configured with that ISP. Azure DNS documents this for its reverse zones. Cloudflare documents that customers who hold IPv4 or IPv6 address space can add the reverse zone and create PTR records. The zone must then be delegated from its parent, so resolvers can find the name servers that host it.
Before you edit a PTR record, note the existing record so you can restore it. Caches may keep the old answer until the TTL (time to live, the number of seconds a cached record may be kept) expires. After the change, check the result with the reverse DNS tool. Use the propagation checker to see the current state.
References
- RFC 1035: Domain names - implementation and specification, IETF, section 6
- RFC 1912: Common DNS Operational and Configuration Errors, IETF, sections 2, 3
- Reverse zones and PTR records ยท Cloudflare DNS docs, developers.cloudflare.com
- Overview of reverse DNS in Azure - Azure DNS | Microsoft Learn, learn.microsoft.com
- Host reverse DNS lookup zones in Azure DNS | Microsoft Learn, learn.microsoft.com