Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to block my Mac (running Snow Leopard) at work from accessing sites like Facebook and reddit.

there are browser extensions, but I'm worried about security – I get nervous allowing them to "access my data on all websites".

Is there a simple direct way to do it?

My main browser is Google Chrome.

share|improve this question
    
    
@ChrisF Those are both primarily (or exclusively, given the answers?) for Windows. –  slhck Aug 19 '13 at 7:43
    
@slhck - damn. Missed the osx tag. Feel free to ignore the suggestions then. –  ChrisF Aug 19 '13 at 7:48
add comment

6 Answers

You can edit your hosts file with this free and time saving utility:

Gas Mask

Gas Mask

You can have two profiles, for work and home. So you can switch with one click from one profile to another.

share|improve this answer
add comment

I use Firefox and block time wasting website using LeechBlock.

You put which website that you want to block, when you want to block, and the duration. The add-on will monitor how long you visit that site, and block if you are going beyond your limit. It is not accessing any website, just monitoring the URL bar for address.

Take a look at https://addons.mozilla.org/en-US/firefox/addon/leechblock/

share|improve this answer
add comment

Follow these steps:

  1. Open Applications/Utilities/Terminal and type the following (it will ask you to enter admin password because it is a system file)

    sudo nano /etc/hosts
    
  2. Type in the website you want to block in the following format:

    127.0.0.1 www.xxx.com
    
  3. Press CtrlX and press Y on your keyboard to save the modified buffer, and then press Enter.

  4. Save the file with ControlO and the return key to go back to Terminal.

  5. Clear your DNS cache by using following command

    sudo dscacheutil -flushcache
    

The websites will be blocked.

share|improve this answer
    
"Open 'Applications/Utilities/Terminal and type the following" … what should the OP type? –  slhck Aug 19 '13 at 7:44
    
@slhck updated it thanks for notification –  BlueBerry - vignesh4303 Aug 19 '13 at 7:51
    
I cleared up your post, it contained a few formatting errors and wrong statements. nano etc/hosts won't work, you need a slash before /etc. Also, restarting the machine is not required. –  slhck Aug 19 '13 at 7:54
add comment

Block it in /private/etc/hosts.

For example:

127.0.0.1 www.facebook.com

You can edit this file by calling:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/hosts
share|improve this answer
    
i can find /private/etc/host but i'm not quite sure what you mean me to add –  Kirstin Aug 19 '13 at 7:15
    
is the effect of this to redirect me to me local host instead of the external IP address if i try to access facebook? –  Kirstin Aug 19 '13 at 7:22
    
Exactly, it will try to reach localhost instead of facebook. –  J0sha Aug 19 '13 at 7:36
add comment

You could just use http://www.persistence-app.com

It will block the sites you visit on all browsers

share|improve this answer
add comment

The ultimate answer to your question is StayFocusd, an app for Google Chrome. It's purposefully designed for your application and will allow you a short period every day on your "time wasting" websites (default 15 minutes I think).

You can configure it to only disable the sites during work hours, so you can continue using them after hours. There's other useful features as well.

https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.