Wget not working

wget

wget is not working properly on my debian server.

if I wget http://www.google.com, it says it cannot resolve the host, when I ping google.com, I receive a successful pong and when I wget http://www.debian.org it works.

I cannot wget anything else than debian.org … pretty weird.

Best Answer

Check your DNS cat /etc/resolv.conf, and the table lookup for host names cat /etc/hosts. Try changing to Google's DNS:

echo "8.8.8.8" > /etc/resolv.conf
echo "8.8.4.4" >> /etc/resolv.conf