how to block youtube on a computer: mac, windows, browser

To block YouTube on a computer, you can use built-in parental controls, browser extensions, or edit your hosts file for a stronger block. Methods differ for Mac, Windows, and browsers, but there’s a solution for every setup. This guide explains each option with clear steps and practical advice.
To block YouTube on a computer, use parental controls like Screen Time on Mac or Family Safety on Windows, install browser extensions such as BlockSite, or edit your system’s hosts file to redirect youtube.com. Each method limits YouTube access and helps reduce distractions across devices and browsers.
key takeaways
- Blocking YouTube on a computer can be done with parental controls, browser extensions, or hosts file edits.
- Mac users can use Screen Time, while Windows users can set up Microsoft Family Safety.
- Browser extensions offer flexible blocking for Chrome, Firefox, and Edge.
- Editing the hosts file is a system-wide solution that blocks YouTube on all browsers.
common reasons for blocking youtube on a computer
YouTube is one of the most visited websites in the world, used for everything from education to entertainment. However, it can quickly become a major source of distraction, especially during work or study hours. Many people look for ways to block YouTube on their computers to improve focus and productivity.
Parents may also want to restrict YouTube access to shield children from unsuitable content or limit screen time. According to DataReportal, the average internet user spends 2 hours and 21 minutes on social media daily, with YouTube often a significant part of that time. Blocking the platform, even temporarily, can help create healthier digital routines.
It’s not just about productivity—some workplaces or schools block YouTube to reduce bandwidth usage or keep users on task. Whether you’re aiming to cut distractions, support a child’s wellbeing, or enforce company policy, there are several ways to block YouTube on a computer.
- Improve concentration during work or study
- Reduce screen time for children or teens
- Enforce company or school internet policies
- Limit exposure to unsuitable content
using parental controls on mac and windows
Both macOS and Windows come with built-in parental control tools that can block or limit access to specific websites like YouTube. On a Mac, Screen Time lets you add website restrictions for any user account. Windows users can achieve similar results with Microsoft Family Safety.
For Mac: Open System Settings > Screen Time > Content & Privacy > Content Restrictions. Under 'Web Content', add youtube.com to the 'Restricted' list. For Windows: Sign in to your Microsoft account at family.microsoft.com, select your child’s profile, then add YouTube to the blocked sites list. These controls are password-protected, so only you can change the settings.
Using parental controls is a reliable way to block YouTube across all browsers for a given user. If you’re looking for a solution that goes beyond browser extensions, this is often the best choice. Some users also find it helpful to combine parental controls with tools like Pauza, which reward time spent off distracting sites.

blocking youtube with browser extensions
Browser extensions are a straightforward way to block YouTube if you mainly use one browser. Popular choices like BlockSite (available for Chrome, Firefox, and Edge) let you add youtube.com to a block list and set schedules or temporary blocks.
To get started, open your browser’s extension store and search for a site blocker. Install your chosen extension, then look for the settings or options menu. Add YouTube (and any alternate YouTube URLs, like m.youtube.com or youtube-nocookie.com) to the blocked sites list. Many extensions also allow you to set a password to prevent easy disabling.
Browser extensions are flexible and easy to use, but they only work in the browser they’re installed on. If you use several browsers or want to block YouTube system-wide, consider editing your computer’s hosts file or using built-in parental controls instead.
- Open your browser’s extension/add-on store.
- Search for and install a blocker like BlockSite.
- Open the extension’s settings.
- Add youtube.com and related URLs to the block list.
- Set a schedule or password if desired.
editing your hosts file for a system-wide block
Editing your computer’s hosts file is a powerful way to block YouTube across all browsers and accounts. The hosts file lets you redirect specific websites to a different IP address—usually your local machine—so they can’t load.
On Mac: Open Terminal and type 'sudo nano /etc/hosts'. On Windows: Open Notepad as an administrator and open C:\Windows\System32\drivers\etc\hosts. Add these lines to the bottom of the file: '127.0.0.1 youtube.com' and '127.0.0.1 www.youtube.com'. Save the file and restart your computer or flush your DNS cache.
This method is more technical and requires admin access. It’s harder to bypass than browser extensions, but it’s not foolproof—tech-savvy users can reverse it. For many, though, it’s an effective system-wide solution that supports a focused digital environment.
combining app limits and focus tools for better results
Blocking YouTube is just one step in managing screen time and online habits. Combining blocks with app limits, scheduled breaks, and mindfulness tools creates a more balanced approach. Digital wellbeing apps can help you track time spent online, build streaks, or challenge yourself and friends to cut back.
On Mac, you can use Screen Time to set daily time limits for YouTube or other distracting websites. Windows users can do the same with Microsoft Family Safety. For added motivation, some people use a screen time calculator to see how their usage compares to the average screen time reported by DataReportal—2 hours and 21 minutes on social media per day.
Apps like Pauza for iPhone take a positive approach: instead of just blocking, they reward you for every minute spent away from social media. While Pauza is currently for iPhone, combining these strategies across devices makes it easier to maintain focus and build healthier digital habits.
- Set daily app or site time limits
- Schedule device-free breaks
- Use wellbeing apps to track progress
- Challenge friends to reduce screen time together
what to do when blocks aren’t enough
Sometimes, blocking YouTube isn’t enough—especially if you find workarounds or rely on the platform for certain tasks. In these cases, it helps to look at why you want to limit YouTube and what triggers the urge to browse. Consider replacing the habit with something more intentional, like a walk or a short offline activity.
If you need YouTube for school or work but want to avoid distractions, try using browser extensions that block only the homepage or recommendations, rather than the entire site. Tools like LeechBlock (for Firefox) and StayFocusd (for Chrome) let you customize which parts of YouTube are accessible.
Finally, remember that digital habits take time to change. Regularly reviewing your screen time statistics, adjusting your blocks, and experimenting with different strategies can help you find what works best for you.
by the numbers
- The average internet user spends 2 hours and 21 minutes on social media every day.— DataReportal, Digital 2025
Ready to cut back on digital distractions? Try Pauza on your iPhone for a gentle, positive way to build better screen habits—no blocking required.
Get Pauza on iPhone
frequently asked questions
Can I block YouTube on just one browser without affecting others?
Yes, using browser extensions like BlockSite or StayFocusd will block YouTube only in the browser where the extension is installed. Other browsers remain unaffected unless you set up blocks in each one.
Is editing the hosts file safe?
Editing the hosts file is generally safe if you follow instructions carefully. Always make a backup before you change anything, and remember that admin access is required. Incorrect changes can affect your ability to access some websites.
Can I set a schedule for when YouTube is blocked?
Most browser extensions and parental control tools allow you to schedule blocking times. For example, you can block YouTube during working hours or study periods and allow access at other times.
Will blocking YouTube affect related services like YouTube Music?
If you block all YouTube domains (youtube.com, music.youtube.com, etc.), related services will also be inaccessible. You can choose to block only specific URLs if you want to leave certain features available.
How do I unblock YouTube if I need access again?
To unblock YouTube, reverse the steps you took: remove the site from blocked lists, parental controls, or the hosts file, and restart your browser or computer as needed. Remember to keep your settings secure if you’re blocking YouTube for someone else.
Are there any risks to using browser extensions to block sites?
Most well-known extensions are safe, but always check reviews and permissions before installing. Avoid extensions that request unnecessary access or seem suspicious, as these can compromise your privacy.
free tools
- screen time calculator — see what your daily hours add up to over a year
- average screen time statistics — how your usage compares to the latest data
- phone habit test — a 2-minute check of your phone habits


