How To Enforce Google SafeSearch With SafeSquid Proxy Server
How To Enforce Google SafeSearch With SafeSquid Proxy ServerGoogle offers users with an option to filter out results that contain explicit sexual content, called SafeSearch. If enabled, is does not allow users to search of words that may display results that contain explicit sexual content. For example, if a user tries to search for words like porn, boobs, etc., the resulting page says - The word "porn"
has been filtered from the search because Google SafeSearch is active. It also displays a warning message with search results identified as sites that may install malicious software on your computer. For example, a search for rus.freeddls.com displays this warning message along with result for the site - This site may harm your computer. When the user still clicks on the link to visit the website, he is shown a full page warning that suggests that the user should pick another result, or continue at his own risk. This page also has a link to a diagnostic page with detailed information about the problem they found with the site. You can enforce Google SafeSearch with SafeSquid, so that it overrides the user preferences, and displays only SafeSearch results. This can be done by simply appending the string &safe=active to the google search URLs, if they do not already contain the string. The rule snippet that enforces Google SafeSearch, is available for download from the Sample rules section of SafeSquid Downloads page. You can directly import this rule snippet into your existing SafeSquid configuration file - config.xml. To import the rule snippet, click on Load settings in the Top Menu of the SafeSquid Interface. This will display 2 options - Filename and Overwrite. In the Filename option, type the URL - http://username:password@downloads.safesquid.net/free/general/sample_rules/safesearch.xml Replace username:password in the URL with your SafeSquid Forum username and password. Change the Overwrite option to No and click on Submit. You should get the message saying File loaded. Confirm that the rules have been imported into you configuration file by searching for any word in Google. The resulting page should show Google SafeSearch is ON just below the search box. If it does, click on Save setting in the SafeSquid Interface to make the changes permanent. This is how SafeSquid overrides user preferences and enforces SafeSearch: Go to Config => Profiles section and scroll down to the bottom of the page. You will find these 2 new rules in this section -
The above rule adds the profiles GOOGLE_SEARCH and UNSAFE_GOOGLE_SEARCH to requests that are made for any google domain (google.com, google.co.in, etc.) and if the file part of the URL contains strings /custom? or /search? or /images?
This rule 'removes' the profile UNSAFE_GOOGLE_SEARCH from requests for google queries, that already have the string &safe=active in the URL. This leaves only queries with SafeSeach not enabled, carrying the profile UNSAFE_GOOGLE_SEARCH. Next, go to Config => URL
redirecting section.
The above rule simply appends the string &safe=active
to the URLs carring the profile UNSAFE_GOOGLE_SEARCH. Also see:
|



![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)



Recent comments
2 hours 18 min ago
7 hours 44 min ago
8 hours 46 min ago
9 hours 33 min ago
11 hours 39 min ago
11 hours 48 min ago
14 hours 19 min ago
15 hours 8 min ago
17 hours 45 min ago
18 hours 10 min ago