Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Webpages will not display correctly

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 emailsUser uploaded file

MacBook Pro

Posted on Jan 29, 2013 9:17 PM

Reply
Question marked as Best reply

Posted on Jan 30, 2013 5:26 AM

You, or someone using your computer, may have hacked the system to block certain servers. The file modified is /etc/hosts.


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. Please read this whole message before doing anything.


Back up all data.



If you have more than one user account, you must be logged in as an administrator to carry out these instructions.


Triple-click anywhere in the line below to select it:

open /etc/hosts

Copy the selected text to the Clipboard (command-C).

Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.



Paste (command-V) into the Terminal window. A TextEdit window should open. At the top of the window, you should see something like this:


##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost


Below that, you may see some other lines. There should be nothing before the first line above. Make sure you scroll all the way to the bottom of the document. In OS X 10.7 or later, scroll bars are hidden by default until you actually start scrolling, so you may not realize that you’re not seeing the whole document.


If the contents of the TextEdit window are as described, close it, then enter the following command in the Terminal window in the same way as before:


sed '/lo0/q' !$ > Desktop/hosts


You should now have a file named "hosts" on your Desktop. Double-click the file to open it in TextEdit, and verify that it has only the contents shown above, with any extra lines removed. If so, close the window without making any changes.


Next, go back to the Terminal window and enter one final command, again without typing:


sudo sh -c 'cat Desktop/hosts > /etc/hosts'


This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. Confirm. Quit Terminal. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


That will fix the hosts file. You can now delete the file that was created on your Desktop.

4 replies
Question marked as Best reply

Jan 30, 2013 5:26 AM in response to NathanAblake

You, or someone using your computer, may have hacked the system to block certain servers. The file modified is /etc/hosts.


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. Please read this whole message before doing anything.


Back up all data.



If you have more than one user account, you must be logged in as an administrator to carry out these instructions.


Triple-click anywhere in the line below to select it:

open /etc/hosts

Copy the selected text to the Clipboard (command-C).

Launch the Terminal application in any of the following ways:


☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.



Paste (command-V) into the Terminal window. A TextEdit window should open. At the top of the window, you should see something like this:


##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting. Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost


Below that, you may see some other lines. There should be nothing before the first line above. Make sure you scroll all the way to the bottom of the document. In OS X 10.7 or later, scroll bars are hidden by default until you actually start scrolling, so you may not realize that you’re not seeing the whole document.


If the contents of the TextEdit window are as described, close it, then enter the following command in the Terminal window in the same way as before:


sed '/lo0/q' !$ > Desktop/hosts


You should now have a file named "hosts" on your Desktop. Double-click the file to open it in TextEdit, and verify that it has only the contents shown above, with any extra lines removed. If so, close the window without making any changes.


Next, go back to the Terminal window and enter one final command, again without typing:


sudo sh -c 'cat Desktop/hosts > /etc/hosts'


This time, you'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. Confirm. Quit Terminal. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


That will fix the hosts file. You can now delete the file that was created on your Desktop.

Jan 31, 2013 12:28 PM in response to NathanAblake

Please read this whole message before doing anything.


This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.


Step 1


The purpose of this step is to determine whether the problem is localized to your user account.


Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”


While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.


Test while logged in as Guest. Same problem?


After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.


*Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.


Step 2


The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.


Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:


  • Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
  • When you see the gray Apple logo, release the shift key.
  • If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.


Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The next normal boot may also be somewhat slow.


The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.


*Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.


Test while in safe mode. Same problem?


After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

Apr 15, 2013 11:45 AM in response to Linc Davis

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.


Thank you.

Webpages will not display correctly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.