How to setup Reverse DNS and PTR records
Establish a proper reverse DNS zone to improve email delivery
To add another layer of validation to your sender reputation it is now advisable to create a reverse DNS record called a PTR and add to your DNS editor
DNS can be a strange topic, there does seem to be lot to know and just when you feel on top of things something can still pop up to surprise you, but it is now highly recommended to add this record
A simple explanation of reverse DNS is that it’s the exact opposite of DNS. Standard (aka forward) DNS maps a domain name to an IP address whereas reverse DNS maps an IP address to a domain name. The two are distinct and separate lookups however. Just because a forward lookup of example.com resolves to 22.214.171.124 doesn’t mean that a reverse lookup of 126.96.36.199 will resolve to example.com.
Why it’s needed
The most common reason for establishing a reverse DNS is for outbound e-mail servers. Since a reverse DNS record adds further tracing to the origin of an e-mail, it also adds credibility to the e-mail server itself. For that reason, some incoming mail servers now will not even consider accepting a message from an IP address which does not identify itself with a PTR record in a reverse DNS zone.
How to do it
A very important thing to note, you must create the reverse DNS zone on the authoritative DNS nameserver for the main IP address of your server. You can find out which nameserver is the authoritative server by entering the IP address you’re trying to configure into the DIG Web Interface. If the Reverse response is not provided by your nameserver, you’ll need to contact your hosting provider to help you set a PTR record. You should be able to accomplish that be emailing their support team and letting them know you’d like a PTR record set for the IP address X.X.X.X resolving to yourdomain.example.com.
If you are in control of the authoritative nameserver, the first step is to create a reverse DNS zone. The hostname for the zone must be in a very specific format. It starts with a portion of your IP address written backward followed by .in-addr.arpa.
If for example your IP address is 192.168.0.100, you start by dropping the final octet (last set of numbers) to give you 192.168.0
Next, you need to reverse that fragment of the IP address giving you: 0.168.192
Finally, append .in-addr.arpa. leaving you with the completed reverse zone domain of: 0.168.192.in-addr.arpa.
Create the PTR Record
Now that you’ve created your zone file you can create the PTR record.
Add a new PTR record and for the name, enter the final digit of the IP address that you’re setting up the reverse record for. In our example, 100. For the Canonical Hostname, enter the domain name you’d like the IP address to resolve to, for instance mailserver.example.com.
After you’ve saved your zone file, allow some time for the change to propagate before validating the new reverse DNS record.