How do I change the hostname returned by a reverse DNS lookup?

I am trying to change the value that a reverse DNS lookup returns for my linode site (https://dnschecker.org/reverse-dns.php). I changed the /etc/hosts file from this

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 45.79.19.71 linwebdev.oldDomain.com linwebdev

to this

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 45.79.19.71 linwebdev.newDomain.com linwebdev.

I ran hostnamectl set-hostname newDomain.com and /etc/init.d/network restart. Now I can run hostname and get newDomain.com (even after rebooting) which is great. But the DNS lookup still returns oldDomain.com. I cannot find any setting to change for this on linode's website. What am I missing? How can I get the reverse DNS to return newDomain.com?

2 Replies

Hey there @j_stin! Have you taken a look at our Reverse DNS guide? It should lay out all of the steps you need to take to get reverse DNS working:

https://www.linode.com/docs/networking/dns/configure-your-linode-for-reverse-dns/

Once you have a valid A record for linwebdev.newDomain.com, you should be able to set up reverse DNS.

Hope this helps!

Thanks! I new there had to be a setting, I just wasn't finding it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct