Press Ctrl/Cmd + P to print
or save as PDF

What is Reverse DNS or PTR Record ?

What is reverse DNS?

We often use reverse DNS lookup as a DNS query for the domain name associated with a given IP address. This accomplishes the opposite- forward DNS lookup, in which the DNS system is queried to return an IP address.

Standards from the Internet Engineering Task Force (IETF) suggest that every domain should be capable of reverse DNS lookup. However, as reverse lookups are not critical to the normal function of the Internet, they are not hard requirements. Thus, reverse DNS lookups are not universally adopted.

How does it work?

Reverse DNS lookups query DNS servers for a PTR (pointer) record. The server cannot resolve a reverse lookup if it does not have a PTR record. PTR records store segment-reversed IP addresses, and they append ‘.in-addr.arpa’ to that. For example, if a domain has an IP address of 193.1.1.1, the PTR record will store the domain’s information under 1.1.1.193.in-addr.arpa.

In IPv6 (latest version of the Internet Protocol), PTR records are stored within the ‘.ip6.arpa’ domain instead of ‘.in-addr.arpa.’

What are reverse DNS lookups used for?

Reverse lookups are commonly used by email servers to check if an email message came from a valid server before bringing it onto their network. Many email servers will reject messages from any server that does not support reverse lookups or from a server that is not legitimate. Spammers often use IP addresses from hijacked machines. This means that there will be no PTR record. Besides, they may use dynamically assigned IP addresses that lead to server domains with highly generic names.

Also, logging software employs reverse lookups. They provide users with human-readable domains in their log data, as opposed to a bunch of numeric IP addresses.

How can you utilize it?

We recommend you to utilize online reverse lookup tools, such as MxToolBox. The tool allows you to find out the hostname of the IP address. What you need to do is just enter the IP address in the field and press the Reverse Lookup button.

What is PTR Record?

We use PTR records for the Reverse DNS (Domain Name System) lookup. You can get the associated domain/hostname when using the IP address. For every PTR record, there is an A record. Reverse DNS setup for a mail server is a good solution.

In the domain DNS zone, the hostname is pointed to an IP address.
In the reverse zone, it allows an IP address to be pointed to a hostname.
You need to use a PTR record in the reverse DNS zone. The PTR record can resolve the IP address to a domain/hostname.

Why do you need it?

PTR records provide trust that the given hostname or a domain is connected to the IP address. The PTR records are must-have for outgoing mail servers, because most of the mail providers reject or mark as spam messages received by mail servers without valid reverse DNS configuration (missing PTR or mismatch A record for the hostname).

How to create a PTR record?

In order to create a PTR record, we would first need to be created a Reverse DNS zone. The reverse DNS zone depends on the size of the IP network. For example, we use an IPv4 /24 network. In the /24 network, there will be 255 unique IP addresses. For example, if the network is 192.168.0.0/24, then the available IPs in this network are from 192.168.0.1 to 192.168.0.255. The reverse zone has the following format: 0.168.192.in-addr.arpa

To create a reverse DNS zone, go to the Control Panel. After that, click on the Add new zone button and choose Master Reverse DNS zone. Next, fill in the reverse zone name of your IP network. 

Now in the reverse zone, we can add PTR records for each IP from the network. Moreover, we can add a new PTR record by clicking the button “Add new record”. These are some examples for the first two IP address:

For 192.168.0.1
Type: PTR
Host: 1
Points to: hostname1.example.com

For 192.168.0.2:
Type: PTR
Host: 2
Points to: hostname2.example.com