Create a PTR record for a droplet's public IP address

I know that you automatically create a PTR record for the internal IP address but I also need one for the public address. I am running a mail server on my droplet and have as the Postfix hostname with it pointing to public address. To avoid mail delivery problems, that IP should point back to my hostname


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hello, all

DigitalOcean will automatically create PTR records for your Droplets based on the names you give your Droplets in your DigitalOcean control panel.

The name of your Droplet must be a valid FQDN (Fully qualified domain name), so using as the Droplet name will create a PTR record, but ubuntu-s-4vcpu-8gb-fra1-01 or my-droplet will not.

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.

Hope that this helps! Regards, Alex

I agree. I am (or was) looking for alternatives to move from bluehost VPS, in part because of email deliverability and their issue with DKIM records. Now that I have SPF, DKIM and even DMARC set up on a droplet (and tested the authority), gmail still spams the server outbound emails because of the rDNS issue with floating IPs. Pretty much every server I run sends out email, and some are web stores. Makes little sense to move if the server mail doesn’t get to the users. A large reason for this was not to force my clients to use some other mail alternative for simple server messages.

If there is a way around this I’d love to know, it’s down to this one detail. Floating IP’s mean Digitalocean droplet scalability and staging. rDNS (along with SPF, DKIM and DMARC) means the emails don’t get spammed.

Basically what this seems to say is that you can’t really have scalability features of floating IP’s and still expect outbound server mail to get to anyone’s inbox.

I’m not sure that this answered my question. I know that a PTR record will be created from the system’s internal IP address to the droplet FQDN. What I need is a PTR record from my floating IP address.

The reason this matters is that I have a CentOS7/Postfix mail server running and the outgoing mail is getting the internal IP address which some recipients reject because it comes from an IP address which is in a dynamic block, hence wanting to use the floating IP.

This brings up a related question, the droplet only seems to know about its internal IP, how do I get postfix to use the floating IP address? I can add ‘smtp_bind_address’ into the Postfix but then I get a ‘cannot assign requested address’ error. (note: this system seems to mess up the underscores in smtp etc.)


Thank you for posting this here so that others can benefit from the answer as well. To set a PTR record on your droplet, you just need to change the droplet name to a fully qualified domain name. So if your droplet is named “” then that will be your PTR record as well. You might give it an hour or two before checking it, just to make sure DNS caches drop.

To clarify, this is the naming in our cloud panel, not just the hostname inside of the droplet.