How to disable/fix check hostname

mhsolutions

Verified User
Joined
Jul 16, 2019
Messages
78
Location
Việt Nam
Directadmin notice

This is e-mail notification to warn you that your hostname is setup improperly on your system.​

2021-07-05 00:10
sv............, resolves to 127.0.0.1. Please make sure that your hostname resolves to your server ip (x.x.x.x) or else your email may not work correctly.

Solution:

Create an A record for your hostname (sv......) in your DNS control panel. Point the hostname to your server's main IP address. Also check /etc/hosts to ensure that the server ip is correctly set.

--
I have did same as the solution.
But after 24h, it reset hostname point to 127.0.0.1 in /etc/hosts . And the notice warning every day.

Please know me how to fix it or disable check hostname.
Thanks
 
Last edited:
Are you working on a VPS? Because this can also be cause by VPS providers.
Correct your /etc/hosts as should be.
Then use this command to block any changes to the hosts files.

chattr +i /etc/hosts

See if that helps.

Another good idea is to contact your VPS provider about this.
 
Hello,

After each reboot, I've also get /etc/hosts edited adding 127.0.0.1 myhostname.tld entry.

It seems that editing /etc/cloud/cloud.cfg and # comment out 'update_etc_hosts' is the solution.
 
Thanks Richard. For info, the OS installation was based on a (rocky linux 8) OVHCloud template converted to CloudLinux.
 
Back
Top