How to allow google search and block specific google search results

book

Article ID: 169865

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

This articles provides the solution on how to permit google search and to block certain google search results. Below is an example of a google search result that prompts the users to play a online game, for instance, if the users are in a corporate network and using the direct URL as below to open Solitaire game;


https://www.google.co.in/search?q=solitaire+game&rlz=1C1NHXL_enIN724IN724&oq=solitaire+game&aqs=chrome..69i57j0l5.848j0j7&sourceid=chrome&ie=UTF-8#clb=clb


This access cannot be blocked with a "url.domain" or "url.path" cpl script alone because if the path contains a "?", it is considered as a query.
 

Resolution

Consider applying a CPL script as below to achieve such a requirement.

<proxy>
url.domain=google.com url.path.exact="/search" url.query.regex="q\=soliatire\+game" Deny

Note: SSL interception must be turned on to get desired results.