As a website owner, you want your emails to land in the customer’s inbox instead of the spam folder. That’s where the DNS PTR record comes into play! It prevents your emails from ending up in spam folders.
If you are still wondering what DNS PTR Record is and why I need one? Then, keep reading as, in this article, we will cover everything about PTR records, such as;
- What is a DNS PTR record, and How Does it Work?
- Why Do You Need a DNS PTR Record?
- How to Check and Create a DNS PTR Record
- What other DNS Records Do You Need to Create?
So, without wasting any time, let’s dive right in!
What is a DNS PTR record, and How Does it Work?
A DNS PTR record is a type of DNS record that links an IP address to a domain name. It is the opposite of the A record (DNS A record), which links a domain name to an IP address. DNS PTR record helps you with reverse DNS lookups, which are queries that start with an IP address and look up the domain name.
The syntax of a DNS PTR record is as follows:
<name> <ttl> <class> <type> <rdata>
Where:
- <name> is the IP address in reverse order, with .in-addr.arpa added for IPv4 or .ip6.arpa added for IPv6
- <ttl> is the time to live in seconds, which specifies how long the record is valid for
- <class> is the network class, usually IN for internet
- <type> is PTR to indicate the record type
- <rdata> is the domain name associated with the IP address
For example, a PTR record example for the IP address 192.0.2.244 and the domain name example.com would look like this:
244.2.0.192.in-addr.arpa. IN PTR example.com
Why Do You Need a DNS PTR Record?
Your DNS PTR record can help you improve email deliverability because some email servers use reverse DNS for email domain authentication. If your IP address has no PTR record or a mismatched domain name, the recipient email server might reject or mark your email as spam.
Along with improved email deliverability, DNS PTR records can help with the following:
- Troubleshooting Email Delivery Issues: DNS PTR records help you identify the source of bounced or delayed emails.
- Better Email Logging: Having PTR records, you can convert IP addresses into domain names for more readable and meaningful logs.
- Enhance Security: It increases your security, as you can perform reverse DNS lookups to detect malicious or suspicious activity from unknown IP addresses.
As it is clear that having a PTR Record is absolutely necessary, does it mean that you should create a PTR record? No, because your email provider or web hosting company would have already done it for you.
Now, move on, and let’s see how you can double-check whether your provider has created a PTR record. If they haven’t, then how can you create one?
How to Check and Create a PTR Record
To check if your IP address has a PTR record, you can use online tools such as the reverse lookup tool at MX Toolbox and DNS Checker. These tools will show you the domain name associated with an IP address or tell you if a PTR record is missing.
When you enter the IP address of your server and click Reverse Lookup, the following information will appear;
In case of a missing PTR record, you might wonder how to set a PTR record in DNS.
The simple answer is you will have to create one or ask your web hosting or email service provider to create one for you.
Usually, you can not add your own PTR record because you probably don’t have control over the “reverse DNS zone” for your website’s domain. It’s different from the zone where you set up your website’s regular addresses, “A records.”
But if you have control over this reverse DNS or use a specific DNS provider, you can create your own PTR record. Here are some guides on how to do it for different services:
- For Amazon AWS, follow their guide to create a PTR record.
- If you use Google Cloud, see their PTR record setup tutorial.
- In the case of Microsoft Azure, use this PTR record creation guide.
According to our earlier example of an IP address of 192.0.2.244, with the domain example.com, the PTR record would look like this:
244.2.0.192.in-addr.arpa. IN PTR example.com
What other DNS Records Do You Need to Create?
As a Post SMTP user, you might need to add additional DNS records to your domain’s DNS (Domain Name System). This will help to ensure that your emails get delivered properly.
There are three important DNS records you can add:
- SPF Record: This record tells which IP addresses or domains can send emails through your domain. You should have only one SPF record; having more than one can cause problems. If you have multiple SPF records, you can follow our guide to merge multiple SPF records into one.
- DKIM Record: DKIM signs your emails, which ensures that they haven’t been changed while on their way from your email to the recipient. It adds an extra layer of security.
- DMARC Record: A DMARC record helps prevent your emails from ending up in spam folders. It also provides reports if someone tries to misuse your email.
If you don’t know which records to add, you can check our detailed documentation for your email provider:
Once you set up these DNS records, your emails should have a better chance of reaching the inbox, and you’ll face fewer issues with any sort of email warnings.
To Sum It Up
DNS PTR records are essential for reverse DNS lookups, which can improve your email deliverability, logging, and security. You need to have at least one PTR record for each IP address you use.
Additionally, for better email delivery, you have to use the Post SMTP plugin with the right configurations, which routes your emails through a reliable SMTP server so that they reach the inbox instead of going to the spam folder.
We hope this article has helped you understand what a DNS PTR record is and why you need one. If you have any questions or need help configuring Post SMTP or any other email delivery-related issues, please contact us here.
Frequently Asked Questions
What is the use of PTR records in DNS?
A PTR record links an IP address to a domain name, which is the opposite of what an A record does. A PTR record is useful for reverse DNS lookups, which improves logging capabilities and increases security by detecting malicious or suspicious activity from unknown IP addresses.
Are PTR records necessary?
PTR records are not mandatory, but they are highly recommended for email delivery and security purposes. Some email servers and anti-spam filters use reverse DNS to check whether the IP address matches the domain name. A missing or mismatched PTR record can make your email bounce.
Can you have 2 PTR records?
Yes, you can have multiple PTR records for the same IP address, but it is not advisable. Having more than one PTR record for an IP address can cause confusion and inconsistency in reverse DNS lookups, leading to unexpected results and errors in email delivery, logging, and security.
How many types of PTR are there?
There are two types of PTR records: one for IPv4 addresses and one for IPv6 addresses. The difference between them is the format and the namespace they use. For IPv4 addresses, the PTR record uses the in-addr.arpa namespace. And for IPv6 addresses, .ip6.arpa namespace.
What is a PTR DNS record used for?
A PTR DNS record is used for reverse DNS lookups, which are queries that start with an IP address and look up the associated domain name.
What is an example of a PTR record?
An example of a PTR record is;
244.2.0.192.in-addr.arpa 86400 IN PTR example.com
This means that the IP address 192.0.2.244 is linked to the domain name example.com, and this record has a time to live (TTL) of 86400 seconds (24 hours).
Who can create a PTR record?
Only the owner or administrator of an IP address can create a PTR record for it, which is usually the web hosting or email service provider that assigns or leases the IP address to a customer or user.