Home
So I was looking at archive.macfixitforums.com and I found that the page loads were being held up by a couple of links to an ad server called madstage.com.com that wasn't responding. If you block that domain with an ad blocker or add the following to your /private/etc/hosts file, it loads quickly again.

127.0.0.1 madstage.com.com

Then in the Terminal, clear your DNS cache with:

dscacheutil -flushcache
Great tip! That worked. I couldn't find /private/etc/hosts with Spotlight, Easy Find or Find Any File but blocking that domain with Saft and clearing the DNS cache seemed to do the trick.
Originally Posted By: jchuzi
I couldn't find /private/etc/hosts with Spotlight, Easy Find or Find

Check out Mac OS X: How to Add Hosts to Local Hosts File and How to edit the hosts file in Mac OS X – Leopard for some details.
While there's a lot of multi-step processes to editing the Hosts file, one of the easiest for people with BBEdit is:

1. In the Finder, go to the "Go" menu and select "Go to Folder...", then enter:

/private/etc/

2. Then drag the "hosts" file to BBEdit. You may also want to create an alias to the hosts file on your desktop or somewhere if you want to get to it quicker later.

3. Start making a change and BBEdit will prompt you to Unlock the document. Then when you save, BBEdit will prompt you for your root password.
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.
Guess that explains why I haven't been able to replicate the slow load times: I always have AdBlock Plus running in Firefox.

This works with BBEdit's freeware sibling TextWrangler as well.

Folks might want to first copy the hosts file (I copied with command-C, then pasted right back into /private/etc/, whereupon hosts copy was created), so that if anything somehow gets terminally florfed in the editing process, it's easy to recover.
Originally Posted By: donikatz
Guess that explains why I haven't been able to replicate the slow load times: I always have AdBlock Plus running in Firefox.


I just tried that. I got this:

Firefox prevented this site (adblockplus.org) from asking you to install software on your computer.

Then I went to Firefox prefs and enabled pop-ups and tried again. Same thing.
You have to click "Allow" on the security bar that pops up. It's a default security measure.
Originally Posted By: Kevin M. Dean
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.


Right. Maybe I'm the only one who tried to follow those steps. It "found" "more than 10,000 files". From the above, I'm not even sure what file amongst them I would be looking for.

It's no big deal to me. I doubt I'll be searching the MFI archives very often. I just clicked on a link to them in another thread out of curiosity. Just thought I'd report on what happened.
Originally Posted By: Gregg
Originally Posted By: Kevin M. Dean
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.


Right. Maybe I'm the only one who tried to follow those steps. It "found" "more than 10,000 files".


Seems quite a bit when searching on the word "hosts". Initially when searching "This Mac" I get 598 items and then just switching to "File Name" instead of "Contents" brings it down to 76 items.

You can further narrow it down by adding the search parameter "Name" as set it to "is" and type "hosts" there and it brings it down to 8 items. Selecting the results one by one will show the path below and for me the first one listed is the /private/etc/hosts file.
The real UNIX file path is /etc/hosts (/private is an Applization), so the easiest way to edit it is to just use Terminal, since it isn't view restricted like the Finder.

sudo nano /etc/hosts

Quote:
...the easiest way to edit it is to just use Terminal...

Well, that's entirely dependent on what you're familiar with. I suspect that someone who's never used nano will find that environment a bit more confusing than the small amount of file manipulation required to open, edit and save /etc/hosts in a GUI text editor.

If you're going to suggest

sudo nano /etc/hosts

then you might want to explain how the reader should go about doing things like, say, moving the insertion point and saving the changes.
Quote:
you might want to explain how the reader should go about doing things like, say, moving the insertion point and saving the changes.


Move the cursor with the arrow keys and save the changes following the on-screen instruction right at the bottom. smirk
Originally Posted By: donikatz
The real UNIX file path is /etc/hosts (/private is an Applization)


While true... in Appleland /etc is a symbolic link and /private/etc is the actual path, so I prefer to provide the actual path in these cases.
Yep, you're entirely correct. That's what I get for being a heavy cross-platform guy...

I guess the main point of my suggestion was Terminal, though. I usually find it easier to describe than several Spotlight steps. In my own experience, many users find Spotlight very confusing, while they're okay with CLI as long as they're given an exact command to type. At the office we had so many Spotlight complaints when we upgraded to Leopard that we had to buy a third-party util. Still, I'll admit I was overly definitive; one man's easy is another's whoah!/woe.

But the original suggestion was not to use Spotlight to find the hosts file in question; that can be done using Finder's Go to Folder… command. The Spotlight issue arose as a secondary discussion when Jon mentioned that he "couldn't find /private/etc/hosts with Spotlight."
... and my reply was to THAT part of the thread...

I can't tell if you're being deliberately obtuse or have just been a power user too long to see how illogical your argument is.

If you're suggesting using Terminal to find the hosts file in question, your suggestion of sudo nano /etc/hosts is irrelevant; it only "finds" the specific file because it's given the path as an argument! If you already know the path, then using Finder's Go to Folder… command is what you'd use in the GUI, not Spotlight. (Yes, you'd enter /etc, not etc/hosts.)

If, on the other hand, you're suggesting using Terminal to edit the file, that's a different matter; I don't think nano's interactive interface will come very naturally to the sort of person who's "okay with CLI as long as they're given an exact command to type," since your one-liner gives them no clue as to how to navigate once they're in nano, but maybe that's just me.

But if you're championing Terminal as the easy route to editing, then there's no relevant comparison with Spotlight; Spotlight has nothing to do with editing.

Many people looking at this topic may see the thread about finding the file with Spotlight and think that's the way to go, confusing the other part. I was pointing out that the easier way is to not find it, to just use Terminal. Yes, "easiest" is always subjective. Anyone who has ever done tech support knows 10 techs will have 20 different "easiest" ways to do something. For some people Go To is the easiest. For some people Terminal is the easiest. Rarely would Spotlight be the easiest. I'll stick with my opinion and you can stick with yours. This is a Lounge thread, after all.
Posted By: Dave Re: Fix for macfixitforums archive slow loading - 08/29/09 02:04 AM
The first half of this thread was something I was able to understand most of, but once past that, I found that as is often the case, everything was way over my head. I will now try reading it again while standing on a ladder.
Originally Posted By: dkmarsh
This works with BBEdit's freeware sibling TextWrangler as well.

Folks might want to first copy the hosts file (I copied with command-C, then pasted right back into /private/etc/, whereupon hosts copy was created), so that if anything somehow gets terminally florfed in the editing process, it's easy to recover.

I will add that TextWrangler has an "Open Hidden" item in its File menu -- which makes navigating to any folder (via the dialog box) quite simple.

Plus, the full path to the hosts file was already given in post #1 (so "finding" it seems somewhat superfluous).

PS: TW's prefs can be set to save a (timestamped) backup, anywhere we desire.
[and yes, it also handles authorizations... so we can edit root-owned files.]
Quote:
guess the main point of my suggestion was Terminal, though.

Doni, you are quite right! I am less than a newbie on Terminal but did it from A to Z without any searches. First, thanks to Alternaut for great links! The invisible host file cannot be edited directly because even the admin user cannot save the edits; this is why BBEdit and the likes were suggested. But many do not have this/do not know how to use it, and have no ad blockers. So, I just followed the instructions in one of the Alternaut's links to edit the file in Terminal and flush the caches there too. The instructions are explicit (I did not put any $ sign before the command) and it worked even in Snow Leopard. The link I used was this:
http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/
Hope this is helpful for dummies like me.
Glad to hear you found those links useful. laugh That said, and once gone through the motions, you might want to revisit Hal’s ‘one-stop shopping’ suggestion of the freeware text editor TextWrangler. I found TW’s "Open Hidden" command* (File menu) using the file path provided above (/private/etc/hosts) a surprisingly handy way to edit Hosts files. Of course, there's no arguing about taste... tongue


*) UPDATE: according to its Release Notes, starting with TextWrangler 3.5, the "Open Hidden" command has been removed from the File menu, since the "Show Hidden Items" check box is available [in the file dialog box, alt] on all supported systems now".
True, but for Terminal (which is built-in) one does not need anything else once they have your link. Thanks again! Did it on two machines, one 10.5.8, the other 10.6.1 and both worked. Stumbled only once: after using control-O for save one needs to hit return for the save to register. Once figured that out, the second try was a breeze.
Yet another simple (and free) tool to edit your hosts files: Localghost. tongue

Just want to add a link to ganbustein's recent post, as it will be easier to locate it from here (since this thread is a sticky while his seems to be sinking):

Accessing MacFixIt archive from Lion
As per ganbustein's other thread, the MFIF archive is still sometimes hard to access (despite the hosts file modification suggested above). Here is a link to the old Lounge for testing:

MFIF Community » The Lounge
http://archive.macfixitforums.com/ubbthreads.php/forums/9/1/The_Lounge

clearly the NSA's tapping into the database server is affecting its response time!
FYI I have started missing new posts because I shift-cmd-click new posts in a forum and tab through them. If one fails to load, there's no address to reload when I cancel and try to reload. And the forum sometimes marks the thread as read so I don't know which one I didn't get to see.
Originally Posted By: Virtual1
FYI I have started missing new posts because I shift-cmd-click new posts in a forum and tab through them. If one fails to load, there's no address to reload when I cancel and try to reload. And the forum sometimes marks the thread as read so I don't know which one I didn't get to see.

That sounds like it ought to be moved to the FTM Feedback Forum.
Can the search function possibly be fixed? This very confusing and many topics I'm trying to find are no longer there.
when trying to make a reply earlier today (#49405), about a minute or two after clicking POST I finally got:

Quote:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@finetunedmac.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


The post was made, but my browser never received the page reload.


(and again when I tried to make THIS post)
Originally Posted By: Virtual1
when trying to make a reply earlier today (#49405), about a minute or two after clicking POST I finally got:
Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
...

The post was made, but my browser never received the page reload.
(and again when I tried to make THIS post)

Just so you know:
This problem and similar issues — which are getting more and more frequent — are currently under discussion in the FineTunedMac Feedback forum under the thread "Back up and running!"
© FineTunedMac