by danakas88 » Thu Feb 23, 2012 4:04 pm
@Benjamin: You are very irresponsible to tell anyone to use Terminal for something that can be done easily in the GUI.
@ROcketeer:
DO NOT get started with Terminal for this.
Click the "Go" menu, choose "Go to folder".
Type:
/etc/
and click the "Go" button.
Locate the file named simply "hosts". Drag a copy of it to the desktop. Drag another copy of it to some backup folder. If you don't have any place already for backups, make a new folder and call it "System-backups" or whatever.
Launch TextEdit. Use TextEdit to open the hosts file on the desktop, and add the line:
127.0.0.1 badsite.com
after the line with 127.0.0.1 localhost. It might look like this when you finish:
##
# 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
127.0.0.0 badsite.com
255.255.255.255 broadcasthost
::1 localhost
Save the file, and be sure it has no extension, just named "hosts". Drag it back into the "etc" window, and when you get the message, click "Authenticate", click "Replace", and type your admin password. Restart.