Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Domain Name & DNS Issues  >  What Is A PTR Record & How To Add PTR Record?
Top Scroll

What Is A PTR Record & How To Add PTR Record?

 3 min

PTR record essentially resolves an IP address to a fully qualified domain name (FQDN) or map a network interface contrary to what A record does. PTR records are also called Reverse DNS records.

They are deployed for rDNS (Reverse Domain Name System) lookup. It helps in obtaining hostname or domain of the IP. The owner of the IPs is usually the ISP, the web hosting provider, or owned group directly assigned by ARIN.

Nowadays almost all external mail exchange servers perform reverse DNS (rDNS) lookups prior to accepting messages originating from sending mail servers.  Hence, it is recommended to set rDNS for a mail server.

By using the following commands in Linux we can check if there is the PTR record set or not for any IP.

# host IP

or

# dig -x IP     (Replace IP with the actual IP)

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.3 <<>> -x 20.xx.x.xx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4311
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;xx.x.xx.20.in-addr.arpa. IN PTR

;; ANSWER SECTION:
xx.x.xx.20.in-addr.arpa. 14399 IN PTR rdns-20.xx.x.exampledomain.com.

;; Query time: 334 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sun Dec 6 20:36:54 2015
;; MSG SIZE rcvd: 92

OR

# host IP  (Replace IP with the actual IP)

xx.x.xx.20.in-addr.arpa domain name pointer rdns-20.xx.x.exampledomain.com.

For Windows you can open cmd or PowerShell and run the following command to obtain the output.

nslookup IP

Firstly, the reverse DNS zone need to be created on the authoritative DNS nameserver for the required IP.

Say you are in control & able to access  the authoritative nameserver, then the first step would be to create a rDNS zone. It has be be in a specific format. It begins with a portion of  IP address written backward followed by .in-addr.arpa.

For instance your IP addr  is 20.xx.x.xx, you begin by dropping the final octet (last set of numbers) to give you 20.xx.x.

Next, you need to reverse that fragment of the IP address giving you: x.xx.20. Now, append .in-addr.arpa. to set the reverse zone domain of: 20.xx.x.in-addr.arpa.

– Creating PTR Record.

Once done with the creation of zone file we can move ahead to create the PTR record.

Edit in-addr.arpa of the zone and for the Canonical Hostname, set the domain name of your choice you would want the IP address to resolve to, for example, myhostptr.domain.com

Save the DNS zone file after you’ve set the PTR or rDNS. NOTE: it will take sometime for the propagation.

For clients with MilesWeb, PTR record are set after receiving proper justification at support@milesweb.com. Only one single PTR record will be set instead of multiple.

 

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.