Hi, I’ve setup my own mail server and need to change the rDNS pointer to proper configure it. Can you please help? Many thanks.
This textbox defaults to using Markdown to format your 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.
Hi @kartone<
Changing PTR
DigitalOcean automatically configures the reverse DNS entry (PTR) on their end. It will be the hostname you choose when you set up your droplet. You can change/check this in the control panel by selecting your droplet, then settings, then renaming. 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.
To set one, you need to enter your Droplet via SSH and:
Change the hostname using hostnamectl
The first step once you have entered the droplet would be to use the
hostnamectl
command. Let’s say we want to name our droplet ‘ExampleName’. To do so, we need to execute the command like soThe hostnamectl command does not produce output. On success, 0 is returned, a non-zero failure code otherwise.
Update the /etc/hosts file
Next on our list would be to update the hosts file located in the etc folder. You can use any editor you want from nano, vi, vim.
In there you’ll see something similar to
Change the line which says the following
to be
Save the file and exit.
Hope that this helps!
Hi @kartone,
You can see the following docs on how to change your PTR:
https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#ptr-rdns-records
DigitalOcean automatically create PTR records for Droplets based on the name you give that Droplet in the control panel. The name must be a valid FQDN, so using example.com as the Droplet name will create a PTR record, but ubuntu-s-4vcpu-8gb-fra1-01 or my-droplet will not. Droplets with IPv6 enabled will only have PTR records enabled for the first IPv6 address assigned to it, not to all 16 addresses available.