Cantech Knowledge Base

Your Go-To Hosting Resource

WHM shows incorrect Name Server IP’s?

Once you set Default Name Servers from WHM and assign them with IP, it shows the wrong ones.

Accessing Home >> DNS Functions >> Nameserver IPs as root shows no IP’s. Even if you update them with /scripts2/listassignednsips the IP field shows a blank. In earlier cPanel releases you should set them in file /etc/nameserverips. Open this file in your favorite editor and add the entry as below.

10.10.10.1=ns1.yourdomain.com

10.10.10.2=ns2.yourdomain.com

This should show the correct IPs. But, in the recent cPanel releases they are stored in a .yaml file. YAML is a human readable data serialization format that takes concepts from

programming languages like C, Perl, etc. Open the file /var/cpanel/nameserverips.yaml and add the entry as below.

ns1.yourdomain.com:

10.10.10.1: 1

count: 1

zones: yourdomain.com

ns2.yourdomain:

10.10.10.2: 1

count: 1

zones: yourdomain

Use the below command to update

# /usr/local/cpanel/scripts/updatenameserverips

Conclusion

It will show the correct IP’s assigned to the Name Servers now.

November 8, 2026