Question

a can't add my rDNS of mail server

Hello you can my please with my mail server. I need add rDNS (maybe add need to cloudflare near my domen, i don’t now) but i find instruction when writing " ask you provaider ip for add to DNS records" Example “113.37.9.4.in-addr.arpa”


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

As per this comment here, you can set the Droplet’s hostname (which would update the PTR record along with it) to e.g. mail.yourdomain.com where yourdomain.com is one of the domains on that droplet, and then add an A record for mail.yourdomain.com that points to your droplet.

This way it will be a valid PTR <=> FQDN setup and it will work fine for all of the domains on that Droplet.

As a side note, I could also suggest checking this discussion here on why adding multiple PTR records is not recommended:

https://serverfault.com/questions/618700/why-multiple-ptr-records-in-dns-is-not- recommended

Regards

Hi @nikolayurchin<

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 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.

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 so

sudo hostnamectl set-hostname ExampleName

The 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.

sudo nano /etc/hosts

In there you’ll see something similar to

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 PreviousNameHere
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Change the line which says the following

127.0.1.1 PreviousNameHere

to be

127.0.1.1 ExampleName

Save the file and exit.

That should be it.

Hope this helps! Let me know if you have any questions.

Hi @Nikolay,

If you want to create rDNS records on your DNS server you can check out https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/#ptr-rdns-records page where you will find a lot of information about it.

Hope that helps you,

Sergio Turpín