Search

What to do when Safari fails to load web pages

If you've ever run into an issue with Safari where it stalls and never loads a web page, yet other browsers work okay, then this just might be the answer to your dreams.
 
Since Safari tries to load a page and then immediately fails, and you've verified you do have Internet access with another browser like Firefox, it's safe to assume there's a DNS issue (if DNS breaks, you simply can't find web pages by their name). Specifically it's a switch for something called DNS prefetching.
 
I have personally seen this issue under OS X Mavericks 10.9.5, but it's been a known problem since at least Safari 5.01 under OS X 10.7 Lion. DNS prefetching is enabled by default, and on some machines, with some routers, it can break Safari completely. Disabling prefetching isn't something you can do in Safari's preferences, but you can still tell OS X.
 
There's one command that needs to be run in the Terminal. You can find Terminal in Applications/Utilities. Just copy the command below, then run Terminal, and at the prompt, paste the command:
 
defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false
 
Now press Return. After a pause it will return to a blank prompt. Quit Terminal, and then make sure to quit Safari and re-run it so the command takes effect. The result is like night and day - suddenly Safari can become the fastest browser you have.
 
If the issue is happening to you under Windows, Apple has a support article with the corresponding commands to enter into the Command Prompt. It's two slightly different commands, one for 64-bit versions of Windows and another for 32-bit:
 
 
 
Happy Mac'ing
 
Paul K.
The Mac Doc

$50p/h

Paul K.

The Mac Doc - Apple Macintosh Tutor for all ages

50+ hours
if (isMyPost) { }