Reverse DNS uses pointer records (PTR) to convert IP addresses to domain names. Forward DNS uses A records to convert domain names to IP addresses.
Configure reverse DNS
PTR records require authoritative DNS nameservers before they can function properly.
To find the authoritative DNS nameservers of your server's main IP address, trace the Start Of Authority (SOA). To do this, run the appropriate command:
In this example,
0.168.192.in-addr.arpa represents your server's main IP address.
- Changes to your server's DNS nameservers do not take effect if your server's DNS nameservers are not authoritative for your IP address. Many hosting providers do not delegate authority for PTR records to their customers.
- Contact your upstream provider to either delegate authority to your nameservers or set up PTR records for your nameservers.
- WHM's Add a DNS Zone interface (WHM >> Home >> DNS Functions >> Add a DNS Zone) does not currently support IPv6.
Add the reverse DNS zone.
Navigate to WHM's Add a DNS Zone interface (WHM >> Home >> DNS Functions >> Add a DNS Zone) and enter the following information:
- Enter your server's IP address in the Ipv4 Address text box.
Enter reverse DNS zone's name in the Domain text box.
To create a reverse DNS zone name for an IPv4 address, perform the following steps:
- Drop the last octet from the IP address.
- Reverse the order of the octets that remain.
in-addr.arpato the end of the octets.
A complete reverse DNS zone name for an IPv4 address will resemble the following example:
If your hosting provider delegates you a byte boundary that is greater than
25, separate the network range and byte boundary with a dash (
–), rather than a forward slash (
/). For example:
For more information, read the RFC 2317 documentation.
The Domain Selection section of WHM's Add DNS Zone interface.
Edit the reverse DNS zone file.
After you create your zone file, create each PTR record in WHM's Edit DNS Zone interface (WHM >> Home >> DNS Functions >> Edit DNS Zone).
Your zone file already contains an NS entry for each of your server's authoritative nameservers.
- Enter the octets in an available text box under the Add New Entries Below this Line heading.
- Select PTR in the appropriate menu. The Hostname text box will appear.
- Enter the hostname that corresponds to the last octet in the IP address.
Test your records.
After your domain's DNS information propagates, confirm that you properly configured reverse DNS.
To confirm that you properly configured reverse DNS, run the following command:
If you correctly configured reverse DNS, the output will resemble the following example: