Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just set up a new machine on my home network running Ubuntu 10.04. For some strange reason I can't reach www.google.com. All other domains work fine, even googles sub-domains like docs.google.com. I have no idea what the problem is.

curl http://www.google.com/

curl: (6) Could not resolve host: www.google.com; nodename nor servname provided, or not known

ping www.google.com

ping: cannot resolve www.google.com: Unknown host

dig www.google.com

; <<>> DiG 9.7.3-P3 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 51258
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.            IN  A

;; ANSWER SECTION:
www.google.com.     54813   IN  CNAME   www.l.google.com.

;; Query time: 46 msec
;; SERVER: 192.168.3.1#53(192.168.3.1)
;; WHEN: Tue Jan 10 14:48:35 2012
;; MSG SIZE  rcvd: 52

The google.com 301 redirect is reachable, while www.google.com is not.

share|improve this question
    
curl is saying it cannot resolve, yet the system can, which suggests something is up with curl itself. Does wget work? Can you try curl -vvvvvv www.google.com –  Paul Jan 10 '12 at 12:50
5  
"www. blindness" is a disease brought on by too much use of WWW browsers that automatically affix what one types in an address bar with other stuff. ☺ www.google.com. is not the same domain name as google.com., and this question's title is a falsehood. –  JdeBP Jan 10 '12 at 13:02
    
It's not a curl problem, Safari, Chrome and Firefox also can't display google.com or www.google.com. –  wowpatrick Jan 10 '12 at 13:19
1  
@JdeBP My bad, the google.com redirect is reachable, www.google.com is not. Still in IMHO still no reason to down vote right away ... –  wowpatrick Jan 10 '12 at 13:51
add comment

3 Answers 3

up vote 1 down vote accepted

Your dig returns incomplete results, here's what I get:

$ dig www.google.com

; <<>> DiG 9.2.1 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54679
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         0       IN      CNAME   www.l.google.com.
www.l.google.com.       263     IN      A       209.85.229.99
www.l.google.com.       263     IN      A       209.85.229.103
www.l.google.com.       263     IN      A       209.85.229.104
www.l.google.com.       263     IN      A       209.85.229.105
www.l.google.com.       263     IN      A       209.85.229.147

;; AUTHORITY SECTION:
l.google.com.           33378   IN      NS      ns3.google.com.
l.google.com.           33378   IN      NS      ns4.google.com.
l.google.com.           33378   IN      NS      ns1.google.com.
l.google.com.           33378   IN      NS      ns2.google.com.

;; ADDITIONAL SECTION:
ns1.google.com.         193146  IN      A       216.239.32.10
ns2.google.com.         193146  IN      A       216.239.34.10
ns3.google.com.         193463  IN      A       216.239.36.10
ns4.google.com.         193146  IN      A       216.239.38.10

;; Query time: 147 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Jan 10 16:23:30 2012
;; MSG SIZE  rcvd: 268

In particular the answer obtained by your dig lacks the A records for www.l.google.com.

I would use wireshark or similar tool to see what DNS queries were sent where and what DNS replies were received. Compare results on working and non-working PCs.

share|improve this answer
add comment

When you diged for an A record, your DNS server returned a CNAME with no extra records. This is quite strange and may indicate the server can't resolve www.l.google.com.

"google.com" worked because CNAME can't be used with the "@" record, so A records must be returned directly. Maybe the DNS server 192.168.3.1 is filtering out l.google.com domains. Check if dig @8.8.8.8 www.google.com gives you A records. If so, you may want to change your DNS server.

share|improve this answer
add comment

There seems to be some problem with DNS resolution. Maybe some issue with ISP's DNS cache. You can directly check using Google's DNS server "8.8.8.8" and check.

lab@x:~$ dig www.google.com @8.8.8.8

; <<>> DiG 9.7.3 <<>> www.google.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30985
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.            IN  A

;; ANSWER SECTION:
www.google.com.     81660   IN  CNAME   www.l.google.com.
www.l.google.com.   113 IN  A   74.125.236.84
www.l.google.com.   113 IN  A   74.125.236.80
www.l.google.com.   113 IN  A   74.125.236.81
www.l.google.com.   113 IN  A   74.125.236.82
www.l.google.com.   113 IN  A   74.125.236.83

;; Query time: 42 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jan 12 00:25:58 2012
;; MSG SIZE  rcvd: 132

lab@x:~$ 

If this is working fine then you may change

lab@x:~$ cat /etc/resolv.conf 

to use this DNS server and then try sending a curl request.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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