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.

  • How are you using wget ? – petrus Sep 27 '11 at 9:59
  • Can you add in the output of wget -O /dev/null -d http://www.google.com – SmallClanger Sep 27 '11 at 10:05
  • root@dragon:/etc# wget -O /dev/null -d google.com #RETURN# DEBUG output created by Wget 1.12 on linux-gnu. #RETURN# --2011-09-27 13:18:55-- google.com #RETURN# Resolving www.google.com... failed: Name or service not known. #return# wget: unable to resolve host address `www.google.com' #return# root@dragon:/etc# – Jack Lomberg Sep 27 '11 at 18:19
  • how does it help ? (added #RETURN# because serverfault doesn't allow lines return) – Jack Lomberg Sep 27 '11 at 18:20
  • wget IP_OF_GOOGLE works tho... so I really don't know what's the problem – Jack Lomberg Sep 27 '11 at 18:44

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.