• Tech
  • News
  • Health

How to Block Websites on Your Mac

6.6KShares
128.2KViews

In this article, we explain how to block websites on your Mac. Blocking certain websites can keep you productive during the workday, or minimize the chance of your child finding adult content. You can create a website “blacklist” for your Mac in several ways. While the built-in Parental Control options are the easiest to use, you will need to use the hosts file instead if you want to block sites on an administrator account.

How to Block Websites On Mac by Enabling Parental Controls

The best way to block websites on a Mac is to set up an account with parental controls that allow for customized content filtering or blocking.

  • Click the Apple logo at the top left corner of the screen and select “System Preferences” from the dropdown menu.
  • In the window that pops up, hit the “Parental Controls” icon (it’s a yellow circle with two stick figures inside it, in the bottom row).
  • Enter the computer’s password for access (note that you may need to hit the padlock icon in the bottom left corner of the screen).
  • Create a new account, enter a name and select the age of the user (go for 17+ if this is for a workplace or college).
  • Click the word “Web” from the taskbar at the top of the Parental Controls window.
  • To allow access only to specified sites, click the “Allow access to only these websites” option and enter the sites that will be permitted one by one; to block specific websites, click the “Try to limit access to adult websites” option, then hit the “Customize” button.
OXqk9ktTURBXy9iZDI2MjlhNC1iNTg0LTQyNzAtYWFmYS03YWE2MmJkYzM3N2UucG5nkpUCzQMUAMLDlQIAzQL4wsOBoTAF.jpg
OXqk9ktTURBXy9iZDI2MjlhNC1iNTg0LTQyNzAtYWFmYS03YWE2MmJkYzM3N2UucG5nkpUCzQMUAMLDlQIAzQL4wsOBoTAF.jpg

COPYRIGHT_NOVA: Published on https://www.novabach.com/i/how-to-block-websites-on-your-mac/ by Daniel Barrett on 2022-09-01T14:18:48.000Z

  • In the popup window, enter the names of sites that are always to be blocked, then hit “OK.”

Now just make sure your kid, students, or employees can only log into the account you just configured to limit access, or all that work was for nothing.

And remember that these settings will only apply to Apple’s own browser, Safari. If you want to block websites in Chrome, Firefox, or other browsers, you’ll need to download specific add-ons for those browsers.

Also read: Fix “Safari Can’t Open Page” Error on iPhone, iPad and Mac

Using Mac Terminal

  • Open the Terminal application. Open Applications, then Utilities, then Terminal. This application allows you to modify your hosts file, which provides IP addresses for certain URLs. By associating a false IP address with a certain URL, you can prevent your browsers from reaching it.
How To Block Websites On Your Mac
How To Block Websites On Your Mac
  • Back up your hosts file. If you make a mistake while editing the hosts file, you could block all access to the internet. Creating a backup copy allows you to return to the original version if this happens. This is as simple as a single command. In Terminal, type the following command exactly as it appears.
  • Press Enter on your keyboard to execute the command.
  • Enter an administrator password. Terminal should prompt you for your password. Type it in and press Enter.
W37sw9862nMWtMJwZZjB5Y-970-80.png
W37sw9862nMWtMJwZZjB5Y-970-80.png
  • Open the hosts file. Enter the following command, then press Enter.

This command will open your Mac’s hosts file in TextEdit mode within Terminal. Alternatively, you can edit the hosts file in the main Terminal window using the command:

How To Block Websites On Your Mac
How To Block Websites On Your Mac
  • Skip past the existing text. Your hosts file should already have several IP addresses linked to “localhosts.” Never edit or delete this text, or your web browsers may stop working. Place your cursor on a new line at the bottom of the document.

If you are using the main Terminal window, use the arrow keys to reach the bottom of the page.

A few users have reported a bug where adding new text to the hosts file only works if you add them above the existing text.

  • Type in “127.0.0.1 ” followed by that address with the “www.” prefix in front of it. Do not include “http://.” For example, “127.0.0.1 www.facebook.com”
How To Block Websites On Your Mac
How To Block Websites On Your Mac

If a web browser is directed to this address, it will fail to reach the web page.

CjkMbUTuiwjLoMoLX7T7eQ-970-80.png
CjkMbUTuiwjLoMoLX7T7eQ-970-80.png

The hosts file only checks for the exact URL you enter. For example, “google.com” will only block the Google home page. You will still be able to access google.com/maps, google.com/mail, and so on.

Tip: Do not copy-paste from another document. This can introduce invisible characters that prevent the text from working.

  • Add more URLs on new lines. Press Enter and begin a new line with 127.0.0.1. Follow it with another URL you want to block. You may block any number of websites, but you must start each new line with 127.0.0.1.

Editor’s picks:

Share: Twitter | Facebook | Linkedin

About The Authors

Daniel Barrett

Daniel Barrett

Recent Articles

  • Xnxubd 2023 Nvidia New - The Future Of Graphics Technology

    PC

    Xnxubd 2023 Nvidia New - The Future Of Graphics Technology

    In recent years, the demand for high-performance graphics technology has increased significantly, and Xnxubd 2023 Nvidia New is poised to be the solution for the most demanding users. This new technology promises to deliver unparalleled performance and features that will set a new standard in the world of graphics.

  • How To Delete A Youtube Channel On IPhone?

    iPhone

    How To Delete A Youtube Channel On IPhone?

    YouTube has become an integral part of our daily lives, and millions of users are uploading, watching, and commenting on videos every day. If you have a YouTube channel that you no longer use or want to get rid of, you might be wondering how to delete a youtube channel on iPhone. If you have an iPhone, you can delete your YouTube channel in a few simple steps.

  • Google Lens For IPhone - Revolutionizing Search

    iPhone

    Google Lens For IPhone - Revolutionizing Search

    From your iPhone, you may utilize a picture to access the power of Google's search engine. With Google Lens for iPhone, you can search for things in a picture or with your camera. Send a picture instead of typing and ask Google to identify it. Keep reading to learn in detail

  • Xnxubd 2023 Nvidia Drivers - System Stability And Performance

    Software & Apps

    Xnxubd 2023 Nvidia Drivers - System Stability And Performance

    Nvidia is one of the leading manufacturers of graphics processing units (GPUs) and graphics cards. The Xnxubd 2023 Nvidia Drivers is the latest version of their software package that is designed to ensure that Nvidia GPUs work optimally with the latest computer games and applications. In this article, we will discuss the importance of updating the Xnxubd 2023 Nvidia Drivers.

  • How To Make Nvidia My Default Graphics Card

    PC

    How To Make Nvidia My Default Graphics Card

    In recent years, the use of dedicated graphics cards has become increasingly popular for both personal and professional use. In this article, we will discuss how to make nvidia my default graphics card, ensuring that your computer is using the dedicated graphics card instead of the integrated graphics card that comes with your motherboard.

  • What You Need To Know About PCIe SSD

    Hardware

    What You Need To Know About PCIe SSD

    In this tutorial, we will be explaining everything you need to know about PCIe SSD (PCIe solid-state drive). Click the link to read full guide.

  • Ring Vs Blink: Which Smart Security Camera System Is The Best

    Comparisons

    Ring Vs Blink: Which Smart Security Camera System Is The Best

    In this article, we will be comparing the two best Amazon home security cameras, Blink Vs Ring (camera). Click the link to read full guide.

  • Intel Core i3, i5 And i7: The Differences Explained

    Guides

    Intel Core i3, i5 And i7: The Differences Explained

    This article explains the differences between Intel Core i3, i5, and i7. Click the link to read the full guide.

  • How To Fix A TV That Turns On By Itself

    Gadgets

    How To Fix A TV That Turns On By Itself

    In this article, we will highlight some reasons why your TV turns itself on and what you can do to prevent it. Click the link to read more..

  • The 5 Best Cheap Wireless Routers Under $50

  • How To Open Firewall Ports In Windows 10

  • How To Use Google Chrome Password Manager To Save Logins

  • How To Fix Chrome OS Is Missing Or Damaged on Your Chromebook

  • How to See Who’s Connected to Your Wi-Fi Network