How to Block a Website on Mac

Four Methods:Blocking a Website through MAC OSXBlocking Websites through your RouterBlocking Websites with an ApplicationBlocking Websites through Safari

If you spend most of your time working in front of a computer, you already know how difficult managing your time can be: so many entertaining options just a click away! But don't despair. Blocking certain sites on the web is a quick and free process that can help you be more productive. You can block websites by using the terminal in OS X, adjusting settings on your router, installing a blocking program, or by adjusting your Safari browser settings. So get some control back and find out different ways to block a website on your Mac.

Method 1
Blocking a Website through MAC OSX

  1. Image titled Block a Website on Mac Step 1
    Start your computer. Power up your computer and wait for it to be completely operation-ready. This might take anywhere from a few seconds to a few minutes. Keep in mind that in order to block websites on your Mac you need to change the computer's hosts file. A hosts file is a computer file that maps the websites you visit and that allows your computer to be identified through various electronic communication methods, such as the Internet. What you're trying to do is, in essence, telling the hosts file to redirect a specific web address so that it no longer reaches your screen. Keep in mind that this method is a bit technical[1].
    • Go to the Main Applications folder.
    • Click Utilities.
    • Select the program Terminal from the list.
      • You can also look for the terminal by accessing spotlight and running a search through it.
  2. Image titled Block a Website on Mac Step 2
    Save a copy of the hosts file. Things can go wrong when you least expect it so making a copy is always a good idea[2]. To make a copy, follow these steps:
    • Type the following on the terminal line: "sudo nano /etc/hosts".
    • Hit enter on the terminal command line. This allows you to open up your hosts file in a nano box.
    • Input your admin password when prompted.
      • It might seem as if the letters and symbols you're typing aren't being recorded because the cursor won't move. But they are, in fact, being registered properly.
  3. Image titled Block a Website on Mac Step 3
    Begin blocking sites. Now that the hosts file is open, several text lines used for mapping purposes will appear.
    • Enter "" below the last text line.
    • Press the space bar.
    • Enter the specific IP address of the website you would like to block. For example, "".
  4. Image titled Block a Website on Mac Step 4
    Continue adding sites to be blocked. Many more web addresses can be blocked in this exact fashion. Just remember: avoid using "http" and begin directly with "www".
  5. Image titled Block a Website on Mac Step 5
    Complete the blocking process. Once you are finished adding web addresses to be blocked, follow the following steps to finish the process.
    • Press and hold the control key and press "O" to save the file.
    • Press and hold the control key and press "X" to exit the host file.
  6. Image titled Block a Website on Mac Step 6
    Clear your existing cache. Your cache is where your computer saves recent information so that it can readily access it at a later date. You might never become aware of your cache as it operates in the background and is hence not visible to you. So to put the changes you made into action, you need to flush your cache to get rid of its past saved history.
    • Type "sudo dscacheutil -flushcache".
  7. Image titled Block a Website on Mac Step 7
    Test your browser. And Ta-da! It's now time to test your results. Simply open Safari and enter a website you wanted blocked. The screen should come back as blank, or with an error message.

Method 2
Blocking Websites through your Router

  1. Image titled Block a Website on Mac Step 8
    Access your router's interface. Your router is the device needed to connect your computer(s) to the internet. Within a home, it's usually called a Wifi-router which means that it allows your computer to be wireless, and hence more portable and accessible. Though different routers might require different addresses in order to be opened, most routers can be accessed with the same address. As with the previous method, this is also a bit technical[3].
    • Enter into your browser. If this address doesn't work for your router, try two of the following ones[4]: or
      • If you need more help figuring out your router, check out one or both of these sites: and[5].
    • Once prompted, enter your username and password.
  2. Image titled Block a Website on Mac Step 9
    Go to your router's security panel. It might be named security panel or it might be something different. Either way, navigate to the tab that displays blocking controls. They can normally be reached under "Content Filtering" or "Access Restrictions".
  3. Image titled Block a Website on Mac Step 10
    Begin blocking websites. Now that you have found the correct location, you can begin entering web addresses you wish to block or remove.
    • Press save and apply when you are finished.

Method 3
Blocking Websites with an Application

  1. Image titled Block a Website on Mac Step 11
    Download Selfcontrol. You will find that there are many applications out there that facilitate blocking websites. Selfcontrol is a program specifically designed for MAC OSX, and probably one of the easiest to use. The app provides a blacklist in which you can enter as many sites as you'd like[6].
  2. Image titled Block a Website on Mac Step 12
    Open the app. Simply launch it as you would any other app[7].
    • A minimalist window will appear with 3 essentials.
  3. Image titled Block a Website on Mac Step 13
    Begin blocking websites.
    • Click edit blacklist.
    • Click the + sign and add any site you wish to block.
    • Set the timer to the time span during which you want to stay focused and not access your blocked sites.
    • Click start and wait for the timer to go off.

Method 4
Blocking Websites through Safari

  1. Image titled Block a Website on Mac Step 14
    Use your Mac's parental controls. These controls are already built into you computer's operating system (the software that essentially runs your computer).This method might be the easiest, but it's just as effective as the others. And it requires far less technical know-how[8].
    • From your computer's Apple menu, go to System Preferences.
    • Go to Parental Control.
    • Click on the lock symbol on the bottom left side. Enter your administrator password.
    • Click on the guest account on the left side bar.
      • Please be aware that you will not have the option of setting up blocking controls for the administrator (likely yourself). The administrator's account will therefore not appear on the left side.
  2. Image titled Block a Website on Mac Step 15
    Determine which sites you would like to block. Once you are in Parental Controls, you will notice a few option tabs at the top of your window: Apps, Web, People, Time Limits, and Other.
    • Click on the Web option. You will note three other options: Allow unrestricted access to websites, Try to limit access to adult websites automatically, and Allow access to these websites only. The last option has a Customize button below it. This is the option with the widest blocking range, and likely best suited for this task.
    • Click the Customize button. A new window will appear divided into two sections: Always allow these websites, and Never allow these websites.
    • Go to Never allow these websites and click on the + button on the bottom left side. Now, simply type in the website(s) you wish to block. Example:
      • You could also choose Allow access to only these websites. It might it a bit too restrictive, but this way, you'll block anything that isn't specifically approved by you.
    • Click OK on the bottom right side of the window.
  3. Image titled Block a Website on Mac Step 16
    Test the websites you entered to be blocked. Now, type in an address you wanted to remove into Safari. The page will come back as blank, or with an Access restricted notice.

Article Info

Categories: Internet