I am unable to visit most sites online in either firefox or chrome. I can access google docs so I am researching on windows 7 (dualboot) and rebooting into Ubuntu (recently upgraded to 16.04).

Test 0:

$ sudo /etc/init.d/dns-clean

(nothing happened)

Test 1:

$ dig microsoft.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> microsoft.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2944
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
;microsoft.com.         IN  A

microsoft.com.      896 IN  A
microsoft.com.      896 IN  A
microsoft.com.      896 IN  A
microsoft.com.      896 IN  A
microsoft.com.      896 IN  A

;; Query time: 102 msec
;; SERVER: 2001:558:feed::1#53(2001:558:feed::1)
;; WHEN: Tue Aug 29 14:54:43 EDT 2017
;; MSG SIZE  rcvd: 122

Test 2:

$ ping reddit.com
connect: Network is unreachable

Test 3:

$ less /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Test 4:

$ less /etc/NetworkManager/NetworkManager.conf 



Test 5: Chrome

This site can’t be reached
www.reddit.com’s server DNS address could not be found.


Test 6: Firefox

Server not found
Firefox can’t find the server at www.reddit.com.
Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Edit: Almost forgot, this seems to have started after I tried installing PlayOnLinux the other day. I uninstalled it but the problems persist.

Any thoughts?

Re: possible duplicate question : dns_probe_finished_nxdomain error caused by Ubuntu dns_probe_finished_nxdomain error caused by Ubuntu I clearly state in my question that the solution posed in the other thread of clearing the dns cache does not resolve my issue.

  • askubuntu.com/questions/844785/… poses a similar issue, but the resolution proposed there does not fix the issue. My attempt to use the solution from that thread is listed as test 0 in my question, and it did not resolve my issue.
    – Nick S
    Aug 29, 2017 at 21:49
  • nekketsuuu I think the bug you linked is related, but it did not provide a solution for me. I actually moved over the weekend and now am able to use a wired connection and that is working fine, so the problem is with wireless only and I'm not going to spend any more time on it for now. If anyone else knows exactly what's going on and wants me to test a fix I'd be happy to though.
    – Nick S
    Sep 5, 2017 at 15:56

6 Answers 6



Step 1. Open terminal and add below command

sudo nano /etc/dhcp/dhclient.conf

Step 2. Now add below line in file

supersede domain-name-servers;

Now, save file

Step 3. Restart the network

sudo service network-manager restart


sudo systemctl restart NetworkManager.service

Refresh your page and done.🙂🙂🙂

  • 6
    Really solved (!)... What the possible cause? A trojan? An UBUNTU upgrade? Jan 24, 2018 at 15:42
  • 1
    Nope, I'm unlucky one
    – vladkras
    Sep 20, 2018 at 11:08
  • 4
    This solved the issue for me but it would be nice to have this solution explained... what supersede domain-name-servers; does? May 23, 2019 at 8:38
  • 2
    Does not work for me. Kubuntu 20.04 going over a Netgear range extender. Normal Router has no problems to begin with. May 28, 2020 at 0:39
  • 2
    not working for ubuntu 20.04
    – Mostafa90
    Jul 8, 2020 at 13:35

For me (Ubuntu 20.04), the only working solution was to add DNS servers of Google and OpenDNS.

I did it at computer level:

sudo vim /etc/resolv.conf

And added these lines (before other nameservers):


This can be also done at router level (for all devices):

  • Go to router management -> DNS -> Set primary DNS to and secondary DNS to

See https://linuxhint.com/opendns-vs-googledns/ for more info about choosing the DNS nameservers (and checking which server is faster in your location).

  • It works! For some reason I had only: nameserver
    – jobima
    Jun 16, 2021 at 9:40
  • 2
    Well: The file is dynamic (generated by systemd-resolved) so you loose your change! For some reason I only have: nameserver
    – jobima
    Jun 16, 2021 at 9:48
  • 1
    for ubuntu 20.04 it's working fine. Thanks @Filip Kunbicz Oct 1, 2021 at 5:39
  • 1
    Working for ubuntu 22.04.
    – southpaw93
    May 16 at 6:49

For me it was flushing the dns cache that way:

sudo systemd-resolve --flush-caches

You can then check the statistics in order to make sure that your cache size is now zero.

sudo systemd-resolve --statistics

Restarting the router solved this problem for me.

  • 1
    I know the asker said they did not experience that problem on windows so you might assume the problem can only be solved on the ubuntu system, but I only experienced the problem on one browser and not on another, and still restarting the router solved it.
    – talz
    Jul 9, 2021 at 12:45

I am having the same issue. I have tried everything from all answers and none of these work for me. I am working right now on something which requires a lot of DNS updates and this completely blocks my work all the time. I have to go and look at the site on my phone / ipad to see if it is really working.

Is there any other possible solution ?


In my case I solved it from TpLink router -admin panel settings.

Go to Advance > Network > LAN settings, and change:

Primary DNS :

Secondary DNS :

Hit save then restart your router, wait to see your internet indicator lights up on your router and then reload your pages to check.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .