How to Block Websites on Mac
Use host files
Open Spotlight. Click the magnifying glass icon in the upper right corner of the screen. A search bar will appear in the middle of the screen.
Type terminalin Spotlight to find the Terminal app on Mac.
Click Terminal. It's the first result that appears under the Spotlight search bar. The Terminal application will open.
Enter the host file command. Type sudo nano /etc/hosts
into Terminal, then press ⏎ Return. The host file, the file that controls access to your websites, will be opened.
Enter your admin password. Now, enter the password you used to log into your Mac into Terminal and click ⏎ Returnto confirm your identity and open the host file.
When typing, the characters contained in the password are not displayed. Therefore, you will not be able to see them on Terminal.
It may take a while to open the host file.
Create a new line in the hosts file. Scroll to the bottom of the file using the arrow keys ↓and press ⏎ Return.
Type 127.0.0.1
then tap Tab ↹to leave some space between 127.0.0.1and the next part of the text.
Enter the website address. That's the web address of the site you want to block. Don't forget to include the "www" and ".com" suffix when typing.
For example, to block Google, you would type: 127.0.0.1 www.google.com.
If you plan to block multiple websites, each URL must be on its own line.
Save and exit the editor. Once you have entered all the pages you want to block, save by pressing Control+ Othen ⏎ Return. To exit the host file, simply click on the red circle in the upper left corner of the window.
Clear your Mac's DNS memory . You can do so by typing sudo killall -HUP mDNSResponder;say DNS cache has been flushed
and pressing ⏎ Return. Essentially, clearing DNS will refresh your browser's memory, preventing you from accessing sites that were blocked through saved settings or similar.
Use the SelfControl app
Go to the SelfControl page at https://selfcontrolapp.com/ . SelfControl allows you to block specific sites for up to 24 hours, helping to improve your productivity. Once blocked, until the time limit expires, no way can help you access that page.
This is what makes SelfControl really effective, but at the same time, this also means you'll have to be careful about blocking sites.
Click the blue Download SelfControl button in the middle of the page.
Install SelfControl. This step usually involves opening the SelfControl folder and dragging the DMG file into the "Applications" folder shortcut. First, though, you'll have to confirm the download on MacOS Sierra.
Open SelfControl. Click Spotlight , type selfcontrol, and click SelfControl just below the search bar.
Click Edit Blacklist . It's located in the lower right corner of the SelfControl window.
Click the + option in the lower left corner of the window.
Enter your website address. Don't forget to add the "www" prefix.
For example, you would type www.youtube.comto block YouTube.
Press ⏎ Return. Your website will be added to the blocked list.
Set block time. Click and drag the slider to the right to increase the page block time. Drag the slider to the left to reduce this time.
Press Start when you're ready to block. This button is at the top of the window. At this point, your website will be blocked for the specified period of time.
Use parental controls
Open Apple Menu. Click the Apple logo in the upper left corner of the screen to drop this menu.
This method only blocks websites on Safari.
Through parental controls, you cannot apply this website block to your own account, but can only apply it to another account.
Click System Preferences in the drop-down menu.
Tap Parental Controls . This option is located in the System Preferences window.
Click the clock icon in the lower left corner of the screen.
Enter your username and password. At this point, the menu will be unlocked and you can make changes to the parental management settings.
To do this, you must log into an administrator account.
Select user. Click on a user's account name in the left pane to select that account.
You cannot choose your own account.
If no users are listed, select "Create a new user account with Parental Controls" and press Continue .
Click the Web tab at the top of the window.
Check the "Try to limit access to adult websites" box near the top of the window.
Click the Customize option below the text "Try to limit access to adult websites". A new menu will appear.
Click the + sign under the "Never allow these websites" heading. A text box will open.
Type in the website address. That is the address of the page you want to block.
For example, to block Twitter, you would type www.twitter.com.
Click ⏎ Returnto enter the address. At this time, the page you just entered has been blocked on the Safari browser of the selected accounts.
You should read it
- 6 simple ways to enable the right-click feature to block that site
- How to block websites on Firefox
- How to Block Websites on Google Chrome
- How to Block and Unblock Websites on Mac
- Does Viettel block websites that contain 18+ videos and images on computers and phones?
- How to block websites using hosts file
- Instructions on 2 ways to quickly block websites from opening automatically
- How to block websites on Chrome simple, effective
- How to block websites that open on Coc Coc 100% successfully
- Steps to block automatic opening of websites on Chrome browser
- How to Block Websites on Firefox
- How to Block Unwanted Sites from Your Router
Maybe you are interested
How to use Auto Clicker Assist to automatically click the mouse
Instructions to fix double click error on computer mouse - Click once becomes twice
PowerToys will soon support creating app spaces and launching with just one click
Turn Windows 11 interface into Windows 10 with just one click
Fix right-click issue on Windows 10
Do not click on strange links or your phone will be hijacked