Fix Safari Slow, Stalled Page Loads by Disabling DNS Prefetching

September 14, 2010

Mac

As we’ve previously reported, a variety of factors can cause Safari for Mac OS X to slowly load pages, open new tabs and windows, and perform other operations.

Apple has now posted a knowledge base article titled “Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found,” which lists two potential fixes for the issue.

The first echoes our previously posted fix for the issue, switching DNS servers from those generated by your ISP to those offered by OpenDNS. To do so:

  • Open System Preferences and click “Network”
  • Select your connection method (AirPort, Ethernet, etc.)
  • Enter the following items in the “DNS Server” field:  208.67.222.222, 208.67.220.220
  • Click Apply

Or you can try Google’s public DNS servers: 8.8.8.8 and 8.8.4.4.

Apple’s second fix involves disabling DNS prefetching. We previously noted that anecdotal evidence suggests that this issue is caused by a problem with Safari 5.0′s DNS prefetching mechanism, which appears to send more requests than allowed by some ISPs. This issue may also cause problems with some routers.

Apple’s instructions for disabling prefetching in Mac OS X require opening the Terminal (click the Spotlight icon–magnifying glass–in the upper-right portion of the screen and type “Terminal”) then entering the following command:

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

then quitting and restarting Safari.

Apple also recommends upgrading router firmware or switching routers, and offers instructions for re-enabling DNS prefetching if a firmware update or router switch resolves the issue.

For full instructions, including prefetching disabling instructions for Windows, and re-enabling prefetching, see the knowledge base article.

, , , , , ,

Enjoyed this Post?

Subscribe to our e-mail newsletter to receive updates, follow us on Twitter or simply recommend us to friends and colleagues!

14 Responses to “Fix Safari Slow, Stalled Page Loads by Disabling DNS Prefetching”

  1. Nanook Says:

    I just tried this, and it’s amazing. A lot of my webpages wouldn’t load the comment sections, like http://www.CBC.ca, and I would have to reload the page a couple of times. It seems to be working exceptionally well.

    Reply

  2. pb1994 Says:

    seems to help with my netgear router… faster now when using safari 5 with less stalls

    Reply

  3. Jon Says:

    This worked like a charm. Funny thing is I am already using opendns, and my ‘outdated non-robust’ router as described in the apple document is a apple airport extreme dual band on the latest firmware…

    Reply

  4. ld Says:

    The first solution worked great for me! Safari was all of a sudden slow after a rainy night in LA (the rain usually messes with our internet speed) and never returned to normal after that. Thanks!

    Reply

  5. SereneLavender Says:

    I tried using the Google DNS servers and it is working great!! FINALLY!!

    Reply

  6. Alisdair Says:

    Worked like a charm. Thankyou

    Reply

  7. Rachel Says:

    Do I delete the other DNS in prefs? Or just leave the long list?

    Reply

  8. Dave Says:

    Wow What a difference
    208.67.220.220
    208.67.220.220
    Worked wonderfully !

    Reply

  9. Eugene Says:

    Since the Macbook has been used with several different ISP’s and routers, I decided that the DNS is probably not be the problem and went straight to fix 2 (Disabling the prefetching). It’s loading everything much quicker than before! Some sites are still slow, but I’m pretty sure that it’s the site’sserver and no longer the Macbook.

    Thanks!
    Eugene

    Reply

  10. Katie Jo Says:

    Seems to work for my desktop, which as of a few weeks ago suddenly started loading super slow -and I mean SUPER slow. I don’t remember updating, but at least this helps. Thanks!

    Reply

  11. marie Says:

    Excellent! solved my problem.

    Reply

  12. MBPr Says:

    This worked for me, so far touch wood. Couldn’t believe that a brand new 2.7ghz, 768gb, 16gb Macbook Pro Retina was so slow using Safari. Hanging all the time on most things Google related. Unbelievable. Fingers crossed the fix is permanent.

    Reply

  13. http://google.com Says:

    U generated a number of terrific tips in your post, _Fix Safari Slow, Stalled Page Loads by Disabling DNS Prefetching – Apple Toolbox_.
    I will be coming back again to ur page in the near future.
    Thanks -Jimmie

    Reply

Trackbacks/Pingbacks

  1. Slow Safari? « Clark's Tech Blog - September 17, 2010

    [...] Slow Safari 5? Try disabling DNS prefetching. [...]

Leave a Reply