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:
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:
- Close Chrome
- Navigate to
- In the folder, you'll find a file called
- Open it in a text editor of your choice
Add the following lines into the file between the
For reference, 0 = enabled, 1 = disabled, 2 = forced.
Save the file
- 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.