reverse dns (rdns) is the method of converting an ip address to a domain name, rather than converting a domain name to an associated ip address as you would with a traditional dns lookup.
mail servers perform reverse dns lookups to make sure the other mail server they’re dealing with is who it says it is. basically this record tells other mail servers that your mail server ip has authority to send and receive mail for your domain.
note: reverse dns is compatible with ipv4 and ipv6.
This tutorial will walk you through the easy setup of reverse dns in dns. the basic steps are as follows:
- contact your ip provider to request the reverse dns zone of your ip.
- then request delegation of your reverse dns to dns made easy nameservers where your reverse dns domain is provided.
- create your reverse dns domain at dns made easy.</ li
- create a ptr record within your reverse dns domain.
1. request isp zone
first, you need to get the ip address of your mail server. see example below:
$ host mx2.dnsmadeeasy.commx2.dnsmadeeasy.com has the address 208.94.147.129
you will need to find out who owns your ip block (usually this is your isp or hosting provider).
note: you can determine the owner of an ip address by performing a whois lookup on the ip in question using this free tool.
contact your internet service provider (or the owner of your ip block) and request a zone for your mail server ip address.
This zone is actually a special reverse dns domain ending in “in-addr.arpa”. the numbers preceding “in-addr.arpa” are actually your ip block with the octets reversed.
so “1.168.192.in-addr.arpa” would be the reverse dns for the class 192.168.1 c. which means this reverse dns zone would handle reverse dns for ips 192.168.1.1 to 192.168.1.256.
if your ip block is smaller than a class c, then your zone might look something like “27/1.168.192.in-addr.arpa” or “0-25.1.168.192.in-addr.arpa”. the difference is just the syntax.
NOTE: You must create your domain within DNS Made Easy using the exact same syntax your ISP or hosting provider used to delegate it.
check the syntax of your zone
double check your delegation syntax with a reverse dns trace. note that dns made easy delegation is already done in this screenshot.
the dns made easy ip block is a full c class, so our delegation syntax is 147.94.208.in-addr.arpa. this is the domain we created, this domain is defined within the dns made easy and maps to ns0-ns4.dnsmadeeasy.com, so those are the nameservers that were delegated to. If your reverse dns domain is not already configured within simplified dns, the nameservers you provide for delegation may be different.
If your reverse dns domain is not already configured within simplified dns, the nameservers you provide for delegation may be different.
2. Request Reverse DNS Delegation
then you will need to ask your isp to delegate reverse dns to your dns provider; just like your registrar delegates any request for your dns information to your dns provider.
You will need to provide your isp with the nameservers for your domain. you can see which nameservers are authoritative for your domain here.
Usually an internet service provider or hosting company will only delegate reverse dns if you have 256 ips (a full class c) or more, but some companies have been known to make an exception.
if your provider does not delegate reverse dns to simplified dns, then there is no reason to continue with this tutorial. you can ask them to set up reverse dns for you and host your ptr records.
3. create reverse dns zone
at the top of the control panel, click the dns menu and select managed dns from the dropdown menu.
3a. click “add domains”
3b. enter the zone you received from your isp (or owner of the ip block of your mail server).
If the nameservers do not match, follow the steps below before proceeding to step 5.
4. change delegate nameservers
4a. select the “advanced” dropdown menu.
4B. Click the plus sign below the table to add a new set of nameservers.
4C. Give the configuration a name, and select a group of name servers from the dropdown menu it should apply to.
note: this must be the same nameserver group that the domains you will apply the settings to are assigned to.
5. Create PTR Record
Inside the zone you just created, add a ptr record.
5a. navigate to managed dns
5b. select your domain
5C. Add the PTR Record
under “ptr records”, click the plus sign to add a new record.
5D. Configure The Record
enter the following values for the ptr record:
a. the name value of the ptr record will be the last octets of your mail server’s ip address (this depends on the size of your reverse zone). in this example our ip address is 192.168.1.1 and the managed reverse zone covers all ip addresses in the 192.168/16 subnet, so the last two octets would be entered as ‘1.1’.
b. for the system field, you’ll enter the hostname of the record you’re using to point to your mail server and append it with a dot. In this example, we already created a record called mail, so the hostname would be mail.yourdomain.com.
c. enter a ttl for your record.
d. save your record.
Side note: Most mail servers don’t care where the PTR points to. They just want to see that the ISP has delegated the reverse DNS to your provider and that you have a PTR record for your delegated zone with the name of your IP address.