How to Block YouTube on Your PC or Mac | Tech Rasta

YouTube is an unlimited source of educational and entertainment content. However, you may want to block YouTube on your personal computer or at home. If the website is too distracting

Putting YouTube in restricted mode blocks adult content and makes the platform safer for your kids or teens. You can also block certain channels with inappropriate content. But what if you want to block access to the YouTube website on your computer? We’ll show you how to do it. This tutorial covers the steps. For Mac and Windows computers

Block YouTube on Windows PC

You can block websites by editing the “hosts file” that Windows uses to configure your computer’s Transmission Control Protocol/Internet Protocol (TCP/IP). TCP/IP describes a set of instructions that define how your computer exchanges information over the Internet.

Follow the steps below to block YouTube by editing the Windows hosts file in Windows 10 or 11.

  1. Open Windows File Explorer (Windows key + E), paste C:\Windows\System32\drivers\etcand press enter.
  1. double click hosts file.
  1. choose notepad and select agree.
  1. Scroll to the bottom of the page and press enter to go to a new line, type space barprint press enter to move to the following line

This command will block YouTube in all browsers (Safari, Firefox, Microsoft Edge, etc.) except Google Chrome.

  1. print space barprint youtube.comand press space bar Again. This command will block your PC’s Google Chrome browser from accessing YouTube.
  1. press Ctrl + shift + Sor choose file in the top right corner and select save as.
  1. choose all documents in the drop-down menu “Save as type”, then select host files in the destination folder and select record.
  1. choose yes on the pop-up window

Close Notepad and try going to YouTube in your web browser. If you followed these steps correctly, YouTube should show “Connected to the Internet. You are offline” error message. If you still can open YouTube, restart your computer and try again.

Unblock YouTube in Windows

  1. Return to the hosts file destination (Local disk (C 🙂 > Windows > System32 > driver > etc.) and open the hosts file using Notepad.
  1. Remove the IP address and YouTube website URL in the last line of the document.
  1. press Ctrl + S to save the hosts file, or select file on the menu bar, then select record.

Close the hosts file in Notepad, open any web browser. And check if you can access YouTube or not. Restart your computer if your browser does not load YouTube.

How to block YouTube on your Mac

In macOS, you can block YouTube in Screen Time or by editing your Mac’s TCP/IP hosts file.

Block YouTube Using Screen Time

Screen Time on Mac computers has Content Restriction settings for blocking inappropriate web content. Follow the steps below to block access to YouTube on all web browsers installed on your Mac.

  1. open System Preferences and select screen time.
  1. choose choice in the lower left corner and check Use Screen Time Passcode choice.

It’s possible to bypass the restriction password from an administrator account, so Apple recommends setting a Screen Time password from a standard account.

If you are using an administrator account You’ll be prompted to create a new administrator account on your Mac. Select Do not allow this user to maintain this computer. Create a new user account to be an administrator. and follow the instructions to create a new administrator account.

Otherwise, skip to step #3 if setting up Screen Time from a standard account.

  1. Enter a four-digit Screen Time passcode.
  1. re-enter Four-digit Screen Time passcode to continue.

The next step is to set up Screen Time passcode recovery. If you forgot your Screen Time passcode You can reset it using your Apple ID.

  1. Enter your Apple ID email and password and select next.
  1. choose Content and Privacy on the Screen Time Settings menu and select restrict adult website.
  1. Enter your Screen Time passcode.
  1. choose customize.
  1. choose plus icon (+) in the bottom corner of the block list.
  1. enter in the URL dialog box and select agree.
  1. choose agree to save restrictions

Your web browser will show a Screen Time popup when someone visits YouTube on your Mac.

To unblock YouTube, select the YouTube URL in the “Restrict” section and Delete (—) icon In the bottom corner, select agree to save your settings and unblock access to YouTube on all web browsers.

Block YouTube on Mac by customizing the macOS hosts file.

  1. go to Finder > application > utilities and double click terminal.
  1. Type or paste sudo nano /etc/hosts in the terminal console and press go back.
  1. Enter your Mac password and press go back.
  1. Type or paste in the last line After that, press control + oh then press go back to save the hosts file
  1. Close the terminal window. clear browser cache and check if YouTube is blocked or not.

You must clear the browser cache after editing the hosts file in the terminal, otherwise you and other users will still be able to access YouTube.

To unblock YouTube, open the hosts file again in Terminal (see steps #1 — #3) and delete control + oh then press go back to save the hosts file

Use third-party tools

The method above is straightforward and works for all versions of macOS and Windows, or you can block YouTube using free parental control software or your router’s admin control panel.

Source link