Verify Safe Search Configuration via Command Line

Not sure if DNS-based Safe Search is working? Use these command-line checks to verify enforcement for Google, Bing, and YouTube on any device.

Step 1: How DNS-Based Safe Search Works

When Safe Search is enforced via DNS (as CleanBrowsing does), DNS lookups for search engines return special IP addresses or CNAME records that redirect to the safe/restricted version of the service.

For example, a lookup for www.google.com should return a CNAME pointing to forcesafesearch.google.com instead of the normal Google IP.

You can verify this using built-in command-line DNS tools on any operating system.

Step 2: Check on Windows (PowerShell)

Open PowerShell and run these commands:

Check Google Safe Search

Resolve-DnsName www.google.com | Select-Object Name, Type, IPAddress, NameHost

Check for CNAME redirect

Resolve-DnsName www.google.com -Type CNAME

Check Bing Safe Search

Resolve-DnsName www.bing.com | Select-Object Name, Type, IPAddress, NameHost

Check YouTube Restricted Mode

Resolve-DnsName www.youtube.com | Select-Object Name, Type, IPAddress, NameHost

Step 3: Check on macOS (Terminal)

Open Terminal and run:

Check Google Safe Search

dig www.google.com

Quick IP check

dig +short www.google.com

Check Bing Safe Search

dig +short www.bing.com

Check YouTube

dig +short www.youtube.com

Look for CNAME records in the ANSWER SECTION of the full dig output.

Step 4: Check on Linux (Terminal)

Use host or dig:

Using host

host www.google.com
host www.bing.com
host www.youtube.com

Using dig

dig +short www.google.com
dig +short www.bing.com

Step 5: Expected Results When Safe Search Is Active

If CleanBrowsing Safe Search enforcement is working, you should see these results:

Domain Expected Behavior IPs / CNAME
www.google.com CNAME to forcesafesearch.google.com 216.239.38.120, 216.239.38.119
www.bing.com CNAME to strict.bing.com 204.79.197.220
www.youtube.com CNAME to restrict.youtube.com 216.239.38.120, 216.239.38.119
Not seeing these results? Safe Search may be inactive. Check that your device is using CleanBrowsing DNS, and that no VPN or custom DNS settings are overriding it. See our Safe Search enforcement guide for setup instructions.

Related Guides

Enforce Safe Search

Set up DNS-based Safe Search enforcement for Google, Bing, and YouTube.

Clear DNS Cache

Flush your DNS cache to ensure new settings take effect.

Common Questions

Answers to frequently asked questions about CleanBrowsing.

Need Help?

Check our support hub or contact support.

Support Hub