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.

link|improve this question
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
feedback

1 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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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