Roman Kropachek Photo
Written by:

How to block youtube on mac

how to block youtube on mac

Have you ever found yourself or your family members spending excessive time on YouTube, and you’re seeking ways to block access on your Mac? Be it for productivity reasons or parental controls, sometimes limiting access to YouTube becomes necessary. I’ve personally faced such a situation and have tested various methods to block YouTube effectively on macOS. In this article, I’ll walk you through multiple strategies to help you achieve this.


Common Scenarios:

Battling Procrastination 🕰

  • Struggling to maintain productivity while working from home, I often found myself aimlessly scrolling through YouTube videos, devouring hours of my workday.
  • I needed to find a way to prevent distraction and maintain my focus on essential tasks.

Parental Controls 🛡

  • As a parent, I wanted to protect my children from inappropriate content and limit screen time on YouTube.
  • I needed a solution that could offer peace of mind by restricting access to YouTube during homework hours or bedtime.

Digital Wellbeing 🧘

  • Emphasizing mental health and a balanced digital life, I sought ways to decrease my family’s overall screen time, starting with blocking addictive platforms like YouTube.
  • This involved creating a healthier internet usage pattern and removing the temptation of endlessly streaming videos.

Step-by-Step Guide. How To Block Youtube On Mac:

Method 1: Using Screen Time on macOS 😴

  • Navigate to System Preferences on your Mac.
  • Click on Screen Time and set up the feature if you haven’t done so already.
  • Choose the ‘App Limits’ tab and click ‘+ Add Limit‘ to create a new restriction.
  • Find and select ‘YouTube’ under the Web section, then specify the amount of time YouTube is allowed each day.
  • Click ‘Done‘ to activate the limit.

Note: Screen Time also allows you to password protect settings to prevent changes.

Conclusion: This native macOS feature is straightforward and convenient for quick and temporary blocks.

Method 2: Editing the Hosts File 🔒

  • Open the Terminal app on your Mac.
  • Type ‘sudo nano /etc/hosts‘ and press Enter to edit the hosts file with administrative privileges.
  • Insert the following lines at the end of the file: www.youtube.com m.youtube.com youtubei.googleapis.com youtube.googleapis.com youtu.be
  • Press Ctrl + O to save the file, then Ctrl + X to exit.
  • Flush the DNS cache by typing ‘sudo killall -HUP mDNSResponder‘ in the Terminal.

Note: This method requires a bit of technical know-how and care should be taken not to accidentally modify other parts of the hosts file.

Conclusion: Hosting file changes offer a more persistent, across-all-browsers-blocking approach.

Method 3: Using Browser Extensions 🚫

  • Open your preferred web browser on your Mac.
  • Search for ‘site blocker’ extensions, such as ‘BlockSite‘ or ‘StayFocusd‘ in the browser’s web store.
  • Install the extension and follow its setup procedure.
  • Add ‘www.youtube.com‘ and other YouTube-related domains to the block list within the extension’s settings.
  • Configure any additional options, such as time restrictions or password protection.

Note: Remember to install browser extensions that are reputable to avoid privacy issues.

Conclusion: This is an excellent method for those who want an easy-to-use solution within their browser.

Method 4: Network Router Settings 👨

  • Access your router’s admin page by typing its IP address into a browser window.
  • Locate the ‘Parental Controls’ or ‘Access Restrictions’ section.
  • Create a new rule to block URLs containing the word ‘youtube‘.
  • Apply and save the changes to your router settings.

Note: Changes to router settings can affect all devices on the network, so exercise caution.

Conclusion: This approach is beneficial for households looking to enforce a YouTube ban across multiple devices.

Method 5: Third-Party Apps 💾

  • Research and download a reputable third-party application such as ‘Freedom‘ or ‘Cold Turkey‘ that specialize in website blocking.
  • Install the application and configure it to block YouTube by adding it to the block list.
  • Set the times and durations for which YouTube should be blocked.
  • Enable the blocking feature, and optionally, password protect the settings.

Note: Third-party apps usually offer additional features and more robust blocking capabilities compared to native options.

Conclusion: An excellent choice for users who need more flexibility and control over their blocking preferences.


Precautions and Tips:

Safe Surfing Insights ☔

  • Review the blocking settings regularly to ensure they’re still relevant and helpful.
  • Consider discussing the purpose of restricting access with household members to promote understanding and cooperation.
  • Look into comprehensive parental control solutions that offer a variety of monitoring and blocking features.

Cyber Security Measures 🛡

  • Always keep your Mac’s software up-to-date to ensure you’re benefiting from the latest security features.
  • Only download trusted applications from reputable sources to prevent introducing malware or privacy threats.

Further Steps for Managing Online Content

Aside from restricting access to YouTube, consider taking additional steps towards managing how you and your family interact with online content. Utilize tools such as Common Sense Media for reviews and guidance on suitable content for children. Implement digital detox periods where all family members disconnect from devices and engage in offline activities together.

Explore alternative educational platforms like Khan Academy or Coursera, which offer constructive screen time and learning opportunities. Don’t overlook the importance of having open conversations about responsible internet usage and the impact of digital media on our lives.

Maintaining a balance is essential, and while blocking websites is one aspect, encouraging healthy online habits is equally vital to fostering a positive digital environment.


Blocking YouTube on a Mac may sound like a draconian measure, but it’s often a necessary step for better concentration, increased productivity, and a healthier digital lifestyle. By using the methods I’ve shared, based on my personal experiences, you can effectively manage and restrict access to YouTube in a way that works best for you and your family. Always remember the importance of balance and healthy digital habits for overall well-being and cyber safety.


Access System Preferences, choose Screen Time, and click Content & Privacy. Under the Web Content section, you can limit access to adult websites and customize by entering YouTube’s URL.

In Safari, go to Preferences, select Websites tab and then Content Blocking. Click the plus icon and add ‘youtube.com’ to the list of restricted sites.

Yes, applications like Freedom or Focus let you block specific websites including YouTube. Install one and follow the instructions to blacklist YouTube.

Yes, by editing the /etc/hosts file. Add the line ‘ youtube.com’ to redirect YouTube requests back to your Mac, effectively blocking it.

Access your router’s admin settings and look for a URL filter or parental controls section where you can enter ‘youtube.com’ to block it network-wide.

Extensions like StayFocusd or WasteNoTime can be added to browsers to limit or block time on YouTube.

Go to System Preferences, click Screen Time, and then App Limits. Add YouTube to the list and set the desired amount of time allowed or block it entirely.

Yes, by setting up a custom access schedule through your Network Preferences that denies access to YouTube URL during certain times.

Editing the hosts file as previously mentioned will block YouTube on all browsers. Alternatively, use a Multi-browser extension designed to work across different browsers.

Reverse the changes you made, whether it’s adjusting the Screen Time settings, deleting the line from your hosts file, or pausing the third-party app or extension’s block.