If you spend a lot of time behind the computer for your (school) work, then you probably already know how difficult it can be to use your time productively and efficiently. After all, there are so many fun things you can do on your computer! Don't worry though. Blocking websites is easy, costs you nothing and can help you become a lot more productive. So try to take matters into your own hands again! Read on to learn about the different ways you can block websites on your Mac.
Method 1 of 4: Block a website through Mac OSX
Step 1. Start up your computer
Turn on your computer and wait for it to be fully operational. This can take a few seconds to a few minutes. In order to block websites using this method, you will need to modify the hosts files of the computer. A hosts file is a computer file that maps which websites you visit and allows your computer to be identified through various electronic means of communication, including the Internet. Basically what you're trying to do is tell the hosts file to redirect a specific web address so it can no longer land on your screen. Note that this method requires quite a bit of technical ingenuity:
- Go to the Applications folder.
- Click Utilities.
- Select the Terminal program from the list.
You can also find the Terminal by opening Spotlight and searching your computer with the search term Terminal
Step 2. Keep a copy of the hosts file
An accident happens in a small corner, so it is always wise to make a copy. To make a copy, follow these steps:
- Enter the following in the Terminal: “sudo nano /etc/hosts”/
- Press Return. This allows you to open your hosts file in a nano window.
- Enter the administrator password if prompted.
It may appear that the letters and characters you enter are not being registered because the cursor is not moving. Don't be fooled, though, because they will be
Step 3. Start blocking websites
Now that the hosts file is open, a number of lines of text will appear that are intended for formatting purposes.
- Enter “127.0.0.1” under the last line.
- Press the spacebar.
- Enter the specific IP address of the website you want to block. For example, “127.0.0.1 www.facebook.com”.
Step 4. Keep adding websites that you want to block
You can add multiple websites this way. Don't forget to remove "http" and start with "www".
Step 5. Complete the blocking process
Once you're done adding websites to block, follow the steps below to complete the process.
- Hold down the control button and press “O” to save the file.
- Hold down the control button and press “X” to close the hosts file.
Step 6. Delete your existing cache
Your cache is where the computer stores recent information so that it can easily find that information at a later time. Since your cache runs in the background and is never visible, you might never hear about it otherwise. In order for the changes you've made to take effect, you'll need to clear your cache to get rid of the saved history.
Enter the following: "sudo dscacheutil -flushcache"
Step 7. Test your browser
Et voilà! Now is the time to test your results. Open Safari and visit the website you wanted to block. You should see a blank screen or an error screen.
Method 2 of 4: Block website with your router
Step 1. Go to your router's interface
Your router is the device needed to connect your computer(s) to the internet. When used at home, this is usually referred to as a wireless router because it allows you to connect your devices to the internet via WiFi. Although some routers require a different address to access the interface, most routers can be reached via the same address. As with the previous method, this method is also quite technical.
- Enter “192.168.1.1” in the address bar of your browser. If this address doesn't work for your router, try one of the following two addresses: “192.168.0.1” or “192.168.2.1”.
If you need more help accessing your browser's interface, check out the following sites: www.routerpasswords.com and www.cirt.net
- Enter your username and password if prompted.
Step 2. Go to the router's security panel
The exact name of this panel can vary, but usually it will contain something like 'security' or 'security'. Anyway, navigate to the tab that allows you to manage the blocks. You can usually reach this window under “Content Filtering” or “Access Restrictions”.
Step 3. Block the websites you want
Now that you've found the right place, you can start entering internet addresses that you'd like to block or delete..Press “Save” and “Apply” when you're done.
Method 3 of 4: Block website with an application
Step 1. Download Selfcontrol
You will see that there are many applications that can help you block websites. Selfcontrol is a program specially developed for Mac OSX, and is probably the program with the greatest ease of use. The app offers a blacklist where you can add as many sites as you want.
Step #2. Open the app
Open the app as you would any other app.
A minimalistic window will appear with three main options
Step 3. Start blocking websites
- Click on “Edit Blacklist”.
- Click the plus sign (+) and add the websites you want to block.
- Set the timer based on the period of time you want to stay focused and not access the blocked sites.
- Click Start and wait for the timer to start counting down.
Method 4 of 4: Block website using Safari
Step 1. Use the Mac's Parental Controls
The controls of this option are built into the computer's operating system (the software your computer uses to operate). This method may be the simplest of the bunch, but it is just as effective as the others. Moreover, this method requires a lot less technical knowledge.
- Select System Preferences from the Apple menu.
- Go to Parental Controls.
- Click the padlock icon at the bottom left of the screen. Enter the computer's administrator password.
- Click on the guest account in the left sidebar.
Be aware that you cannot use this option to set blocks for the administrator himself (probably yourself). The administrator account will therefore not appear in the left sidebar
Step 2. Decide which websites you want to block
In the Parental Controls window, you will see a few tabs at the top of the screen: Apps, Web, People, Time Limits, and Other.
- Click the Web option. You will now be presented with three other options: Allow unrestricted access to websites, Automatically restrict access to adult sites, and only allow access to these websites. Below the last button you will find a Customize button. This is the option with the largest blocking margin, and is therefore probably best suited for this task.
- Click the Customize button. A new window will appear containing two items: Always Allow, and Never Allow.
- Go to the Never Allow window. Click on the plus sign (+) at the bottom left of the screen. Then enter the website(s) you would like to block. Example: www.facebook.com.
You can also choose to use the Allow only access to these websites button, but that might be a bit too restrictive. However, this way you can block anything that you have not specifically approved
- Click the OK button at the bottom right of the window.
Step 3. Check if the websites you wanted to block are indeed blocked
Now enter the address of a website you wanted to block. You should see a blank screen, or a screen with a Parental Control notification.