www.facebook.com not loading on my macbook, mountain lion
This is to share a solution to a problem that may affect Macbook users using Mountain Lion OS X and having problems loading www.facebook.com.
Two days ago, I suddenly found that I couldn't load www.facebook.com and ONLY www.facebook.com. I would get a timeout error trying to reach Facebook. Attempts to reach facebook.com (without the www) won't work since facebook.com redirects to www.facebook.com. All other sites worked fine. I have a Macbook Pro, using Mountain Lion OSX 10.8.
I tried every solution I could find on the net:
- Cleared browser caches
- Flushed the DNS on my MAC (you have to use a new command line: "sudo killall -HUP mDNSResponder")
- Disabled IPv6
- Reduced MTU down to 1300 manually
- Attempted to go to enable SSL via https://www.facebook.com.
- Attempted to change DNS servers, using Google's Open DNS servers (126.96.36.199)
Other symptoms included, not working on multiple browsers (indicated computer or your network problem, not just browser problem), works on other computers on the same network and same problem on different wi-fi network (indicates a problem with my computer).
Finally, I found the solution: For some reason, www.facebook.com and https://www.facebook.com was added to my HOSTS file with an IP address that wasn't resolving. The HOSTS file was telling my computer that www.facebook.com was located at this specific IP address, bypassing any available DNS servers. As a result, my computer was trying to find www.facebook.com at an IP address that wasn't working, ALWAYS.
Here's what you need to do to fix this:
- Start Terminal
- Type "sudo nano /private/etc/hosts"
- Remove any lines with facebook in it. (Mine had two lines for www.facebook.com and http://www.facebook.com Don't see any? Then this unfortunately is probably not the reason you can't use Facebook)
- When finished, hit Control+O followed by ENTER/RETURN to save changes to /private/etc/hosts, then hit Control+X to exit out of nano
- Exit Terminal
- Finally, restart your computer to let the changes take place.
Your computer should now load www.facebook.com properly! Let me know if that helped, and if anyone knows why these lines suddenly appeared in the HOSTS file, post it here.