PTR records (or Pointer records) are used for the Reverse DNS (Domain Name System) lookup. Using the IP address you can get the associated domain/hostname. An A record should exist for every PTR record. The usage of a reverse DNS setup for a mail server is a good solution.
The PTR record resolves an IP address to a domain/hostname. Yet, to complete this assignment successfully, the Pointer record requires to be established in a Reverse DNS zone. While in the Primary DNS zone, the hostname is pointed to an IP address, using the Reverse DNS zone allows pointing an IP address to a hostname.
PTR records provide trust that the given hostname or a domain are connected to the IP address. The PTR records are a 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). This has become standard so to say as all mail providers try to keep the spam out of their clients' Inbox. The proper Reverse DNS configuration is always a good idea to avoid any potential email filtrations.
In order to create a PTR record, at first need to be created a Reverse DNS zone (read more about the reverse dns zones here). The Reverse DNS zone depends on the size of your IP network. In our example we will use an IPv4 /24 network. In the /24 network, you have 255 unique IP addresses. For an example, if our network is 192.168.0.0/24, the available IPs in this network are from 192.168.0.1 to 192.168.0.255 and our Reverse zone has following format: 0.168.192.in-addr.arpa
In order to create a Reverse DNS zone go to the Control Panel, click on the "Add new zone" button and choose "Master Reverse DNS zone" and fill the reverse zone name of your IP network. In our case this is 0.168.192.in-addr.arpa
Now in our Reverse zone 0.168.192.in-addr.arpa we can add PTR records for each IP from the network. From the button "Add new record" we can add new PTR record and here are few examples for the first two IP address:
Points to: hostname1.example.com
Points to: hostname2.example.com
Here is a video tutorial how to add the PTR records step by step:
The PTR records has the following look in the ClouDNS Control Panel:
After creating the PTR record, make sure that the hosts have corresponding A records. In our example, hostname1.example.com must be with A record pointed to 192.168.0.1 and hostname2.example.com with 192.168.0.2
To be completed the Reverse DNS configuration, you need to change the name servers of your Reverse zone at your IP provider or ask him to assist you with the modification. In our case, there must be configured NS records at the IP provider pointed to the name servers listed at the dashboard of your control panel.
PTR records are stored under the IP address but reversed.
The PTR record for IPv4 addresses like 220.127.116.11 must be added in reverse mode, for example, 18.104.22.168.in-addr.arpa.
The in-addr.arpa at the end is added automatically, and it is mandatory as all IPv4 PTR records are stored within the .arpa top-level domain.
IPv6 PTR records are also stored under the relevant IPv6 addresses, but instead of .arpa, they use the .ip6.arpa namespace.
You can perform a Reverse lookup for the relevant IP address with the following Dig command:
$ dig -x 22.214.171.124
You can check the Reverse DNS with Nslookup as well. A sample is shown below:
$ nslookup 126.96.36.199
The outputs for both methods will show which hostname does this IP address belongs to.
Propagation time depends mostly on the TTL value for the given record. But you must bear in mind, in order for your PTR record to resolve properly, the management of your IP address range must be delegated to ClouDNS. The procedure is further explained above in this article.
PTR and A records are like the two sides of the same coin. The A records are responsible for the forward DNS resolution. They resolve domain names to the corresponding IP addresses. And PTR records work in exactly the opposite way. They resolve IP addresses to hostnames. Most importantly, you should remember that for every PTR record you create, you should have an A record (for IPv4 addresses) or an AAAA record (for IPv6 addresses).
ClouDNS supports Reverse DNS zones both for IPv4 and IPv6 networks. Just write to our technical support, if you need any assistance with the configuration of the Reverse DNS and PTR records for your network and IPs.