What is a PTR record and how to do a reverse IP lookup?

Are you experiencing bounces while trying to send from your hosting account? That can happen due to errors in the PTR record of your . In this tutorial, we’ll show you what this record is and how to check if your IP address has one with a PTR lookup. Let’s get started!

What is a PTR Record and why do you need one?

In a nutshell, a PTR record is a reverse version of a . This record maps the domain name to an IP address, the PTR maps an IP address to a hostname. This ensures that your IP address is officially connected to your host.

Setting this registry is essential if you use internal or external mail servers. This registration adds reliability to the sending servers and allows the receiver to verify the hostname of your IP address. It is an excellent form of protection against all kinds of spammers.

That’s why some of the major email providers like and do a reverse DNS lookup before accepting incoming emails.

Two Methods to Check Your PTR Record and Reverse DNS Lookup

Use the following methods to view your domain’s PTR record value and make sure you’ve set up a reverse lookup:

Using computer consoles

Check if the IP address is resolving to the hostname by checking the value of this register in your computer’s consoles.

If you’re using Windows, run this syntax at the command prompt:

nslookup IP_ADDRESS

Replace IP_ADDRESS with the IP address of your domain

Let’s say you want to do a PRT lookup for 54.243.154.xx. So, you will see this:

See also  What is MySQL? Detailed explanation for beginners

Microsoft Windows (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\DCW-3>nslookup 54.243.154.xxx Server: hotspot.niagahoster.co.id Address: 192.168.8.1 Name: ec2-54-243-154-xx.compute-1.amazonaws.com Address: 54.243.154.xx

As you can see, the PTR record is ec2-54-243-154-xx.compute-1.amazonaws.com.

The process is similar whether you do this in the Linux console terminal or the MacOs terminal. Do the PRT lookup with the following command:

dig -x IP_ADDRESS

Remember to change IP_ADDRESS to the actual IP address.

The output will look like this on Linux:

~$ dig -x 54.243.154.xx ; <<>> DiG 9.10.3-P4-Ubuntu <<>> -x 54.243.154.xx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48405 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;xx.154.243.54.in-addr.arpa. IN PTR ;; ANSWER SECTION: xx.154.243.54.in-addr.arpa. 250 IN PTR ec2-54-243-154-xx.compute-1.amazonaws.com ;; Query time: 21msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Mon Nov 04 12:42:56 WIB 2019 ;; MSG SIZE rcvd: 99

On MacOS, you’ll see a similar output as well:

~dig -x 54.243.154.xx ; <<>> DiG 9.10.6-P1 <<>> -x 54.243.154.xx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26997 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS:version:0,flags:; udp: 4096 ;; QUESTION SECTION: ;xx.154.243.54.in-addr.arpa. IN PTR ;; ANSWER SECTION: xx.154.243.54.in-addr.arpa. 250 IN PTR ec2-54-243-154-xx.compute-1.amazonaws.com ;; AUTHORITY SECTION: 154.243.54.in-addr.arpa. 3600 IN NS x1.amazonaws.com. 154.243.54.in-addr.harp. 3600 INNS x3.amazonaws.org. 154.243.54.in-addr.harp. 3600 IN NS pdns1.ultradns.net. 154.243.54.in-addr.harp. 3600 IN NS x4.amazonaws.com. 154.243.54.in-addr.harp. 3600 INNS x5.amazonaws.org. ;; Query time: 38msec ;; SERVER: 118.98.44.100#53(118.98.44.100) ;; WHEN: Mon Nov 04 13:02:56 WIB 2019 ;; MSG SIZE rcvd: 223

See also  What is Node.js: Common use cases and how to install it

In the ANSWER SECTION, you can see that the PTR record value is ec2-54-243-154-xx.compute-1.amazonaws.com.

Use online tools

You can also use online reverse lookup tools like to find out the hostname from the IP address. All you need to do is enter the IP address in the field and press the button Reverse Lookup.

If the search shows that you have not established a PTR record for your IP address, contact your hosting provider or ISP and request to create one.

conclusion

As we’ve mentioned, a PTR record is the reverse version of your domain’s IP address. This confirms that your IP address connects to a hostname.

If your IP address is not pointing correctly, you should set up a PTR lookup with your hosting provider. This way, you will be able to avoid email bounces.

Gustavo is passionate about creating websites. He focuses on the application of SEO strategies at for Spain and Latin America, as well as the creation of high-level content. When he is not applying new WordPress tricks you can find him playing the guitar, traveling or taking an online course.

Loading Facebook Comments ...
Loading Disqus Comments ...