DNS PTR Record

A PTR DNS record is used for reverse DNS lookups, when an IP address is associated with a domain/hostname.

 

What is a PTR DNS record?

A PTR (Pointer Reverse DNS) record indicates the domain name corresponding to an IP address. It is the exact opposite of an A record, which provides the IPv4 address associated with a domain name (hostname).

PTR records are used in reverse DNS lookups. When a visitor wants to access a domain name in their browser, a DNS lookup occurs, matching the desired domain name to its corresponding IP address. A reverse DNS lookup is the reverse of this process: it is a query that starts with the IP address and looks up the associated domain name.

 

Why use a PTR record?

PTR records are used in reverse DNS lookups; Common uses of reverse DNS include email and security:

Validation: The PTR record is useful for outgoing mail servers (SMTP). This record adds extra reliability to email sending and allows the recipient to verify the hostname of an IP address. Some mail servers do not accept messages from servers without a properly configured PTR record. The PTR record demonstrates good faith.

Anti-spam: The PTR record is also an excellent way to protect against spammers using fraudulent domain names. Some anti-spam filters use reverse DNS to verify the domain names of email addresses and ensure that the associated IP addresses are indeed used by legitimate mail servers.

Troubleshooting email delivery issues: Email delivery issues can sometimes result from a misconfigured or missing PTR record. If a domain doesn't have a PTR record, or if the PTR record contains the wrong domain, email services can block all emails from that domain.

Security and Logs: System logs typically store only IP addresses, not domain names. Therefore, PTR records can be used to perform a reverse DNS lookup and convert them to domain names, making it easier to determine the origin of traffic.

 

How are PTR records created and stored?

For IPv4 addresses:

PTR records are stored under the reversed IP address, with the subdomain ".in-addr.arpa" appended.

in-addr.arpa. is the namespace within .arpa for IPv4 reverse DNS lookups.

For instance, the PTR record for the IP address 17.248.213.166 would be stored under "213.248.17.in-addr.arpa". (This is always the first three parts of the IP address in reverse order.)

The subdomain ".in-addr.arpa" must be added because PTR records are stored in the .arpa top-level domain in the DNS. The .arpa TLD serves various technical functions and is managed directly by the IAB. It stands for "Address and Routing Parameter Area" and is used, among other things, to resolve IP addresses to domain names via subdomains like ip6.arpa.. The .arpa name is a domain primarily used for managing the internet network infrastructure, and it was historically the first top-level domain defined for the internet. It takes its name from DARPA (Defense Advanced Research Projects Agency), which created ARPANET, a major precursor network to the Internet, and which also funded the development of the Internet.

 

Regarding IPv6 addresses:

IPv6 addresses are structured differently from IPv4 addresses, and IPv6 PTR records exist in a separate namespace within .arpa.

ip6.arpa. is the namespace within .arpa for reverse DNS lookups in IPv6.

IPv6 PTR records are stored under the reversed IPv6 address, converted into four-bit sections (as opposed to the eight-bit sections used in IPv4), plus the subdomain ".ip6.arpa.".

For instance, the IPv6 PTR record for the IP address 2a01:b740:a41:632::5:3 would be stored under "0.4.7.b.1.0.a.2.ip6.arpa".

 

How to do add a PTR record?

PTR records cannot be added directly to your customer portal. You must submit a request to us, either by email to your account manager or to our support team.

To request the creation of a PTR record from our services, here is a sample request with the information you need to provide:
 

Create the following PTR records:

Domain Name

Type

TTL

Section

IP Address

mail.we.apple-dns.net  AAAA 300 Answer  2a01:b740:a41:632::5:3 
mail.we.apple-dns.net  A 300 Answer  17.248.213.166