A PTR record associates an IP address with a hostname. This is called reverse resolution. Systems use it for logs, network controls, and messaging. To go to an address, we rely on A or AAAA. To return to a name, we rely on PTR.
A PTR record contains a name, a type, a target, and a TTL. The TTL indicates how long the response remains cached in the local resolver.
| Name | Type | Target | TTL in seconds |
|---|
| 10.113.0.203.in-addr.arpa. | PTR | mail.example.net. | 3600 |
In this example, the name corresponds to address 203.0.113.10 written in reverse in the in-addr.arpa zone. The target is the expected hostname. A TTL of 3600 corresponds to one hour.
| Name | Type | Target | TTL in seconds |
|---|
| 0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. | PTR | host.example.net. | 3600 |
Here the name takes each hexadecimal digit of 2001:db8::10 in reverse in the ip6.arpa zone. The target is the expected hostname.
A good setup matches PTR with A or AAAA. The name returned by PTR must itself resolve to the original address. This consistency helps messaging and diagnostics.
A short TTL makes a change visible faster. Useful during an address switchover.
A medium or long TTL reduces queries to authoritative servers. Useful for a stable configuration.
Reduce the TTL a few hours before a modification, then increase it after validation.
Good to know
An address can publish only one useful PTR. Multiplying PTRs for the same address creates ambiguity. A clear name that then resolves to A or AAAA is better.
In the reverse zone provided by the address holder. For IPv4, this is done under in-addr.arpa. For IPv6, this is done under ip6.arpa. On blocks provided by an operator, PTR management is often handled in their dashboard.
To avoid
Pointing a PTR to a name that doesn't have A or AAAA records.
Leaving an old target after an address change.
Publishing a generic name that doesn't reflect the actual service.
An online DNS lookup allows entering an address. The result displays the name returned by PTR and the TTL visible from the Internet. It's a useful first check. Then perform a local test from your machine.
Windows provides nslookup. It can be used in interactive mode.
nslookup
set q=ptr
10.113.0.203.in-addr.arpa
Or simply
nslookup 203.0.113.10
nslookup
set q=ptr
server 1.1.1.1
10.113.0.203.in-addr.arpa
The first method follows the machine's network configuration. The second forces the use of a third-party resolver, here Cloudflare's.
On these systems, the dig command is practical and easy to use.
dig PTR 10.113.0.203.in-addr.arpa
dig PTR 10.113.0.203.in-addr.arpa @1.1.1.1
For IPv6, we query the ip6.arpa form of the same name.
A response with NXDOMAIN indicates the absence of PTR. Add the entry in the reverse zone.
A returned name that doesn't resolve to A or AAAA signals an inconsistency. Correct the forward zone.
A high TTL may explain a lag after a change.
- Verify control of the reverse zone with the ISP or cloud provider.
- Choose a clear hostname that resolves to A or AAAA to the address.
- Create the PTR with a reduced TTL.
- Test with nslookup or dig command from multiple networks.
- Increase the TTL when everything is stable.
Practical tip
For messaging, match the PTR record, the name used by the SMTP server, and the associated A or AAAA record. This consistency improves deliverability.
Require a PTR that returns a dedicated name. The name must resolve to the server's address.
Request delegation of the reverse zone or use the provided interface to manage PTRs.
Automate PTR creation and deletion when instances arrive and depart.
- If a service refuses connection, verify the presence of a PTR and consistency with A or AAAA.
- If the response remains old, wait for TTL expiration and purge the local resolver cache if possible.
- If the provider manages the reverse zone, open a ticket and provide the address and desired name.
In summary, a PTR record provides the name associated with an address. It complements A and AAAA records. An appropriate TTL and forward-reverse consistency simplify checks. Verification goes through an online tool then through nslookup and dig.
With these markers, management remains clear. Changes proceed without stress. Services identify correctly in reverse resolution.