Slow DNS Resolution
Solution 1
Try setting your dns-Server manually. Ubuntu sometimes has problems with Routers that provide this kind of service (like DNS-Server=192.168.1.1).
Rightclick Network-Manager -> Edit connections -> eth0 (or create a new Connection if you use multiple locations) -> edit -> IPV4 Settings -> Automatic(DHCP) Adresses only + Add your DNS-Servers (separated by ,).
You can find your DNS-Servers by accessing the Web-Interface of your router (might be something like 192.168.1.1) in your Webbrowser.
I have to do this since 10.04 on every machine!
Solution 2
The most common cause of page loading slowdown in browsers is due to ipv6, which comes enabled by default in Ubuntu. When it is enabled, it needs to timeout before ipv4 kicks in, which causes the delay when ipv6 is not supported by your network. There is a simple test that you can perform to verify if this is the issue - try to access a web page using the IP address. For example, try to open the following address:
It should take you to Stack Overflow site. If the address responds quickly, then most likely that you have a DNS resolution issue due to ipv6.
You can disable ipv6 in Firefox, by setting the network.dns.disableIPv6 preference to true.
- Type about:config in the address bar, press Enter.
- Find network.dns.disableIPv6 in the list.
- Right-click -> Toggle.
- Restart Firefox and try again.
You can also disable ipv6 on the system level. To do that, open the file /etc/default/grub with an editor:
gksudo gedit /etc/default/grub
Then change the following line:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
With the following line:
GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”
Then update grub:
sudo update-grub
You can also try to increase Firefox's DNS cache size and reduce DNS caching expiration, so the browser doesn't query the DNS server so frequently.
- Type about:config in Firefox address bar to open the advanced preferences
- Type network.dnsCache in the filter field and hit enter
- Right-click on the empty results and select "New >> Integer"
- Set the preference name as network.dnsCacheEntries and set value as 1000
- Right-click on the empty results and select "New >> Integer"
- Set the preference name as network.dnsCacheExpiration and set value as 7200
Solution 3
fix:
On an upgrade to Precise, bind was not correctly reconfigured, resulting in a failure to resolve domain names.
Solution was to dpkg-reconfigure the bind9 package, and turn off resolvconf integration which was left on on upgrade.
quoted form here - [Bind is not configured correctly on upgrade (resolvconf integration)] - https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/996088
Solution 4
In my case , some VPN software had written out a /etc/resolv.conf file that I did not know about. So I was resolving DNS to some undesired location.
Ubuntu desktop does not need that file, so either delete it or edit it to something like:
$ more /etc/resolv.conf
#Google's openDNS
nameserver 8.8.8.8
nameserver 8.8.4.4
hth someone.
Related videos on Youtube
Jorge Castro
Updated on September 17, 2022Comments
-
Jorge Castro over 1 year
After a clean install of 10.10 I'm finding DNS resolution takes quite a long time. Hitting any url takes a good few seconds (10 - 30) before the site is displayed. I'm thinking this is a DNS resolution issue due to the 'waiting' or 'looking up' text being displayed in Firefox and Chrome.
I do not get this issue with Slackware Linux or Windows 7 so it is not network or DNS server specific issue. It's something on the client side.
Looking around on Google I see there are a few other people with this issue. The ones that have reported a workaround by switching to openDNS are disabling IPV6 or dealing with another issue.
Any help would be appreciated.
My network card is wired: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express
Thanks
-
Admin over 13 yearsDo you have this with all domains (e.g. both domains with & without IPv6 addresses? And do you also have it when you use
dig
orhost
? -
Admin over 13 yearsThe contents of your
/etc/resolv.conf
might be helpful in answering this. Since we probably can't reach your nameservers, you might want to trydig @nameserver-ip askubuntu.com
and see if that responds quickly.
-
-
Admin over 13 yearsI disabled IPv6 and still have the same issue. Loading the IP address in the browser was still a little slow. Firefox hung on "waiting for stackoverflow.com" for a good few seconds (~7).
-
lovinglinux over 13 yearsHave you tried to test the machine with wired connection?
-
Barry over 13 yearsThis worked for me. I used the top IP address in /etc/resolv.conf. Any idea what would cause this issue?
-
JanC over 13 yearsCan you point me to the bug report about this? It's the first thing I hear about it...
-
sBlatt over 13 yearsI read about this when I installed Ubuntu 10.4, that's over 6 Months ago, I can't remember when, sorry
-
user5071535 over 8 yearsThis fixed my slow DNS resolution on 14.04