I'm pretty sure there's a way to force enable Google Safe Search by editing a hosts file on my kids' Mac. Can someone tell me how?

I'm guessing I need to sudo nano /etc/hosts

According to How to: Enforcing Google SafeSearch I should use: www.google.com #forcesafesearch

Is that enough?


That's definitely one way of doing it, but it isn't all that secure. All that's happening here is that your operating system is mapping www.google.com to the IP address you've specified in the hosts file, rather than what it receives from the DNS server. So, if your kid goes to www.google.co.uk instead of .com the hosts file won't override the request, and safe search won't get forced.

You can probably do it from a browser or Google Account level instead of the Operating System. Google provide lots of help on the subject:

See the bit about SafeSearch lock:

SafeSearch Lock

If you’re worried about others changing the Strict SafeSearch setting without your knowledge, you can protect it with a password using SafeSearch Lock. Once locked, the Google search results page will be visibly different to indicate that SafeSearch is locked.

Even from across the room, the colored balls give parents and teachers a clear visual cue that SafeSearch is still locked. And if you don’t see them, it’s quick and easy to verify and re-lock SafeSearch.

Learn how to activate SafeSearch lock

Disabling Incognito Mode

Incognito Mode renders the above useless, but you could always disable Incognito Mode completely.

On OS X, perform the following steps:

  1. Close Chrome
  2. Navigate to ~/Library/Preferences
  3. In the folder, you'll find a file called com.google.Chrome.plist
  4. Open it in a text editor of your choice
  5. Add the following lines into the file between the <dict> tags:

    <key>IncognitoModeAvailability</key> <integer>1</integer>

    For reference, 0 = enabled, 1 = disabled, 2 = forced.

  6. Save the file

  7. Restart Chrome. You should notice there is no option to open a new incognito window. If not, you may need to do a full system restart.
  • I just tried that ... but all you have to do for an un-safe search is open an incognito window. Not very strong. – Dan Nov 25 '15 at 10:15
  • 1
    Updated the answer with a work around. – D. Knight Nov 25 '15 at 10:55
  • That's great, thanks! But now ... is there a way to do the same for Safari? Disable "private browsing"? – Dan Nov 25 '15 at 12:21
  • 1
    You could always simply stop the user from being able to open Safari at all? Open your applications folder, find the Safari app icon, right-click and select Get Info... (or use the command + i shortcut with the icon highlighted). Then, using the permissions section at the bottom restrict which users will have access to this specific application. – D. Knight Nov 25 '15 at 12:29
  • I ended up installing Qustodio ... seems to work well. – Dan Nov 26 '15 at 15:11

I did it with Squid and Squidguard. Add the safe parameter to the URI. All computers in the house got their DNS and web proxy from that server.

Even this can be defeated by using https to go to a proxy that serves the pages for you. Then "google" is only in the encrypted packets, not in the URI that your local system sees.

You can block known proxies, but new ones are frequently created. And Tor Browser can run from a USB drive.

How sophisticated are the kid's tech skills? Are they actually trying to bypass filters? If the answers are "very" and "yes" then you can disconnect internet completely and they'll still do it by going to a friend's house.

  • Wow, that looks complicated. I install that on their Mac? Any 'easy' way? – Dan Nov 24 '15 at 22:24
  • Maybe the other method will work. Seems to me that any other method can be defeated by deleting cookies or going to a different search engine. – WGroleau Nov 27 '15 at 22:56

Even if you do force Googel safe search, it doesn't impact Bing, or Yahoo, or DuckDuckGo. Another consideration is to utilize the free services of OpenDNS. Simply create an account, enable the 'Family Shield' function, and then configure either the browsers or your router to use OpenDNS DNS servers.

You can restrict websites, content etc at the DNS server, so even if searched, the content cant be reached. OpenDNS has categories of things to be blocked (like nudes, etc) to make it easy.

I am not associated in any way with OpenDNS, just a happy user. And, all of this is (currently) free anyway.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .