It worked for a while in the old configuration, but then stopped working for some reason.
Here is my /etc/hosts file from my Mountain Lion MacBook Air:
127.0.0.1 reddit.com www.reddit.com
127.0.0.1 facebook.com www.facebook.com
##
# 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
This blocks Reddit,but not Facebook.
I've tried flushing the DNS cache for the machine ("sudo killall -HUP mDNSResponder"), the bowsers (FF and Chrome) and I've tried restarting the computer.
And I've moved the entries to the top of the file on the advice of this article, but it didn't work before when it was at the bottom either. Each time it would block Reddit but not Facebook.
dig facebook.com
ornslookup facebook.com
?