If the Domain Name Server(DNS) of your Linux VPS/server is misconfigured or you have a preferred DNS to use, article below will guide you on how to change the DNS settings for your Linux VPS.
Add nameservers to the Configuration File
Step 1
Open the DNS configuration file defined in /etc/resolv.conf with your preferred text editor. For example.
"vi /etc/resolv.conf"
or
"nano /etc/resolv.conf" if you prefer using nano text editor
You will be greeted with screen as attached below:
Step 2
Replaced Default DNS 8.8.8.8 and 8.8.4.4 to your preferred DNS IP.
For DNS Location In Malaysia, you can refer to : https://public-dns.info/nameserver/my.html
For users using vi editor, press "i" or "INS" to start editing the file. Once done, press "Esc" followed with ":wq" to save and exit.