APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Slow Firefox DNS Mac OS X Leopard

© May 2019 Anthony Lawrence

Update (see comments for details): dscacheutil -flushcache at a terminal window fixes this for me.

I have been experiencing some intermittent and very strange problems with Firefox and Google. These began right after I upgraded to Mac OS X Leopard, and I'm not even sure where to start debugging this. The symptoms are simple enough: Firefox suddenly cannot resolve any Google.com address after OS X awakes from a nap.

The first few times this happened I thought it was just coincidence - maybe Google was down or more reasonably some Verizon router was confused. But it didn't make sense that this would happen after waking from sleep, so I blamed Verizon or my router, because rebooting that would fix the problem.

Realize that while Firefox is unable to find any google.com site (gmail, adsense, analytics, whatever), any other browsing seems to be fine. Of course I can't say that absolutely, because there could be other domains thar will not resolve, but so far I haven't noticed any: just Google.

Here's where we move into "this makes no sense!" land. When Firefox refuses to find Google, all I have to do is switch over to Safari and load any Google site. When I go back to Firefox and click "Try again" or just click the bue Reload button, Firefox will now know where Google lives.

Hmmm.. so my thinking is that this has to be a local issue - either my Verizon router or the Leopard resolver code. Obviously the resolver code is more suspicious as the problems started after upgrading to Leopard, but it does seem odd that resetting the router has fixed this.

But the "fix" is just black magic at this point. I can't easily reproduce the symptoms: it doesn't happen every time the Mac snoozes. Therefore I don't get a lot of chances to see what actions will or will not fix it - it may be days before it happens again.

If it is resolver code, the next question is what is Firefox asking that Safari is not? It could be something like a Truncated DNS issue, but "mail.google.com" etc. don't give truncated dns info. Yet it would seem to be something like that, because Safari gets an answer but Firefox doesn't.. until Safari fills the resolver cache.

If you are totally confused by DNS, I recommend Take Control of Your Domain Names, a $10.00 PDF E-Book that demystifies all of this.

So, my theory so far is this: after sleeping, sometimes google.com is not in the resolver cache and Firefox is not asking it to go look farther. Safari apparently does, and that fills the cache, so now Firefox works. Good theory, but how do I test that?

There's a Mozilla page that explains www.mozilla.org/docs/netlib/dns.html (link dead, sorry) their DNS strategy that might help figure this out.. and I also notice that there is mention of a network.dnsCacheExpiration key that can be set - though I don't see that in my "about:config".

My next thought was to see if anyone else had ever observed similar symptoms, and it turns out that yes, they have: this newsgroup post reports very similar behaviour, and interestingly enough that person solved it by implementing a local caching DNS.

This page suggests that jw.n--tree.net/blog/dev/dns-lookup-delay-in-firefox IPv6 support in Firefox causes slow lookups (link dead, sorry) and gives the solution of setting :

network.dns.disableIPv6   user set   boolean   true

and another site includes posts from people who with have also experienced this problem. Firefox itself suggests that disabling IPv6 is a likely fix: support.mozilla.com/kb/Firefox+cannot+load+web+sites+but+other+programs+can (link dead, sorry) Firefox cannot load web sites but other programs can

But why Google and not other sites? I do notice that Google uses "Pragma: no-cache" in its response headers, but doesn't set a page expiration date. Should that cause Firefox to behave differently? If it is IPv6, why did I first see it with Leopard?

Well, maybe because IPv6 is now automatic in Leopard. You can shut it off

  System Preferences->Network->Advanced->TCP/IP tab-> Configure IPv6

This page says that having it on may cause other Leopard Networking problems.

See OS X wake from sleep network problems also.

So, I've set IPv6 to "off" for now in both my wired and wireless connections, and we'll see if the problem goes away.

By the way, the Mac OS X man page for "dig" warns:

       The dig command does not use the host name and address resolution or
       the DNS query routing mechanisms used by other processes running on Mac
       OS X.  The results of name or address queries printed by dig may differ
       from those found by other processes that use the Mac OS X native name
       and address resolution mechanisms.  The results of DNS queries may also
       differ from queries that use the Mac OS X DNS routing library.

That doesn't help finding weird resolution issues, does it?

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Slow Firefox DNS Mac OS X Leopard


Inexpensive and informative Apple related e-books:

Sierra: A Take Control Crash Course

Are Your Bits Flipped?

Take Control of iCloud

Digital Sharing Crash Course

iOS 8: A Take Control Crash Course

More Articles by © Anthony Lawrence

Tue Dec 11 11:57:57 2007: 3317   TonyLawrence

Well, shutting off ipv6 didn't help...

Mon Dec 17 20:17:56 2007: 3339   anonymous

You aren't the only one experiencing this problem. I have the same issue with both firefox and thunderbird. I frequently get "host not found" errors, but can resolve via nslookup in terminal and get through fine in safari.

Sun Jan 6 01:38:46 2008: 3401   anonymous

I seem to have the same problem when I get out off a VPN connection. It feels like Firefox caches some old route or path to a name server that is no longer available after I disconnect from the VPN and browsing becomes very painful until I restart it

Sun Jan 6 02:51:26 2008: 3402   TonyLawrence

Oddly, it's been a while now since I have had this happen.. I wonder if some patch or Firefox upgrade changed something relevant.

Tue Jan 8 12:18:09 2008: 3415   louisr

I am having a similar problem with both Safari and FireFox after upgrading to Leopard. The error message in Safari is 'Safari can't find the server". I have eliminated everything except Leopard. Does anyone have any work arounds or fixes?


Tue Jan 8 13:19:14 2008: 3417   TonyLawrence

Hmm.. Safari has always been what DOES work for me. Yours sounds like a full DNS problem - can you ping from terminal when you see this? What fixes it?

Wed Jan 9 00:17:27 2008: 3420   anonymous

ping works fine; to make it even more interesting my work DELL notebook running XP and using firefox is not having this problem

i tried the usual stuff of clearing caches, resetting everything, etcetera

my only thoughts now is that my linksys wireless router is fairly old (about 4 years) and perhaps a now router connected to my cable modem would help; perhaps a good time to go with the Apple product


Wed Jan 9 00:20:02 2008: 3421   TonyLawrence

If the Dell is wireless also, then the router would seem to be working correctly..

Did you try disabling IP6?

Wed Jan 9 04:34:13 2008: 3423   anonymous

Yes the DELL is wireless as well. I thought I tried disabling IP6 but I was trying so many things I will try that again just to be sure. Interesting that I tried the MAC on a completely different wireless network and it worked fine. That network had a one year old linksys wireless router as compared to my four year old linksys box. Besides some weird incompatibilities between Leopard and my old router I don't know what else it could be. I didn't have this problem before upgrading the OS.

Wed Jan 9 09:01:25 2008: 3425   TonyLawrence

Well, I guess a new Linksys is cheap enough..

But Leopard does seem to be at fault, doesn't it?

Wed Jan 9 10:02:17 2008: 3426   anonymous

It appears that way as Leopard perhaps is not backward compatible with older routers/older wireless protocals. I will do the next post after trying to turn off IP6 and see if that helps and I also will try an 18 month Airport Express that I have borrowed.

Wed Jan 9 15:20:03 2008: 3430   anonymous

Turning off IP6 makes no difference. Unfortunately I can't get the airport express to work as I need to clone the MAC address due to limitations with my current internet provider.

I don't think i can clone a MAC address on an airport express. If anyone knows how let me know. Looks like I need to go get a new LinkSys router.

Thu Jan 10 17:41:21 2008: 3433   anonymous

I have had slow, crawl, and no response on my leopard too. One thing I did do to fix this at times is kill all the processes related to VMWare Fusion network applications used to bridge windows networking. Funny, but killing the DNS for VMWare often fixes the issue, but not always. Things work for a while after reboot too, but after a few sleep wake cycles I need to kill the VMWare applications again or reboot. I have not seen any web reference to such problems.

Fri Jan 11 00:59:30 2008: 3435   anonymous

I can't find the link now, but yesterday read something that the problem is not with Leopard as Leopard is just using the latest protocols and if you have an older router that Leopard exposes problems with it. The whole thing still does not make a lot of sens and this weekend I will test a new LinkSys router and see if that fixes it.

Sat Jan 12 03:04:01 2008: 3439   anonymous

The problem is fixed. Turns out it was some bad settings stuck in the router. For other people having similar issues you may want to reset your router to factory settings and then reenter your configuration.

Sun Jan 20 12:54:41 2008: 3500   TonyLawrence

This morning neither Firefox nor Safari could reach gmail - though either could reach any other Google site..

Oddly, IE (in Parallels) had no problem reaching gmail - so where is it getting its DNS from? Obviously from Leopard since it isn't set to talk to the firewall router directly..

Resetting the router fixed it.. baffling.

Thu Jan 31 09:00:32 2008: 3553   kt

I am also annoyed by slow DNS and slow firefox response.

Today, I found the article about L-root servers IP Address change of DNS by chance.


I completely forgot changing it, in spite it is my task..
And I change it a little while ago.

I don't know it's the factor of trouble or not, but I am now browsing smoothly.
This is just FYI.

Thu Jan 31 13:41:53 2008: 3554   TonyLawrence

Well, few of us are querying root servers, so I don't think that's it for us.

Fri Feb 1 06:07:11 2008: 3558   Jonathan

I also have been having the problem as described (though I've had it on more than just google); where Firefox fails to lookup a DNS entry and opening Safari to the same server worked.

In addition, I've tried pinging after Firefox fails to locate the server and ping fails right away in the lookup just like Firefox until I start up Safari or perform the nslookup step like you recommended. It's interesting to me that ping suffers the same problem as Firefox.

Fri Feb 1 13:08:50 2008: 3559   TonyLawrence

That's weird: ping shouldn't fail if Safari works..

Fri Feb 1 14:33:29 2008: 3561   TonyLawrence

That sounds like it's worth a try, but why have it run regularly if it's your personal machine? Just run it from the command line with sudo if needed,

But I don't read his problem as being the same as this - he says DNS is not working at all.. in what we're talking about here, it is working - just not for Google.

But absolutely - I'll try it next time I see this.

Fri Feb 1 16:54:49 2008: 3563   Jonathan

I'm sorry if I gave the wrong impression; it's not full DNS that fails to work. Just for certain sites. Other sites I can still pull up just fine in Firefox. But, refresh on things like my personal site fail as well as gmail, claiming they can't find the server. And it fails on the refresh right away (doesn't even seem to be taking time to access any servers waiting for an answer).

Next time it happens, try ping to see if it too fails until you perform the nslookup or open Safari. My guess was that Firefox was using the same code as ping for lookup, while Safari did a little extra to tell Leopard to really go look it up instead of using cache.

Sun Feb 3 00:11:22 2008: 3584   TonyLawrence

Just had it:

Did sudo dscacheutil -flushcache

and it worked.. so far so good!

Thu Feb 7 09:56:12 2008: 3598   TonyLawrence

No ideas yet, but the flush definitely fixes it - I do it manually when I have the problem and that's plainly the cure.

Fri Feb 8 06:49:54 2008: 3601   WadeM

At a mate's place I've been getting this problem, but on the same MacBook, using the same version of AirPort (V6.3), at my place it doesn't happen. It's a really interesting/obscure problem.

I have a feeling it has something to do with the router behind the airport.



Fri Feb 8 11:51:01 2008: 3604   WadeM

I've been playing a bit more with this today trying to work out exactly why the issue was occurring. I figured out manually setting the DNS would fix the issue, but wasn't happy with the workaround without knowing why.

I figured out and it was confirmed by Jungle Disk, that it's to do with the way Leopard handles the DNS SRV record. They changed the sequence of requests in Leopard's libcurl getaddrinfo().

My testing was done using "dig _xmpp-client._tcp.gmail.com srv" and then adding/removing DNS servers (using @server) to confirm it was the srv record.

The reason it doesn't happen to me at home is my route passes through the DHCP info including DNS server, at my mate's place the DHCP info is provided by the Airport.

More details below from jungledisk.com

blog.jungledisk.com/2007/10/31/leopard-dns-issues-and-work-around/ (link dead, sorry)



Sun Feb 17 18:47:59 2008: 3660   gavin

I was having the same issue... This worked for me (link)
check the 3rd post for how to...

My stats...
verizon fios MI424WR router

Entering DNS settings in the Verizon MI424WR router to opt out of DNS Assistance @

hope this helps someone!

Sun Feb 17 18:59:12 2008: 3661   TonyLawrence

That's an interesting thread.. It doesn't sound like the same symptoms as this. Just the same, it might work.. I'll try it next time this acts up.

Wed Mar 5 22:10:44 2008: 3784   banonymous

I have been having a similar issue. I am testing muni-wifi in minneapolis. Every couple of hours some interference knocks my wireless modem off line.

When I am first knocked off-line all of a sudden I end up with Firefox creating a url that is a combo of the ip address of my modem, and the domain, like Needless to say, when the modem comes back up, DNS servers have a hard time finding the site, then I go on a trial and error hunt, deleting caches, restarting firefox, restarting the modem, restaring my firewall/router... your terminal command seems to have done the trick!

Mon Mar 24 03:10:38 2008: 3880   ChuckNicholas

This has to be a leopard problem! I have the same problem with ALL my browsers safari included. It bounces between "can't find" and "no internet connection". Apple needs to fire some QA people - this is beta software. I also turned off IP6 to no avail. I am hardwaired to a evdo router with several macs and pc's on the subnet. All others but leopard work fine.
nslookup finds everything as does ping when it goes through. I am reloading original
install disks to find out when the problem started.

Mon Mar 24 03:35:04 2008: 3881   ChuckNicholas

I forgot to mention that one of the macs on my subnet is a powerbook g4 with exactly the
same version/update level as my intel mac and I DO NOT have the problem with it.

Mon Mar 24 10:44:12 2008: 3882   TonyLawrence

I haven't seen any problem in some time now.. very strange stuff.

Fri Aug 29 10:49:47 2008: 4515   vincent

Thanks for all the info guys+galz! After trying all of this and more, i set my IP address manually and punched in the opendns dns resolvers. This is the one that worked for me.
I had to set a manual ip adress, dhcp would provide me with the router 'dns' which just doesn't play nice with my mac.

Thu Sep 4 21:05:56 2008: 4521   thomas

I had the same problem both in Safari and Firefox. Google pages often wouldn't load and Google Maps wasn't able to display anything.

The problem was the firewall in my router that was detecting a TCP SYN DOS Attack. Adjusting the security level from high to medium completely solved the problem. Try adjusting these settings in your router, it worked for me.

Tue Apr 27 09:30:56 2010: 8481   Marcus


I upgraded from Firefox 3.05 to 3.6.3 and it seems to be working now. We'll see how long it lasts.

Tue Jun 8 13:49:43 2010: 8671   Bexstar


Tonight i have seen simlar issue with Macbook Pro 10.4.11 with Google loading slowly both on Safari and Firefox. Other sites and email were ok. I also saw this problem ONLY occur via the airport card, but does not occur on ethernet.

I noted in Network Utility that there were send errors and receive errors on the airport card not the Ethernet.

There is a MacBook with Leopard on the same network that works fine both on ethernet and airport.
This would suggest that it was not the router or dns causing the error.

The firmware of the airport card was
I performed a permissions fix and a disc fix, Teachtool pro, and also a fresh system install. None of these seemed to make a difference.

Any ideas would be great. and I hope this information helps

Mon Jun 28 00:25:01 2010: 8750   gellflind


I think leaving IP4 on and turning off IP6, and adding a global DNS has seemed to resolve the issue

Sun Sep 12 06:14:25 2010: 8970   anonymous


I had a similar problem. I called technical assistance of my ISP and they told me that macs handle dns differently and usually have issues with routers. So what they recommended was to go to System Preferences => Network => Advanced => click on DNS tab. and put the numer that your ISP gives you, directly. That fixed it. Now I surf the web like before. Hope this helps

Check (link)

Wed Oct 20 01:42:08 2010: 9048   anonymous


I eventually fixed by adding a global DNS server

Wed May 9 03:29:05 2012: 10935   ElizabethA


THANK YOU! My Macs (but not my husband's PC) have been excruciatingly slow for the past three days. I hadn't changed anything, but suddenly I was getting server time outs left and right. I'm guessing a recent update changed something (whether it was FF or my Macs, who knows?). Turning off IPv6 immediately resolved the issue.

I'm so grateful, considering it's been 3 days of veeery slow browsing trying to find a solution!


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

I just had to take the hypertext idea and connect it to the TCP and DNS ideas and — ta-da!— the World Wide Web. ((Tim Berners-Lee)

Linux posts

Troubleshooting posts

This post tagged:





Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode