Introduction
This article guides you on how to change the nameservers configured in /etc/resolv.conf via WHM or SSH.
Procedure
WHM
- Log in to WHM as the 'root' user.
- Navigate to "Home » Networking Setup » Resolver Configuration."
- Click the "Proceed" button.
- Make the desired changes.
- Click the "Continue" button to save the changes.
SSH
- SSH into the server as the 'root' user.
- Open the /etc/resolv.conf file using your preferred command-line text editor (i.e., vi, vim, nano, etc.).
-
Comment out the current nameservers by adding a '#' in front of each nameserver, then add the new nameserver entries.
#nameserver 192.168.0.1
#nameserver 192.168.0.2
nameserver 8.8.8.8
nameserver 8.8.4.4Please note, using public DNS servers, such as Google's 8.8.8 and 8.8.4.4, may cause RBLs, such as Spamhaus, to not function correctly.
- Save and close the file.