Block And Unblock Internet Sites On Mac

Block And Unblock Internet Sites On Mac
Block And Unblock Internet Sites On Mac

There are several ways to block and unblock Internet sites on a Macintosh (Mac) computer, depending on your personal preference. The act of blocking particular websites can be useful if you want to restrict your employees’ Internet behavior at work, or if you want to restrict family members from accessing certain offensive or inappropriate websites. The methods for blocking and unblocking websites include entering specific websites into the hosts file of your computer (located in TextEdit within Terminal), enabling the Parental Controls feature on your Mac, or using third-party Internet browser add-ons or extensions to manage access to specific sites. Use this article as a guide to block and unblock Internet sites on your Mac computer for all Mac OS X operating systems. Follow the simple steps below

Block And Unblock Sites Through Hosts File In Terminal

Open “Applications,” then “Utilities” on your Mac computer.

Open the “Terminal” application. This application will allow you to modify your hosts file through TextEdit.

Type the following command into Terminal:

  • sudo /bin/cp /etc/hosts /etc/hosts-original.

Press “Enter” on your keyboard to execute the command. This command will create a backup of your hosts file.

Type the password for your Mac at the prompt, then press “Enter.” The cursor will not move from its position as you type your password.

Enter the following command, then press “Enter” on your keyboard:

sudo /Applications/ /etc/hosts.

This command will open your Mac’s hosts file in TextEdit mode within Terminal.

Place your cursor on a new line below the last line that reads “localhost.”

Type “″ onto the new line just as it appears in the first line of the “localhost” series commands.

Replace the “localhost” section of the command with the name of the website or domain you want to block. For example, if you want to block users from accessing Facebook, the line should read “”

Press “Enter,” then continue to add a line for every domain or website you want blocked. The host name ( should remain the same on every line.

Close or quit the TextEdit dialog box when you are done, then confirm that you want to save the TextEdit file when prompted. The Terminal application will then display.

Type the command “dscacheutil -flushcache” into Terminal. This command will take the changes you made within TextEdit into effect. The websites you indicated will now be blocked when accessed from any Internet browser on your Mac.

Unblock websites by removing the entries you added into TextEdit within Terminal. This will require you to follow every step listed above; however, instead of adding website entries, you will remove the website entries you originally created.

Block And Unblock Sites With Parental Controls

Navigate to your Apple menu and select “System Preferences.”

Open “View,” then select the option labeled “Parental Controls.”

Click on the user account for whom you want to block or unblock websites. Administrator accounts cannot be modified.

Select the option labeled “Enable Parental Controls” to block websites. If you are unblocking websites, this option will read as “Disable Parental Controls,” and you will not be required to complete the remainder of steps outlined for this procedure.

Click on the tab labeled “Content.”

Select one of the modes presented to block websites. You will have the option to block adult websites only, or to indicate specific websites you want the user to have access to.

  • To block adult websites only, choose the option labeled “Try to limit access to adult websites automatically.” Your Internet browser will then identify and block any websites on which adult content is detected.
  • To indicate specific websites that can be accessed, select the option labeled “Allow access to only these websites.” You will then have the ability to type the domains, or websites, that you want that particular user to have access to.

Third-Party Internet Browser Extensions

Search for Internet browser extensions that block and unblock websites. Some Internet browsers such as Google Chrome and Mozilla Firefox allow you to download extensions for your browser in which you can manage websites.

  • Go to your Internet search engine and enter keyword phrases such as “Chrome add-ons” or “Firefox extensions” to locate websites that feature add-ons for your particular browser.
  • Go to the search box on the add-on or extension website, then enter phrases such as “block websites” or “filter websites” to find extensions that allow you to block and unblock websites. Examples of such add-ons are “ChromeNanny” for Google Chrome and “LeechBlock” for Mozilla Firefox.

Download the extension to your Internet browser. In most cases, you will be required to click on a button or link that reads “Download” to have the extension added to your browser.

Follow the directions for that particular extension to block and unblock websites. For most extensions of this nature, you will be required to enter the domains or websites you want blocked.

Save your add-on preferences. The websites you indicate to be blocked or unblocked will now function accordingly when accessed within your Internet browser.

Haridas Gowra

Loves space, gadgets, comics and believes PC is superior to consoles.

Help Us Grow

If you like this post, please share it with your friends.

You are free to copy and redistribute this article in any medium or format, as long as you keep the links in the article or provide a link back to this page.

You may also like...