Learn how to edit your server’s resolver configuration via WHM or SSH to resolve common networking issues.
Introduction
This article provides step-by-step instructions on changing the nameservers configured in /etc/resolv.conf using WHM or SSH.
Procedure
Method 1: Editing /etc/resolv.conf via SSH
- SSH into Your Server
- Log in to your server using SSH as the ‘root’ user.
- Open the File for Editing
- Use your preferred command-line text editor (e.g., vi, vim, nano):
nano -w /etc/resolv.conf
- Update Nameserver Information
- Add the following lines, replacing existing entries if necessary:
nameserver 8.8.8.8 nameserver 8.8.4.4
Method 2: Using WHM
- Access WHM
- Log in to WHM as the ‘root’ user.
- Navigate to Resolver Configuration
- Go to “Home » Networking Setup » Resolver Configuration.”
- Make Changes
- Click “Proceed” and adjust the nameserver settings as needed.
- Save Changes
- Click “Continue” to apply the new configuration.
Important Note:
Using public DNS servers like Google’s 8.8.8.8 and 8.8.4.4 may affect certain services like RBLs (e.g., Spamhaus). Ensure compatibility with your specific requirements before making changes.
This revised version includes clear headings, structured steps, and an important note for clarity and SEO optimization.