webfilteringdatabase.com
Home Find Your Solution
Features
Domain Categorization API Real-Time Classification 59 Filtering Categories Offline Database (120M) Managed DNS Filter ML Classification Content Classification
Industries
K-12 Schools Corporate Healthcare Government ISPs
Tools
Domain Lookup Bulk Categorization Category Explorer
Resources
Pricing API Documentation Login / Sign Up

How to Block YouTube on Your Network, or Enforce Restricted Mode

YouTube is both a distraction and a teaching tool. This guide starts with the choice most admins face, then shows how to apply either policy on DNS filters, firewalls, Intune, Google Admin and phones.

Path A: Full block

  • Nothing on YouTube loads, including embeds.
  • Best for kiosks, retail tills, call centres and low bandwidth sites.
  • Jump to the full block methods.

Path B: Restricted Mode

  • YouTube works, mature videos and comments are hidden.
  • Best for schools, libraries and training heavy workplaces.
  • Jump to Restricted Mode enforcement.

Why organisations block or restrict YouTube

YouTube is one of the largest sources of traffic on most networks. The reasons to control it are practical, and they decide which path fits.

Bandwidth

High definition video on many devices at once can saturate a school or branch office link, slowing cloud apps for everyone.

Mature content

Schools and libraries need to limit videos that are unsuitable for minors, which is what Restricted Mode is built for.

Focus

Recommendations and autoplay pull people from task to task. Shift based workplaces often block it outright.

Learning value

Lessons, tutorials and vendor training live on YouTube. That is why so many policies restrict rather than block.

Restricted Mode is a filter built into YouTube. It works well as a baseline, but it is not perfect, so many schools also block specific channels or videos and keep a category filter for the rest of the web.

Whichever path you choose, write it into your acceptable use policy with the user groups it applies to. A written rule makes exception requests easier to judge and helps the next administrator understand why YouTube behaves the way it does.

Verified YouTube domains

These hostnames and domains are used by YouTube on the web, in apps and in embeds. Google changes its delivery setup over time, so pair the list with a category based rule.

Domain or hostnameUsed forFull blockRestricted Mode
youtube.comWebsite, mobile site, music and studio pagesBlock with subdomainsRemap www and m only
youtu.beShort share linksBlockLeave alone
ytimg.comThumbnails and page imagesBlockLeave alone
googlevideo.comThe video streams themselvesBlock, this stops playbackLeave alone
youtube-nocookie.comPrivacy enhanced embeds on other sitesBlockRemap www
youtubei.googleapis.comApp and player APIBlock this hostname onlyRemap
youtube.googleapis.comOlder API endpoint used by some clientsBlock this hostname onlyRemap
youtubekids.comYouTube KidsYour choiceNot affected

Never block googleapis.com as a whole. Gmail, Drive, Maps, Classroom and many third party apps depend on it. Only block or remap the YouTube hostnames listed above.

Look up any hostname from your firewall logs in our domain lookup tool to see its categories before adding it to a rule.

Path B: enforce YouTube Restricted Mode

There are two strengths of Restricted Mode, plus the option of leaving it off. Pick one per user group, then choose an enforcement method below.

Lightest

Moderate

  • Hides a smaller set of mature videos.
  • Comments remain hidden.
  • Common for staff and older students.
Stricter

Strict

  • Hides a larger set of videos.
  • Comments are hidden.
  • Common for primary and middle schools.
Tightest

Strict plus approved videos

  • Workspace users only see allowed or approved content.
  • Teachers or approvers can approve specific videos.
  • Set in the Google Admin console for the account.

Method 1: DNS remapping for the whole network

Your resolver answers the YouTube hostnames with a CNAME to Google's restricted endpoint. Every device that uses your DNS gets Restricted Mode, signed in or not.

www.youtube.com CNAME restrict.youtube.com m.youtube.com CNAME restrict.youtube.com youtubei.googleapis.com CNAME restrict.youtube.com youtube.googleapis.com CNAME restrict.youtube.com www.youtube-nocookie.com CNAME restrict.youtube.com (use restrictmoderate.youtube.com instead for Moderate)

Because the change happens in DNS, it also covers smart TVs, games consoles and visitors' phones on your Wi-Fi, which browser policies never reach. Most DNS filters have a single switch for this. On a self hosted resolver, create the records as local overrides. Check the current hostnames in Google's admin help before rolling out, as they can change.

Know the limits before you rely on it

Automated filteringRestricted Mode relies on signals such as titles, descriptions and age restrictions. Some unsuitable videos get through, and some harmless ones are hidden.
Comments disappearComment sections are hidden in both strengths, which some teachers notice when using video for discussion.
Only YouTubeIt does nothing for other video sites, so keep a Streaming Media category policy for the rest of the web.

Method 2: managed browser policy

Chromebooks

Google Admin console

  • In Chrome settings for users and browsers, find the YouTube Restricted Mode setting under content.
  • Choose moderate or strict for each organizational unit.
  • Applies to Chrome on managed Chromebooks and enrolled browsers.
Windows

Intune for Edge and Chrome

  • Use the settings catalog to set the force YouTube restrict policy for Edge and for Chrome.
  • Scope to the right device or user groups.
  • Covers browsers only, so combine with DNS for other apps.

Method 3: Google Workspace account settings

For signed in Workspace users, the Admin console has YouTube settings under additional Google services. You can set strict or moderate access per organizational unit, and allow staff to approve videos for students.

Method 4: proxy header injection

A web proxy or firewall with TLS inspection can add the YouTube-Restrict header with the value Strict or Moderate to YouTube requests. This suits networks that already inspect TLS for other reasons.

MethodCovers guestsCovers off siteCovers mobile appsNeeds TLS inspection
DNS remappingYesNoYes, on your Wi-FiNo
Browser policyNoYesNoNo
Workspace settingsNoYes, when signed inYes, when signed inNo
Header injectionYesNoPartlyYes

Path A: block YouTube completely

A full block needs the domain set from the table, applied at the network and on managed devices. These are the methods, in the order most teams roll them out.

Network wide

DNS filter

  1. Enable the Streaming Media category, or add youtube.com, youtu.be, ytimg.com, googlevideo.com and youtube-nocookie.com with subdomain matching.
  2. Add the two YouTube hostnames under googleapis.com as exact entries.
  3. Serve the resolver via DHCP on every network in scope.
Building exit

Firewall

  1. Block the YouTube application or the streaming media URL category for in scope networks.
  2. Force DNS to your resolver and block DNS over TLS on port 853.
  3. Block QUIC on UDP 443, since YouTube relies heavily on it and it hides traffic from older inspection engines.
Small office

Router

  1. Add the domains to the router's blocked sites list, or use keyword blocking for "youtube" and "googlevideo".
  2. Apply to all clients or on a schedule.
  3. Expect bypass via VPN or custom DNS.
Windows

Intune

  • A settings catalog policy for Edge and Chrome with the YouTube domains on the URL block list.
  • Scope it to the device groups in the policy.
  • Configure every browser you allow, since the block only covers browsers you manage.
Chromebooks

Google Admin

  • Add the YouTube domains to Blocked URLs for the organizational unit.
  • Block the YouTube Android app under Apps and extensions.
  • In Workspace settings, you can also turn off YouTube for the account.
Phones

MDM

  • Supervised Apple devices: hide or block the YouTube app and add domains to the web content filter.
  • Android Enterprise: YouTube is often preinstalled; disable it as a system app on fully managed devices where your MDM allows.
  • Block VPN apps on owned phones if required.

Middle ground options between block and Restricted Mode

Some networks need more control than Restricted Mode but cannot lose YouTube entirely. These options sit between the two paths and can be combined.

Shape, do not block

Bandwidth limits

  • Cap the YouTube application to a share of the link with firewall traffic shaping.
  • Video drops to lower resolution instead of failing.
  • Good for branch offices where training video is needed but not in HD.
Teach with it

Approved videos only

  • Workspace accounts in strict mode see approved content only.
  • Teachers approve the videos they need for lessons.
  • Students cannot browse the wider catalogue.
Time based

Scheduled access

  • Full block during lessons or shifts, Restricted Mode at lunch.
  • Set with scheduled rules on the DNS filter or firewall.
  • Document the schedule so support staff can explain it.

Different user groups often land on different options. A common school pattern is approved videos only for younger pupils, strict Restricted Mode for older students, moderate for staff, and a full block on the guest network.

YouTube app vs browser

The YouTube app on phones, smart TVs and tablets behaves differently from youtube.com in a browser. Plan for each surface you need to cover.

SurfaceFull block behaviourRestricted Mode behaviourBest control
Browser on laptopBlock page or connection errorDNS remap or browser policy both workDNS filter plus browser policy
Mobile app on Wi-FiSpinning loader, no playbackDNS remap applies to the appDNS filter plus firewall app control
Mobile app on cellularNetwork rules do not applyOnly account settings applyMDM, or Workspace settings for signed in users
Smart TVs and meeting room screensBlocked by DNS and firewallDNS remap appliesSeparate VLAN with its own policy
Embedded videosEmpty player frameRestricted where nocookie host is remappedInclude youtube-nocookie.com

VPN, proxy and alternative front ends

Students and staff who want around a YouTube block tend to try three things: a VPN, a web proxy, or a third party front end that replays YouTube video. Each has a counter.

  1. VPN apps and services. Block the VPN / Proxy / Anonymizers category on DNS and firewall, use VPN application detection, and block VPN apps through MDM.
  2. Web proxies. These appear constantly under new names. A daily refreshed category is the only practical defence, since lists go stale within days.
  3. Alternative front ends. Some sites relay YouTube content through their own servers. They are usually categorized as proxies or streaming, so category blocks catch most of them.
  4. Encrypted DNS. Disable secure DNS in managed Chrome and Edge, return no result for use-application-dns.net for Firefox, and allow DNS only to your resolver.
  5. Private Relay. Return no result for mask.icloud.com and mask-h2.icloud.com so Apple devices fall back to your network's DNS.

See our VPN and proxy category for what it covers. Gaming streams are a related gap: if YouTube is blocked, students often switch to live streaming platforms, so consider our guide to blocking Twitch at the same time.

How to test your YouTube policy

Testing differs by path. For a full block you check that nothing loads. For Restricted Mode you check that YouTube loads with the filter switched on and locked.

Path A

Full block tests

  1. Run nslookup for www.youtube.com and a googlevideo.com host: expect a block answer.
  2. Open youtube.com in a private window: block page or refused.
  3. Open a news article with an embedded video: empty frame.
  4. Open the app on Wi-Fi and on mobile data on a managed phone.
  5. Set a public resolver on a test laptop and retry.
Path B

Restricted Mode tests

  1. Run nslookup for www.youtube.com: the answer should be a CNAME to the restrict hostname.
  2. Open YouTube signed out, open the account menu: Restricted Mode shows as on and locked.
  3. Open a video with comments: comments are hidden.
  4. Test the app on Wi-Fi the same way.
  5. Test a signed in student account off site to confirm the Workspace setting.

Clear DNS caches between tests with ipconfig /flushdns on Windows, or by toggling Wi-Fi on phones. Browsers keep their own DNS cache too, so close and reopen them.

Category based blocking for video and streaming

YouTube is one site. Streaming Media is thousands of them, with new video hosts, mirrors and relay sites registered every day. Category data keeps a video policy complete without manual list work.

120Mcategorized domains
20Mtop domains covering 99.99% of web traffic
~300knew domains categorized daily
59web filtering categories

YouTube sits in our Streaming Media category, with ranked secondary categories for its community features. Many schools pair a Streaming Media policy with blocks on Social Networking. Our knowledge base article on streaming classification explains how video sites are told apart.

Vendors

Build it into your product

Firewall, secure web gateway, DNS filter and edtech vendors license the database as files that run in their own systems, with a lookup API included.

Schools

Plan the K-12 policy

See K-12 school web filtering for how districts combine Restricted Mode with category filtering across Chromebooks and campus networks.

YouTube blocking FAQ

Should I block YouTube or use Restricted Mode?

Schools and many workplaces use Restricted Mode, because YouTube hosts a lot of teaching and training video. A full block suits networks where video is not needed at all, such as point of sale, kiosks or bandwidth constrained sites.

How do I force YouTube Restricted Mode for the whole network?

Point the YouTube hostnames www.youtube.com, m.youtube.com, youtubei.googleapis.com, youtube.googleapis.com and www.youtube-nocookie.com to restrict.youtube.com or restrictmoderate.youtube.com in your DNS. On managed Chrome and Edge you can also enforce it with browser policy.

Does blocking youtube.com break Google services?

Blocking youtube.com, youtu.be, ytimg.com and googlevideo.com does not affect Gmail, Drive or Search. Do not block googleapis.com as a whole, because many Google services depend on it. Block only the specific YouTube hostnames under it.

Why do embedded YouTube videos still play?

Embeds often load from youtube-nocookie.com and stream from googlevideo.com. Add both to a full block, or include youtube-nocookie.com in your Restricted Mode DNS entries.

Which category is YouTube in?

YouTube is in Streaming Media in our web filtering database, with secondary categories describing its community features.

Can students turn Restricted Mode off?

Not when it is enforced by DNS, browser policy or Workspace settings. The toggle in the account menu shows as locked. If a student can switch it off, the device is not using your resolver or policy, which is worth investigating.

Is Restricted Mode enough for CIPA compliance?

Restricted Mode is a useful layer for video, but CIPA asks for a technology protection measure across internet access on computers used by minors. Schools combine it with a category filter for the rest of the web and check the current FCC guidance.

Does Restricted Mode affect YouTube Music or YouTube Kids?

YouTube Kids is a separate service with its own settings and domain. Check the current Google admin help for how Restricted Mode applies to music content, because behaviour has changed over time.

Category data for video and streaming policies

License 120 million categorized domains with daily updates for your filter, firewall or MSP platform. Starter database tiers from $999; enterprise and OEM licences are quoted per deployment.

License the database

YouTube, YouTube Kids, Google, Google Workspace, Chrome, Chromebook and Gmail are trademarks of Google LLC. Microsoft, Intune and Edge are trademarks of Microsoft Corporation. Apple and iCloud are trademarks of Apple Inc. Firefox is a trademark of the Mozilla Foundation.

These names are used here only to identify the products discussed. Web Filtering Database is not affiliated with, sponsored or endorsed by any of these companies.