Safari is unable to reach localhost (127.0.0.1)

I think we need a little more information based on your question.

I'm going to guess you have a web server running to accept requests? I currently don't, and Safari won't connect to 127.0.0.1, because it "Couldn't find 127.0.0.1" - even though I can ping it just fine.

So first, you need to have something running. Secondly, have you tried connecting to testing.localhost with Safari, just incase the two entries are confusing Safari (this is entirely possible).

When you say "applications can connect as normal" with Chrome and Firefox, what are you seeing? The web page you're expecting to see? A different error?

Edit

I downloaded and installed MAMP, and I could not reproduce this error.

Some forum threads suggest IPv6 resolution is causing this issue. I would be inclined to turn off IPv6 and remove the entry from the hosts file (temporarily just for testing)

  1. Apple Menu > System Preferences
  2. Network
  3. Select your Network Connection > Advanced
  4. Configure IPv6 > Off

Apply, restart, and see how it goes.


I've had this happen before -- using http://computername.local/ worked for me, but I'm unsure why it would be different than just using a name in a host file.