Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I surf net in Ubuntu 12.04. All the sites are working, except one site http://developer.android.com/. I don't know why.

At the same time, the same url opens in Windows perfectly.

So the site is up and the problem isn't related to the proxy either.

I am totally feeling helpless. Why is this happening?

Firefox shows the error

Server Not found

wget http://developer.android.com/

Resolving developer.android.com (developer.android.com)... failed: Name or service not known.
wget:unable to resolve host address 'developer.android.com'

ping developer.android.com

ping: unknown host developer.android.com

cat /etc/hosts      localhost      devsda

# The following lines are desirable for IPv6 capable hosta
::1     ip6-localhost   ip6-loopback
fe00::0    ip6-localnet
ff00::0    ip6-mcastprefix
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters 

cat /etc/resolv.conf

#  Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

devsda@devsda:~$ host developer.android.com

;; Truncated, retrying in TCP mode.
Host developer.android.com not found: 5(REFUSED)

devsda@devsda:~$ host developer.android.com

Using domain server:

developer.android.com is an alias for www3.l.google.com.
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has address
www3.l.google.com has IPv6 address 2404:6800:4007:800::1005
share|improve this question
It seems like a browser issue rather than OS issue. support.mozilla.org/en-US/kb/… – Ramesh Mar 27 '14 at 19:27
Is the site opening in chrome browser inside Ubuntu? – Ramesh Mar 27 '14 at 19:28
@Ramesh Not working in chrome also. – devsda Mar 27 '14 at 19:45
A bad hosts file maybe? – On a eu. Mar 27 '14 at 20:40
This appears to be a DNS resolution issue. Usually this is provided by your ISP. Is the Windows machine you are using on the same internet connection? Also please post the contents of /etc/resolv.conf. – Graeme Mar 28 '14 at 11:14
up vote 3 down vote accepted

As the output of the host command shows, this is almost certainly a DNS server issue. Looking a little more into how this is generally configured in Ubuntu, it seems the best way to change this is simply through Network Manager. Network Manager offers per connection DNS settings, so the DNS settings can be fixed for the connection causing the problem and won't affect anything else. This answer on Ask Ubuntu gives a good overview of how to do it, including screenshots.

To rehash:

  1. Right click on the network icon on your desktop and select Edit Connections. Or simple run nm-connection-editor from the command line.

  2. Select the tab for type of connection you have (wired or wireless), then the name of your connection and click Edit...

  3. Go to the IPV4 Settings tab and enter (or the IP of any other DNS server of your choosing) in the DNS Servers box.

  4. Click save and you should be done!

Alternatively, just add the line dns= to the relevant file (named after your connection) in /etc/NetworkManager/system-connections. The line should be added just after the [ipv4] line.


If you have a wired connection, there may not already be a configuration for this under Network Manager. If this is the case, just click Add, choose the connection type and do everything else as above.

It may also be that there is a setting in /etc/dhcp/dhclient.conf for a system wide DNS server (this seems to be the place for it these days). If the file contains a line that begins supersede domain-name-servers and isn't commented out (it has a # at the beginning), this may be the case. If so, you can probably just remove this line, then disconnect/reconnect and your problem will be fixed. Note the file may be under /etc/dhcp3 or /etc/dhcp4 instead of /etc/dhcp.

share|improve this answer

This looks (at least superficially) like a similar problem I had.

The content of /etc/resolv.conf is


I am told that means your machine is running some kind of nameserver service locally.

My /etc/resolv.conf pointed to my router ISP address. I am not sure what nameserver it wound up using, but whatever it was, it was flaky. So I used the package resolvconf in Debian (therefore also in Ubuntu) to add some stuff to /etc/resolvconf. Just adding text manually to /etc/resolv.conf does not work, because it gets overwritten. All I did was add the file /etc/resolvconf/resolv.conf.d/tail with the contents


And now those lines get appended automatically to /etc/resolv.conf. So that fixed the issue. Hope that helps, and if this is off base, I can delete this answer.

share|improve this answer
AFAIK the line is added by Network Manager via resolvconf. I'm not sure how changing the resolvconf configuration affects Network Manager. It may ignore resolv.conf altogether. Otherwise this is another valid way to change the DNS server globally. – Graeme Mar 30 '14 at 0:21
@Graeme your comment assumes Network Manager is being used in the poster's case. Is this a given? I don't see it explicitly mentioned. – Faheem Mitha Mar 30 '14 at 0:25
True, this is a best guess based on Ubuntu 12.04. I assume if the OP had something else installed, he would have mentioned it by now. AFAIK even KDE uses the network manager back-end. – Graeme Mar 30 '14 at 0:34
Note also that resolvconf is not on Debian by default. isc-dhcp is a dependency for Network Manager, so my thinking was that it would be a more generic approach. Although Network Manager on Ubuntu used to use dhcp3 (and possibly Network Manager can still be compiled to use this). – Graeme Mar 30 '14 at 0:51
The poster could also be using /etc/network/interfaces. However, if Ubuntu enables Network Manager by default, I agree he is probably using that. – Faheem Mitha Mar 30 '14 at 5:49

Your Answer


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.