I have an Ubuntu 18.04 droplet being used as a web host for a shared hosting setup. I need to set up a Reverse DNS record for the Web Host as outgoing emails from the hosted sites are being rejected by recipients as the server does not have Reverse DNS setup.
Unfortunately, I did not name the droplet with a FQDN, just a descriptive name: should I do this? If so, I cannot see how to name/rename the Droplet in the Digital Ocean Control Panel.
Also the DNS for the Host Servers domain is not located in Digital Ocean, but in a third party DNS hosting service, and I don’t really want to move it.

So, how do I set up a Reverse DNS record under these circumstances?
Thanks!

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.

×
3 answers

Hello, @ajdunne

The Reverse DNS is configured automatically from our end based on the droplet’s hostname.

To rename your droplet via the control panel, do the following:

Login to the Digital Ocean Control Panel

Go to Droplets --> Click the droplet you want to rename
Then, on the droplet detail window, click on the name of your droplet (you wouldn’t know you could)
Go to the Settings Tab --> Change the name in the entry field and click the check mark

Make sure you also edit your droplet’s hostname internally as well. Update /etc/hostname and /etc/hosts and reboot.

The PTR should be automatically adjusted in few hours due to DNS cache. If this is still not working after several hours, you can contact our support team as well.

Let us know how it goes.

I have multiple domains on a Droplet. How do you proceed there?

Hi all, I have the same problem explained in the top post.
My droplet name is already set as a FQDN, the “dig -x <IP>” command seems to give a good answer, but online services like https://mxtoolbox.com/domain/ give the following alert:
SMTP: Reverse DNS is not a valid Hostname

Can somebody help me?

  • Hi
    have you updated both /etc/hostname and /etc/hosts files?

    • Hi @dganesan ,

      my /etc/hostname file coincides with

      <MyDropletName> that is <domain.com>
      

      my /etc/hosts file contains the following lines:

      <public IP> <MyDropletName>
      127.0.0.1       localhost
      172.17.0.1  <sub.other-domain.org>
      

      The third line of my /etc/hosts file refers to a Discourse instance positioned in a Docker container.

      Thanks for your reply! M.

      edited by MattIPv4
      • I am basing this reply on the setup I have. It works for me.

        In your /etc/hosts file, you shouldn’t need “ <public IP> <MyDropletName> ”. Instead, introduce the following line

        127.0.1.1 <domain.com>

        once you update, please reboot.

        • Hello, @dganesan

          Are you still experiencing the issue? Keep in mind that the DNS changes might take up to 48 hours in order to fully update. They usually happen a lot faster, but will still take a few good hours in order to propagate.

          Regards,
          Alex

Submit an Answer