PTR record: reverse DNS explained and how to check it
Maps an IP address back to a host name. Essential for mail servers.
What it is
A PTR record (pointer) maps an IP address back to a host name. Where an A record answers “what is the address of mail.example.com?”, a PTR record answers “what is the name of 192.0.2.25?”. This lookup in the opposite direction is called reverse DNS.
PTR is defined in RFC 1035. For IPv6, the reverse tree is described in RFC 3596.
How it works
DNS can only look up names, so IP addresses are turned into special names under the .arpa domain:
- IPv4: the four numbers are written in reverse order and followed by
in-addr.arpa. The address192.0.2.25becomes25.2.0.192.in-addr.arpa. - IPv6: every hexadecimal digit of the full address is written in reverse order, separated by dots, followed by
ip6.arpa. The address2001:db8::25becomes5.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.
The reversal puts the most general part (the network) on the right, like a domain name, so blocks of addresses can be delegated to the organisations that use them. The regional internet registries (RIRs) delegate reverse zones to providers, and providers create the PTR records for their customers.
That is why the reverse zone belongs to whoever controls the IP address, not to the owner of the domain. Your DNS provider for example.com cannot set the PTR for an address that belongs to your hosting company.
Forward-confirmed reverse DNS
Anyone who controls a reverse zone can make a PTR say anything, including a name they do not own. For that reason, systems that rely on reverse DNS usually check that it is forward-confirmed (FCrDNS): the PTR’s name must resolve, through A or AAAA, back to the original IP. Receiving mail servers do this routinely. A sending server without reverse DNS, or with a generic name such as host-192-0-2-25.isp.example.net, is much more likely to have its mail rejected or filtered as spam.
Reverse DNS for small address blocks
Reverse zones follow the dots in an IPv4 address, so they naturally cover blocks of 256 addresses (a /24). When a provider assigns a customer a smaller block, say 8 addresses, it cannot simply delegate part of a zone. The common solution is classless reverse delegation (RFC 2317): the provider publishes CNAME records that point each address’s reverse name into a zone controlled by the customer. If you see CNAMEs when looking up a PTR, this is usually why, and the lookup still works.
Syntax and fields
| Field | Example | Meaning |
|---|---|---|
| Name | 25.2.0.192.in-addr.arpa. |
The reversed address under in-addr.arpa or ip6.arpa. |
| TTL | 3600 |
Cache lifetime in seconds. |
| Class | IN |
Internet. |
| Type | PTR |
The record type. |
| Data | mail.example.com. |
The host name for that address. |
Examples
Reverse DNS for an IPv4 mail server, with the matching forward record:
25.2.0.192.in-addr.arpa. 3600 IN PTR mail.example.com.
mail.example.com. 3600 IN A 192.0.2.25
The same server over IPv6:
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. 3600 IN PTR mail.example.com.
mail.example.com. 3600 IN AAAA 2001:db8::25
In a reverse zone file for 2.0.192.in-addr.arpa, entries are usually written with relative names:
$ORIGIN 2.0.192.in-addr.arpa.
25 3600 IN PTR mail.example.com.
80 3600 IN PTR www.example.com.
Common mistakes
- Trying to add the PTR at your domain’s DNS provider. Unless that provider also controls the IP block, the record has no effect. Set reverse DNS through your hosting or connectivity provider.
- PTR without a matching forward record. If
mail.example.comdoes not resolve back to the same IP, forward confirmation fails. - Generic provider names on a mail server. Names that look automatically generated from the IP are a strong spam signal for many receivers. Ask for a PTR that matches your mail server’s name.
- PTR name different from the server’s greeting. Mail servers announce themselves with a name in the SMTP
EHLOcommand. It is good practice for that name, the PTR and the A record to all agree. - Forgetting IPv6. A server that sends over IPv6 needs IPv6 reverse DNS as well. Many large mailbox providers are stricter about it on IPv6.
- Missing trailing dot in a zone file. Without it,
mail.example.comturns intomail.example.com.2.0.192.in-addr.arpa..
How to check it
Paste an IP address into the reverse DNS tool. It builds the in-addr.arpa or ip6.arpa name for you, shows the PTR records, and tells you whether the result is forward-confirmed. The IP lookup shows the same reverse DNS name together with the network, organisation and abuse contact registered for the address.
If you run a mail server, the email checker is the next step: it verifies your MX, SPF, DKIM and DMARC setup.
Related records
Frequently asked questions
Who can set the PTR record for my IP address?
Whoever controls the reverse zone for the address block, which is normally the hosting provider, cloud provider or internet provider that assigned you the IP. Owning the domain does not let you set reverse DNS; look for a 'reverse DNS' or 'PTR' option in your provider's control panel, or ask their support.
What is forward-confirmed reverse DNS?
It means the PTR record of an IP points to a name, and that name's A or AAAA record points back to the same IP. Mail receivers commonly check this, and our reverse DNS tool shows whether it holds.
Does my website need a PTR record?
No. Visitors reach websites through forward lookups (A and AAAA). Reverse DNS matters mainly for servers that send email, and it also makes logs and traceroutes easier to read.
Can an IP address have several PTR records?
Technically yes, but it is discouraged. Many programs only read the first answer, and mail receivers may check just one. Use one PTR per address, matching the name the server uses to identify itself.