June 17, 2020
June 17, 2020
Are you experiencing bounce backs while trying to send emails from your hosting account? That can happen due to PTR record errors on your DNS. In this tutorial, we’ll be discussing what a PTR record is and how to check whether your IP address has one with a PTR lookup. Let’s get started!
Upgrade to Hostinger’s Email Hosting and have everything you need, right at your fingertips.
A PTR record is well-known as the reverse version of an A record. While A record maps the domain name to an IP address, the PTR record maps the IP address to a hostname. So, the PTR record ensures that your IP address officially connects to your host.
Configuring the PTR record is essential if you’re using both internal or external mail servers. This record adds reliability to sending servers and allows the receiving end to check the hostname of your IP address. It is an excellent way of protection against all sorts of spammers.
Perform the methods below to see your domain’s PTR record value and make sure that you’ve set a reverse lookup:
Check whether or not the IP address is resolving into the hostname by checking the PTR record value through your computer consoles.
If you’re using Windows, run this syntax on the command prompt:
Change the IP_ADDRESS with your domain’s IP address.
Let’s say you want to do a PRT lookup for 54-243-154-xx. Then, you’ll see this:
Microsoft Windows [Version 10.0.18362.418] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\DCW-3>nslookup 54.243.154.xx 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 if you perform this on Linux’s console terminal or MacOs’s terminal. Do the PRT lookup with the following command:
dig -x IP_ADDRESS
Remember to change the IP_ADDRESS with your real IP address.
The output will look like this in 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: 21 msec ;; 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 result 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.arpa. 3600 IN NS x3.amazonaws.org. 154.243.54.in-addr.arpa. 3600 IN NS pdns1.ultradns.net. 154.243.54.in-addr.arpa. 3600 IN NS x4.amazonaws.com. 154.243.54.in-addr.arpa. 3600 IN NS x5.amazonaws.org. ;; Query time: 38 msec ;; SERVER: 220.127.116.11#53(18.104.22.168) ;; WHEN: Mon Nov 04 13:02:56 WIB 2019 ;; MSG SIZE rcvd: 223
From the ANSWER SECTION, you can see that the PTR record value is ec2-54-243-154-xx.compute-1.amazonaws.com.
Alternatively, you can utilize online reverse lookup tools like MxToolBox to find out the hostname of the IP address. All you need to do is enter the IP address in the field and press the Reverse Lookup button.
Unfortunately, if the lookup shows that you haven’t set a PTR record for your IP address, contact your hosting provider or ISP and request to create one.
As we’ve discussed, a PTR record is the reverse version of your domain’s IP address. It confirms that your IP address connects to a hostname.
If your IP address doesn’t point correctly, you need to set up a PTR lookup to your hosting provider. This way, you’ll be able to avoid email bounce backs!