By far the easiest way to fix the hosts file is to restore it from a Time Machine (or other) backup that predates the modification. If that's not possible, then do as below. .
Certain pages such as Facebook, Yahoo, and google maps or Gmail do not load correctly. Social networking pages just give me a list of my options on the side. Otherwise it is a plain white display. This is not a Safari problem as I have tried Firefox and Google Chrome. Please help. I manage my band and it has become difficult since i can't access social networking or emails
I carried out the actions in terminal and it has not fixed my problem. Thank you for responding and please stay with me. Do you have any other suggestions? Some more information is that this only happens to my accounts. But I do not believe its my account being hacked because I only get problems when signing in on my macbook.
I've acquired this same problem, and just ran your tests. My sit may be dif, however.
The only two sites which regularly display only text lists of links and some form boxes, question marks for images, contain no actual content are APPLE and Facebook. Often, however, when I first type in a URL it will briefly so appear and then be replaced by normal appearance in less than a second or so. This has happend at YouTube, and seems more common (perhaps exclusive) to sign on pages - regular Apple pages appear.
My prob was aquired some two weeks after most recent update to Lion, no other mods to system or new aps since.
I additionally have continual certificate expired notices on any https site. When I review online histories of other like reported problems the 'cures' suggested tend to parallel those found for the display problem. All such cures I've encountered either fail, do not apply, or cannot be attempted. These are the ones that failed and related findings:
clear/disable cache/cookies; virus check; repair permissions/disk verification using Disk Utility; try other browsers; address proxy, router IP address, port use, system dynamic address; disable browser extensions/options; delete keychain for site; install new browser
try various fixes to certificates: few suggested cures found online seem to apply to Mac OS X, those that do reference a couple of URLs that Safari cannot find server for either one. There were also some references to a fix that is way too technical to understand and vague instructions on downloading a new certificate, and regarding 2048 bit certificates vs. smaller ones. I only see two certificates (equifac, UTN ) UTN is 1024 bits. Suspect that would at least account for the certificate issues.
try direct connection to router: can't on this machine, but using a laptop it works correctly. However, it asks me a question at Facebook I've never before seen "Register this browser?" I declined in fear to do so will cause the problem - as in the back of my mind is the notion Facebook is engaging in denial of service based on same; I am very vocal about FB spying and other 'sins,' and there have been similar 'punishments' for same to myself and other activists in the past (e.g., temporary shutdowns). Additionally, that computer cannot connect at all wirelessly, though it worked fine beforehand ("error in connecting"). It is an older OS. I finally did register and there seems to be no impact save ending the message.
YOUR TESTS: Same results both tests - still does not disply.
LION has been nothing but problems for me (dozens of things don't work right or as well as the old OS) but I don't dare downgrade as I'll loose new aps, and I've already clobbered the old aps by upgrade. No backup and all install disks were lost in relocation, along with other computer items and things from the computer room. So I don't dare wipe the drive at this point. No time machine. Image restore has not helped, so the last image was probably made right after the problem started. I've not tried to reinstall because I have no disk, it was from the Apple Store as a download, not sure the best way to proceed to try that, and fear it will make things worse.
Note: I'm not quite a dummy - my first Apple was serial number 48 Apple II bought from Steve Jobs, who made me Dealer number 16 some two years later, had my own chain of stores and was certified Apple Tech. Managed a mega computer store for a number of years after that, and we have a currently certified Apple Tech in the family, now, who has a repair shop with some major clients. Can't figure this out between us. It is especially frustrating to see that the problem is so widely experienced and no one has stepped up to find the actual cause... odd that so many different cures will fix it for various persons, but not all.