MacOS – Can’t access specific websites with Macbook Air (10.7.5 Lion)

dnsinternetmacosNetworksafari

This has really baffled me:

While my internet connection works, I can't access specific websites with Safari (or any other browser for that matter). I don't get a 404 page; Just an error message that Safari (or Chrome or Firefox) can't access the server at some.location.com.

For example, I can't access www.apple.com or www.reddit.com while some other sites I can access come out "broken" (e.g. in imgur or Facebook I get no images, I can't login etc.) I can ping them, nslookup works, traceroute fails. Other websites seem to have no problem at all (e.g. youtube, this one etc.). It also works ok for the guest account, but not for mine.

Things I've tried so far

  • clearing the browsers' cache
  • flushing the DNS cache
  • adding/removing Google DNS servers
  • restarting the laptop and the wireless router
  • disabling the firewall
  • checking the content of /etc/hosts(which only contains localhost entries)
  • checked for user restrictions (which are not set)
  • killing/restarting mDNSResponder

and I still have no idea why this weird behavior started so suddenly. I'm not using any proxies like Little Snitch, and a quick search for malware came up clean.

Best Answer

For such problem one more option is there where you can check your DNS settings. To fix that problem, open the Network pane of System Preferences and select your network connection in the list on the left. Click Advanced followed by DNS.

In the DNS Servers field, you should see one or more IP addresses. If those addresses are enabled (black, as opposed to gray), select each one in turn and click the minus-sign (-) button. Then, regardless of whether there are already addresses there in gray, click the plus-sign (+) button and enter 208.67.222.220; repeat with 208.67.222.222.

Some more Ipv4 and Ipv6 addresses are given at computerknow.org, you may see there.