What is reverse DNS and a PTR record?
Your mail server’s messages are being rejected, or a log shows an odd hostname next to an IP address, and someone tells you to check the PTR record. An ordinary DNS lookup turns a name into an address. Reverse DNS goes the other way: given an IP address, it returns the name recorded for it in a dedicated reverse zone. That name is useful in network and mail operations, but it identifies neither a person nor the owner of a site.
How an IP address becomes a DNS name
For IPv4, the octets of the address are written in reverse order under in-addr.arpa. The PTR name for 192.0.2.10 is 10.2.0.192.in-addr.arpa. IPv6 uses ip6.arpa, with each hexadecimal digit of the full address as a separate label, again in reverse order. You never need to build these long names by hand, because a reverse lookup tool does it for you. RFC 1035 describes the reverse naming structure.
Who is allowed to set the PTR record
Control of a reverse zone follows the delegation of the address space, not the domain. Owning example.org gives you no right to change the PTR of an address that a hosting company supplied. Usually the network operator offers a control panel setting or accepts a request for the change. The exact policy depends on the provider and on how the address was allocated.
What the returned name does and does not prove
A PTR lookup may return mail.example.org. That is only a string configured by whoever runs the reverse zone, and it does not prove that the server really belongs to that domain. To confirm it, look up the A or AAAA record of the returned name and see whether it points back to the address you started with. A match in both directions is often called forward-confirmed reverse DNS. Receiving systems differ in whether they require it.
A missing PTR does not make an address invalid. Many residential addresses have no useful reverse name. Mail receivers may treat PTR as one signal about a sending server, alongside domain authentication, reputation and local policy. No PTR result by itself guarantees delivery.
PTR is also not registration data or geolocation. IP information can show which operator holds an address range, while PTR shows a name chosen by that operator or its customer. These two sources answer different questions and change independently.
Checking a PTR in both directions
- Enter the address in the name and mail server lookup or another DNS tool that supports PTR.
- Write down the original IP, the name returned and the time of the lookup.
- Query A and AAAA for that name separately. The 2ip DNS check can be used for this forward lookup.
- If the answers do not lead back to the original IP, find out who manages the forward zone and who manages the reverse zone.
Changing PTR for a mail server
Settle on a clear hostname and publish its forward records before you request the PTR change. Remember that moving the service to a new IP address does not bring the old reverse entry with it. Check the procedure of the operator of the new range. After the change, repeat the forward and reverse lookups from more than one resolver.