DEV Community

Liza Bhadana
Liza Bhadana

Posted on Fully Autonomous

How to block YouTube on a PC while studying: 3 ways compared

Short answer: a YouTube block on a Windows PC can live in three places. On the account (Microsoft Family Safety's blocked sites, set by a parent, enforced in Edge), in the browser (a blocker extension, which sees URLs but only in its own browser), or at the window level (an app that reads the title of the window in front, across every browser). SeaSweep takes the third route: SeaSweep is a free study-focus app for Windows that closes the apps and browser tabs you choose to block until your study session ends; each session is a voyage along a real sea route.

"How to block YouTube on PC while studying" has no clear winner in search, and the People Also Ask box asks the same thing three ways. The useful framing for developers is: where does the block live, and what can it see from there?

What can an account-level filter see?

Microsoft Family Safety's web filter is managed by the family organizer for a family member. From Microsoft's support page:

  • specific sites are blocked by adding them under Blocked sites;
  • the filters "only work in the supported browsers", currently Edge;
  • "when this setting is on, unsupported browsers are blocked so that filtering cannot be bypassed."

Sees: full URLs, in Edge. Strength: always on, and other browsers are shut out. Leak: it is a parent's tool on a child's account; a student cannot use it to block YouTube on their own laptop for 45 minutes.

What can a browser extension see?

An extension runs inside one browser and sees every URL it loads.

Sees: exact URLs, so youtube.com and nothing else. Strength: precise, and can run on a schedule. Leak: a second browser on the same PC is not covered.

What can a window-title watcher see?

Only what Windows exposes about the window in front: the process name and the window title. Browsers put the active tab's title in the window title, and YouTube's pages end their titles with "YouTube". That is enough. Here is SeaSweep's matching logic (Task Manager and Settings guards omitted):

static (String, String, _CloseHow)? _match(_Window w) {
  final exe = w.exe, title = w.title.toLowerCase();
  // Sources' study sites stay open during a voyage, even if the browser itself is docked
  if (_browsers.contains(exe) && _studySites.any(title.contains)) return null;
  for (final r in _rules) {
    if (r.exe != null && exe == r.exe) return (r.label, 'docked', _CloseHow.window);
    if (r.site != null && _browsers.contains(exe) && title.contains(r.site!)) return (r.label, 'docked', _CloseHow.tab);
  }
  return null;
}
Enter fullscreen mode Exit fullscreen mode

The YouTube rule is just DockRule('YouTube', site: 'youtube'), and YouTube is in the default docked set. _browsers covers Chrome, Edge, Firefox, Brave, Opera, Vivaldi and Arc. A match shows a "YouTube is locked" screen, then sends Ctrl+W to close that tab. The check runs every 0.7 s, during a voyage only.

Sees: the front window's title, in any listed browser. Strength: one rule covers every browser; no extension or account needed. Leaks: a background tab is only caught when it comes to the front; a YouTube video embedded inside another site is not caught (its window title does not say YouTube); a site whose title lacks the word slips through.

How do the three compare?

Account filter Extension Window title
Who sets it parent user user
Browsers covered Edge (others blocked) one all listed
Sees URL URL title of front window
When active always always or scheduled during a study voyage
Main leak not self-serve other browsers embeds, background tabs

Why choose the weakest signal on purpose?

Because the goal is different. SeaSweep is a commitment device for a student who wants to study, not a lock for a device someone else controls. Reading titles needs no extension in every browser and no parent account, and the student picks exactly what is docked. Precision is traded for coverage and consent.

FAQ

How do I block YouTube on my PC while studying?
Family Safety's blocked sites (parent-managed, Edge), a blocker extension in your browser, or a study app that closes YouTube tabs during a session.

Can I block YouTube in every browser at once?
Family Safety blocks unsupported browsers when filtering is on; a window-title watcher such as SeaSweep checks every listed browser during a voyage.

Does SeaSweep block YouTube permanently?
No. Only during a voyage of 5 to 180 minutes that the student starts.

Summary

  • Account level = always on, URL-precise, parent-managed.
  • Browser level = URL-precise, one browser.
  • Window level = every browser, title-based, session-only. That is SeaSweep's choice, made for self-chosen study blocks.

Try it: SeaSweep on the Microsoft Store (free, no ads, Windows, Store ID 9N3F281GJT5T).

Source for Family Safety: Microsoft Support, "Filter websites and searches using Microsoft Family Safety", read 19 November 2026.


SeaSweep is made by a 5 Gyres Ambassador and supports the 5 Gyres Institute and Save The Beach. @5gyres #5GyresAmbassador.

Top comments (0)