How can I eliminate slow resolving/loading of localhost/virtualhost (a 2-3 second lag) on Mac OS X Lion?

I had the exact same problem and it was driving me crazy!

Put all your hosts file entries for localhost into one line like so:

127.0.0.1 localhost myproject.dev myotherproject.dev
::1 localhost
fe80::1%lo0 localhost

Worked like a charm for me. Seems like a bug in Lion.

Leave a Comment