A simple note on Reverse DNS Record
Why this topic important? What are the uses of rDNS record?
Yeah, we all know about forward DNS lookup and its working. It’s a topic directly focusing on “What is reverse DNS?” A domain name system (DNS) is simply points a domain name or hostname to an IP address. Simply, it’s resolve human readable hostname or domain like www.crybit.com to machine readable IP address like 188.8.131.52. The concept of rDNS is just opposite to DNS, which means, it convert IP to hostname.
Forward DNS --> Domain or Host name to IP address Reverse DNS --> IP address to Host name
It has some other names. The reverse DNS record is also known as the PTR record, pointer record or IP resolver. It plays some important role in email functionality. Without a proper reverse DNS entry the email from a sender server may consider as Spam email at the recipient end.
How to check the forward and reverse DNS for a domain?
It’s simple to check the reverse and forward DNS entry. We can use different command line (CLI) tools to check this, like dig, nslookup, host commands. I prefer HOST command for reverse DNS lookup, which displays the simple output. Here is the example:
This is Google’s IP
Reverse DNS lookup
[email@example.com ~]$ host 184.108.40.206 220.127.116.11.in-addr.arpa domain name pointer ord08s11-in-f14.1e100.net.
The Forward DNS should be matched, please see the result:
[firstname.lastname@example.org ~]$ host ord08s11-in-f14.1e100.net ord08s11-in-f14.1e100.net has address 18.104.22.168
See this topic >> Different ways/commands to check the RDNS entry for your IP Address <<
Why reverse DNS lookup is important in email functionality?
When the sending server, consider a VPS or a dedicated server, vps.crybit.com sends an email to Gmail or somewhere else, from the address email@example.com.
It will connect to the Gmail server and tell it, “Hello, I’m vps.crybit.com.”
Then, Gmail will pull an rDNS record on the IP that vps.crybit.com is connecting from. If the rDNS record comes up as vps.crybit.com, then Gmail will be happy. If there is a mismatch on reverse and forward lookup, probably the recipient server consider that email as a Spam.
I’ve a domain with dedicated IP address!!
In this case, if your domain is assigned with a dedicated IP address and the reverse lookup is perfectly matching to its froward DNS, some email servers will accept that because the mail server IP is able to map back to itself even if its hostname claim does not match. In a cPanel server this can be seen by checking the /etc/mailips file. The domain without a dedicated IP address will use the main share IP address to send emails by default.
Cool..! Let me know if you have any questions!!