Ubuntu DNS Error Chrome: DNS_PROBE_FINISHED_NXDOMAIN, Firefox similar

64,973

Solution 1

Resolved: DNS_PROBE_FINISHED_NXDOMAIN in Linux


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 8.8.8.8;

Now, save file

Step 3. Restart the network

sudo service network-manager restart

or

sudo systemctl restart NetworkManager.service

Refresh your page and done.🙂🙂🙂

Solution 2

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

Solution 3

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):

nameserver 8.8.8.8
nameserver 208.67.222.222
nameserver 4.2.2.2

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

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

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

Solution 4

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 ?

Solution 5

Restarting the router solved this problem for me.

Share:
64,973

Related videos on Youtube

Nick S
Author by

Nick S

Updated on September 18, 2022

Comments

  • Nick S
    Nick S over 1 year

    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
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 512
    ;; QUESTION SECTION:
    ;microsoft.com.         IN  A
    
    ;; ANSWER SECTION:
    microsoft.com.      896 IN  A   104.43.195.251
    microsoft.com.      896 IN  A   23.100.122.175
    microsoft.com.      896 IN  A   23.96.52.53
    microsoft.com.      896 IN  A   191.239.213.197
    microsoft.com.      896 IN  A   104.40.211.35
    
    ;; 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 
    [main]
    plugins=ifupdown,keyfile,ofono
    /#dns=dnsmasq
    
    no-auto-default=D4:BE:D9:A6:2E:C1,
    
    [ifupdown]
    managed=false
    

    Test 5: Chrome

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

    DNS_PROBE_FINISHED_NXDOMAIN
    

    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.

  • Peter Krauss
    Peter Krauss over 6 years
    Really solved (!)... What the possible cause? A trojan? An UBUNTU upgrade?
  • vladkras
    vladkras over 5 years
    Nope, I'm unlucky one
  • Andrea Vacondio
    Andrea Vacondio almost 5 years
    This solved the issue for me but it would be nice to have this solution explained... what supersede domain-name-servers 8.8.8.8; does?
  • Mr.P
    Mr.P over 4 years
    solved here too :) @AndreaVacondio it sets your DNS to Google's public DNS
  • lo tolmencre
    lo tolmencre almost 4 years
    Does not work for me. Kubuntu 20.04 going over a Netgear range extender. Normal Router has no problems to begin with.
  • Nick S
    Nick S almost 4 years
    Accepted this answer as it looks like others were helped by it.
  • Mostafa790
    Mostafa790 almost 4 years
    not working for ubuntu 20.04
  • Rahul
    Rahul over 3 years
    Works like a charm !! anyone please explain...
  • jobima
    jobima almost 3 years
    It works! For some reason I had only: nameserver 127.0.0.53
  • jobima
    jobima almost 3 years
    Well: The file is dynamic (generated by systemd-resolved) so you loose your change! For some reason I only have: nameserver 127.0.0.53
  • talz
    talz almost 3 years
    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.
  • Tejas
    Tejas over 2 years
    for ubuntu 20.04 it's working fine. Thanks @Filip Kunbicz
  • Tejas
    Tejas over 2 years
    for ubuntu 20.04 run below command ` sudo vim /etc/resolv.conf ` If above does not work run ` sudo nano /etc/resolv.conf ` Add below name servers to file and refresh the page will work fine. ` nameserver 8.8.8.8 nameserver 208.67.222.222 nameserver 4.2.2.2 `