Having Hosts File Problems in OS X Lion?

Having Hosts File Problems in OS X Lion?

Posted on Friday, July 29, 2011

If you do any kind of web development work on a Mac or even want to block or redirect access to specific domains, you have probably edited the system file /etc/hosts. If like me, you've recently upgraded to Mac OS X Lion and now find that entries appended to this file don't work, the reason is probably because there is no carriage return after the last line in the file.

To ensure that all your hosts file entries work correctly, including the last one, all you need to do is leave an empty blank line after the last entry in the file like this:

hosts_file.png


Comments for this article

blog comments powered by Disqus

Recent Entries

Pixaria 3.9.3 Released
Monday, May 7, 2012

PHP Security Vulnerability
Thursday, May 3, 2012

Documentation Updates
Thursday, April 12, 2012

Minor Update 3.9.2
Wednesday, April 11, 2012

Pixaria 3.9.1 Now Available
Tuesday, April 10, 2012

ArsTechnica Review Lightroom 4
Monday, April 2, 2012

Pixaria 3.9 Now Available
Monday, March 5, 2012

Admin Localisation Coming Soon
Friday, March 2, 2012

Pixaria 3.8 Now Available
Monday, February 20, 2012

Pixaria Design Services
Tuesday, February 14, 2012