Search engines offer SafeSearch settings, but users can turn them off. This guide shows you how to enforce SafeSearch at the DNS and network level so it cannot be disabled, covering Google, Bing, and YouTube Restricted Mode.
Learn About PricingAll major search engines offer SafeSearch features that filter explicit content from search results. Google has SafeSearch, Bing has Safe Search, and YouTube offers Restricted Mode. The problem is that these settings are user-controlled by default, meaning anyone can simply turn them off.
DNS-level enforcement solves this problem. By mapping search engine domains to their dedicated safe VIP addresses, all requests from your network are forced through the safe version of the search engine, regardless of what the user has configured in their browser or account settings.
There are two primary methods to enforce SafeSearch:
CleanBrowsing automates this entirely. On paid plans, SafeSearch enforcement for Google, Bing, YouTube, DuckDuckGo, and other search engines is handled automatically at the DNS level. No hosts file editing or router configuration is needed. The free Family filter also enforces SafeSearch by default.
Google provides a special VIP address that forces SafeSearch on all Google Search requests. By mapping Google domains to this IP, every search query on your network will have SafeSearch enabled and users cannot disable it.
Edit your hosts file and add the following entries. The hosts file location depends on your operating system:
Add these lines to the file:
You should add entries for every Google country variant your users might access. Google maintains dozens of country-specific domains (google.co.jp, google.it, google.nl, etc.) and each one needs to be mapped individually.
If your router supports DNS overrides or static host entries, you can add the same mappings at the router level. This protects every device on the network without needing to edit hosts files on each device. Check your router's DNS or DHCP settings for a "static hosts" or "DNS mapping" option.
Learn more: Configure Google SafeSearch
Bing provides its own safe VIP address for forcing Safe Search on all Bing queries. The process is identical to Google: map Bing domains to the safe IP using either the hosts file or router DNS mapping.
Add the following entries to your hosts file or router DNS mapping:
The same two methods apply here:
Learn more: Configure Bing SafeSearch
YouTube offers two levels of Restricted Mode enforcement via DNS mapping. Unlike Google and Bing where there is a single safe VIP, YouTube provides two options depending on the level of restriction you need.
| Mode | VIP Address | Recommended For |
|---|---|---|
| Strict | 216.239.38.120 | Children under 12, schools, libraries |
| Moderate | 216.239.38.119 | Teens and general audiences |
Map the following YouTube domains to your chosen VIP address. This example uses the Strict mode VIP (216.239.38.120):
For Moderate mode, replace 216.239.38.120 with 216.239.38.119 in the entries above.
Important: The youtubei.googleapis.com and youtube.googleapis.com domains are used by the YouTube mobile app and embedded players. If you skip these, the YouTube app on phones and tablets may bypass Restricted Mode.
CleanBrowsing enforces YouTube Restricted Mode automatically on all paid plans and the free Family filter. No manual configuration is needed when using CleanBrowsing DNS.
Learn more: Enforce YouTube Restricted Mode