DuckDuckGo Safe Search



  • Good morning.

    I'm trying to set up pfSense to automatically use DuckDuckGo's Safe Search whenever a user accesses the DuckDuckGo search engine. According to DuckDuckGo's page, there are a couple of ways of doing this:

    https://duck.co/help/features/safe-search

    If you wanted to force safe search on (or off) you could use our URL parameters and automatically append &kp=1 (strict), &kp=-1 (moderate - don't show explicit images), or &kp=-2 (off) to all duckduckgo.com pages. You could also use safe.duckduckgo.com. Searches from safe.duckduckgo.com always have safe search enabled.

    I've been able to use DNS Resolver to redirect Google/Bing/Yahoo search engines to safe search pointing them to the "safe" ip address. However, DuckDuckGo seems to use the same ip address for both regular search and safe search.

    My question is this: how can I append the parameter &kp=1 or &kp=-1 to the url automatically? Or, how can I redirect to safe.duckduckgo.com when a user enters the url for the search engine?

    Thanks for your help in advance.


  • Netgate Administrator

    You could add that as a rewrite rule in Squidguard if you run the web proxy.

    Steve



  • Hi Steve.

    Thanks for your reply. To be honest, I might need some help with this one as I didn't get the redirect settings in SquidGuard to work.

    I am able to get SquidGuard to block unwanted sites (e.g. ad sites, porn sites, etc.); but, for some reason, the "Use SafeSearch engine" checkbox never worked for me - I had to add a couple of entries in DNS Resolver to force safe search for Google and Bing. When I remove those DNS Resolver entries, uncheck the "Use SafeSearch engine" box and try to create my own "Safe Search" rewrite, it doesn't work.

    E.g.:

    Rewrite Rules:

    Target URL: google.com
    Replace to URL: forcesafesearch.google.com
    Opt: Redirect

    For some reason, this causes the URL to become forcesafesearch.google.com to be forcesafesearch.forcesafesearch.google.com. If I try using the IP address, the system comes back with www.<ip address>.

    To say I'm doing something wrong would be an understatement. I apologize for my lack of knowledge, but I'm still learning and any suggestions you can provide would be greatly appreciated.

    Thank you.


Log in to reply