30 seconds guide on how to modify the DNS server settings of a VPS hosting

This article explains how to modify the DNS server on VPS cloud servers running various Linux operating systems such as CentOS, Fedora, Ubuntu, Debian, etc.

You can replace the specific DNS server with the one you need for your country by searching through a search engine.

Tutorial to modify DNS server

1.Remote login to the VPS

Use remote SSH software to log in to the server. Enter the username, password, and server IP to establish a connection.

If you haven’t downloaded SSH software yet, you can try the basic free SSH tool-PUTTY

2. Modify the file

vi /etc/resolv.conf

or

nano /etc/resolv.conf

3.Replace the DNS server

Replace [ns1] and [ns2] with the DNS servers you obtained through the search, and save the file by typing :wq.

nameserver [ns1]
nameserver [ns2]

4. Test

Use the ping command to test some commonly used domain names. If you see an IP address, it means the DNS server has been successfully changed!

ping www.google.com

Leave a Comment