How do I setup a PTR Record?

Posted April 8, 2015 123.5k views

I am running an email server and my outgoing emails are finding themselves in the recipient’s spam box.

After diving into the issue.. I am seeing that the issue is coming from being unable to do a reverse DNS lookup.

I’ve added all the appropriate mail records (A, MX, TXT) and am still coming across this issue.

This is what I am seeing from

Reverse MX A records (PTR) ERROR: No reverse DNS (PTR) entries. The problem MX records are: -> no reverse (PTR) detected
You should contact your ISP and ask him to add a PTR record for your ips

Can you clue me in on what I could be missing here?

  • An additional note… that is not my IP address on DigitalOcean.

    After doing a lookup on that IP address… it said that it was the “DoD Network Information Center”.
    Does anyone have any insight on to why its pointing to their IP?

    This only seems to be the case when I do a PTR lookup (dig -x ipaddr) on my digital ocean address.

  • DigitalOcean automatically configures the reverse dns entry (PTR) on their end. It will be the hostname you choose when you set up your dropplet. You can change/check this in the control panel by selecting your dropplet, then settings, then rename. As it says, changing the name there will update the PTR but not the hostname of the system, that is something you will need to do, instructions for that vary depending on the system you have installed.

    You can check the PTR by using the host command as follows:
    host <IP_ADDRESS>
    You will have to substitute your IP address in the command above.
    host domain name pointer

    You may also be a little confused: You can not update the PTR of an IP address you have not been assigned (in the U.S. by ARIN). The IP address you are using from DigitalOcean may be able for you to use, but it has not really been assigned in a way you can freely control as far as reverse dns goes, therefor you can’t change a PTR record for an IP you don’t have access to. (That’s why mail servers check PTR; if you have a properly configured reverse dns record your more likely to be authorized to send mail from that IP.)

    Good luck.

  • I can’t find the “settings” option on my droplet. I did find the domains option from the list of droplets -> dropdown on the right “more” -> “add a domain”? I did that but a PTR Record is still not being indicated. Do I just need to wait for the record to propagate?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
12 answers

A support staff helped me with the problem:

The droplet must be named with a fully qualified domain name (example before a PTR Record can be created. To rename the droplet select it from the droplets control panel and in its own page click on the name itself (there is no obvious button).

  • Hah, thank you for pointing that out! I was looking for the “Settings>Rename” option and it wasn’t there! Clicking on Droplets>{droplet name} then clicking on the droplet name at the top opens up the name field. So much for usability! :) Even a popup label like “Click to Rename” would be helpful. Thank you.

But then how does that work when you have more than one domain on the droplet? Which PTR record/domain gets the short straw?

  • I realize this thread is of 2+ years ago, but I’m leaving this comment for other people who come across this thread and are looking for an answer to this like I was:

    According to this article on reverse DNS/PTR records:

    If the email server has a reverse DNS but it’s not for your domain, that’s not a problem. Just remember that in that case, it’s even more important to set up correct DKIM and SPF records.

  • Hello, @QloudPress

    This is not an issue at all.

    You can ensure that you have a valid SPF record for your domain name. You can also add DKIM and DMARC records in order to improve the score of your outgoing emails.


I too have two domains on one droplet and would like to know how to give them both PTR records. Why not assign PTR records based on A and AAAA records?

Edit: Thinking on it some more, it seems possible that you can’t have an ip address resolve to more than one domain, as a limitation of the reverse DNS system. In which case: wow gg protocol writers. Way-to-go. Thanks a bunch.

Though it would be more the fault of email servers for using a broken filter method in the first place.

It doesn’t seem like there is, but is there a workaround?

  • You have a good point there.

    This looks to have fixed an issue I was having with some emails getting rejected when using an inmotionhosting account as a mail server so I’m glad for that.

    I have multiple domains running on the droplet too so I just picked one and used it to send mail from the apps on it. I didn’t really think about how they others would work.

  • As long as the reverse IP is set to an FQDN and that FQDN resolves to that IP you will be fine


I have the same problem on my droplet. How is this configured if you multiple domains on the droplet though?

If I configured the reverse DNS lookup with an FQDN for domain A, and sent an email from domain B, wouldn’t the emails from domain B show as coming from Domain A ?

If yes, is there ayway around this? Thanks


I fallow this link its working Example link

Step1: Change the Droplet name as your Domain name, The Digital Ocean Automagically tack the rDNS .

To check rDNS :

  1. Click on the Networking –> then click on PTR record.
    1. Check thorough command line , Type command $ host 'your ip addres'
    2. Check thorough this url Example link

Too old answer (2013) in another question:one PTR for every droplet. I do not found a recent answer.

  • The “rename droplet to FQDN” is the answer that worked for me.

    PTR records are based on the IP which is owned by DO in the case of droplets and thus independent of who owns the forward domain since your domain may be hosted outside of DO. So they use “if droplet name is a hostname” to tell them what the PTR for the droplet should be.

Perfect… renaming the droplet did the trick!

Didn’t think the solution would’ve been so simple!

Thanks so much!

Renaming the droplet with a FQDN worked for me too. Thanks.

It seems that the functionality is missing.

I also have the same problem on my droplet with multiple domains, only one has this problem though as the client is using an aol email, my mail logs state “421 Service unavailable - try again later.”

Good question ianjhar, if anyone knows the answer would appreciate some advice before I start tinkering with the FQDN:

“If I configured the reverse DNS lookup with an FQDN for domain A, and sent an email from domain B, wouldn’t the emails from domain B show as coming from Domain A ?


Previous 1 2 Next