Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sOwL

macrumors 6502
Original poster
Sep 25, 2007
490
6
Nerd Cave
My computer will be shared for a couple of weeks and there are certain websites that i need to block... Let's say i want to block facebook, heres what i did:

Opened up terminal, then typed 'sudo nano /etc/hosts'
Added '127.0.0.1 facebook.com' on the bottom, having them separated with TAB instead of spaces
Pressed ctrl+o and enter to save the file, then ctrl-x to quit the nano thing.
Then i typed 'dscacheutil -flushcache' for changes to immediatelly take place
Quit terminal

Am i doing something wrong here? I can still open facebook.com in Opera after those steps.... Am i missing something?
 
Code:
facebook.com has address 69.63.184.142
facebook.com has address 69.63.176.140
facebook.com mail is handled by 10 mx.snc1.tfbnw.net.
facebook.com mail is handled by 10 mx.sf2p.tfbnw.net.

it doesnt matter if i have facebook.com added in the hosts file or not, the result remains the same
 
Wow, this is an old unresolved thread. Maybe someone will look here for an answer in the future, so might as well resolve it.

Facebook runs on https, so you'll have to treat it as such in the hosts file.

127.0.0.1 https://www.facebook.com

That should do the trick. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.