As of WHM 11.30, the nameservers’ IP assignments are now read from the Zonefiles and actual DNS queries after recent updates. If you are not seeing the needed IPs in /etc/nameserverips please do not attempt to edit that file, as it is now overwritten by cPanel.

Check under WHM: Main >> DNS Functions >> Nameserver IPs for current nameserverips

(Solutions may depend on the cPanel version)

Problem
The updated A entries and/or NS entries are not retained:
Solution(s)
Add the needed nameservers to the /etc/hosts file
vim /etc/hosts
Add (append) a new line, one per IP, onto the existing hosts file such as:
123.456.789.012 ns1.domain.com
OR
123.456.789.012 ns1.domain.com ns2.domain.com
Then run the updatenameserverips script:
/scripts/updatenameserverips
Check under WHM: Main >> DNS Functions >> Nameserver IPs again to see if it worked, if not continue

Delete the nameserverips.cache file
rm /var/cpanel/nameserverips.cache

Then modify /var/cpanel/nameserverips.yaml to suite
vim /var/cpanel/nameserverips.yaml

Then run the updatenameserverips script again

Was this post helpful?