Fix...
1. First, we log in via SSH and edit /etc/resolv.conf.
vi /etc/resolv.conf
2. Next, we add Google public name servers and comment on the other nameservers.
nameserver 8.8.8.8
nameserver 8.8.4.4
#nameserver 1xx.1xx.1xx.x
#nameserver 1xx.1xx.1xx.x
3. Then after making the changes, we restart Apache or Nginx.
service apache2 restart