Force kids device to Google SafeSearch and Safe Youtube

Leveraging Pi-Hole, you can force kids to redirect google search traffic to google safesearch, safe youtube and etc.

Here’s the script I use in Pi-Hole dnsmasq configuration.

Create a configuration under dnsmasq configuration folder.

host-record=forcesafesearch.google.com,216.239.38.120,2001:4860:4802:32::78
cname=google.com,www.google.com,forcesafesearch.google.com
cname=google.ad,www.google.ad,forcesafesearch.google.com
cname=google.ae,www.google.ae,forcesafesearch.google.com
cname=google.com.af,www.google.com.af,forcesafesearch.google.com
cname=google.com.ag,www.google.com.ag,forcesafesearch.google.com
cname=google.com.ai,www.google.com.ai,forcesafesearch.google.com
cname=google.al,www.google.al,forcesafesearch.google.com
cname=google.am,www.google.am,forcesafesearch.google.com
cname=google.co.ao,www.google.co.ao,forcesafesearch.google.com
cname=google.com.ar,www.google.com.ar,forcesafesearch.google.com
cname=google.as,www.google.as,forcesafesearch.google.com
cname=google.at,www.google.at,forcesafesearch.google.com
cname=google.com.au,www.google.com.au,forcesafesearch.google.com
cname=google.az,www.google.az,forcesafesearch.google.com
cname=google.ba,www.google.ba,forcesafesearch.google.com
cname=google.com.bd,www.google.com.bd,forcesafesearch.google.com
cname=google.be,www.google.be,forcesafesearch.google.com
cname=google.bf,www.google.bf,forcesafesearch.google.com
cname=google.bg,www.google.bg,forcesafesearch.google.com
cname=google.com.bh,www.google.com.bh,forcesafesearch.google.com
cname=google.bi,www.google.bi,forcesafesearch.google.com
cname=google.bj,www.google.bj,forcesafesearch.google.com
cname=google.com.bn,www.google.com.bn,forcesafesearch.google.com
cname=google.com.bo,www.google.com.bo,forcesafesearch.google.com
cname=google.com.br,www.google.com.br,forcesafesearch.google.com
cname=google.bs,www.google.bs,forcesafesearch.google.com
cname=google.bt,www.google.bt,forcesafesearch.google.com
cname=google.co.bw,www.google.co.bw,forcesafesearch.google.com
cname=google.by,www.google.by,forcesafesearch.google.com
cname=google.com.bz,www.google.com.bz,forcesafesearch.google.com
cname=google.ca,www.google.ca,forcesafesearch.google.com
cname=google.cd,www.google.cd,forcesafesearch.google.com
cname=google.cf,www.google.cf,forcesafesearch.google.com
cname=google.cg,www.google.cg,forcesafesearch.google.com
cname=google.ch,www.google.ch,forcesafesearch.google.com
cname=google.ci,www.google.ci,forcesafesearch.google.com
cname=google.co.ck,www.google.co.ck,forcesafesearch.google.com
cname=google.cl,www.google.cl,forcesafesearch.google.com
cname=google.cm,www.google.cm,forcesafesearch.google.com
cname=google.cn,www.google.cn,forcesafesearch.google.com
cname=google.com.co,www.google.com.co,forcesafesearch.google.com
cname=google.co.cr,www.google.co.cr,forcesafesearch.google.com
cname=google.com.cu,www.google.com.cu,forcesafesearch.google.com
cname=google.cv,www.google.cv,forcesafesearch.google.com
cname=google.com.cy,www.google.com.cy,forcesafesearch.google.com
cname=google.cz,www.google.cz,forcesafesearch.google.com
cname=google.de,www.google.de,forcesafesearch.google.com
cname=google.dj,www.google.dj,forcesafesearch.google.com
cname=google.dk,www.google.dk,forcesafesearch.google.com
cname=google.dm,www.google.dm,forcesafesearch.google.com
cname=google.com.do,www.google.com.do,forcesafesearch.google.com
cname=google.dz,www.google.dz,forcesafesearch.google.com
cname=google.com.ec,www.google.com.ec,forcesafesearch.google.com
cname=google.ee,www.google.ee,forcesafesearch.google.com
cname=google.com.eg,www.google.com.eg,forcesafesearch.google.com
cname=google.es,www.google.es,forcesafesearch.google.com
cname=google.com.et,www.google.com.et,forcesafesearch.google.com
cname=google.fi,www.google.fi,forcesafesearch.google.com
cname=google.com.fj,www.google.com.fj,forcesafesearch.google.com
cname=google.fm,www.google.fm,forcesafesearch.google.com
cname=google.fr,www.google.fr,forcesafesearch.google.com
cname=google.ga,www.google.ga,forcesafesearch.google.com
cname=google.ge,www.google.ge,forcesafesearch.google.com
cname=google.gg,www.google.gg,forcesafesearch.google.com
cname=google.com.gh,www.google.com.gh,forcesafesearch.google.com
cname=google.com.gi,www.google.com.gi,forcesafesearch.google.com
cname=google.gl,www.google.gl,forcesafesearch.google.com
cname=google.gm,www.google.gm,forcesafesearch.google.com
cname=google.gp,www.google.gp,forcesafesearch.google.com
cname=google.gr,www.google.gr,forcesafesearch.google.com
cname=google.com.gt,www.google.com.gt,forcesafesearch.google.com
cname=google.gy,www.google.gy,forcesafesearch.google.com
cname=google.com.hk,www.google.com.hk,forcesafesearch.google.com
cname=google.hn,www.google.hn,forcesafesearch.google.com
cname=google.hr,www.google.hr,forcesafesearch.google.com
cname=google.ht,www.google.ht,forcesafesearch.google.com
cname=google.hu,www.google.hu,forcesafesearch.google.com
cname=google.co.id,www.google.co.id,forcesafesearch.google.com
cname=google.ie,www.google.ie,forcesafesearch.google.com
cname=google.co.il,www.google.co.il,forcesafesearch.google.com
cname=google.im,www.google.im,forcesafesearch.google.com
cname=google.co.in,www.google.co.in,forcesafesearch.google.com
cname=google.iq,www.google.iq,forcesafesearch.google.com
cname=google.is,www.google.is,forcesafesearch.google.com
cname=google.it,www.google.it,forcesafesearch.google.com
cname=google.je,www.google.je,forcesafesearch.google.com
cname=google.com.jm,www.google.com.jm,forcesafesearch.google.com
cname=google.jo,www.google.jo,forcesafesearch.google.com
cname=google.co.jp,www.google.co.jp,forcesafesearch.google.com
cname=google.co.ke,www.google.co.ke,forcesafesearch.google.com
cname=google.com.kh,www.google.com.kh,forcesafesearch.google.com
cname=google.ki,www.google.ki,forcesafesearch.google.com
cname=google.kg,www.google.kg,forcesafesearch.google.com
cname=google.co.kr,www.google.co.kr,forcesafesearch.google.com
cname=google.com.kw,www.google.com.kw,forcesafesearch.google.com
cname=google.kz,www.google.kz,forcesafesearch.google.com
cname=google.la,www.google.la,forcesafesearch.google.com
cname=google.com.lb,www.google.com.lb,forcesafesearch.google.com
cname=google.li,www.google.li,forcesafesearch.google.com
cname=google.lk,www.google.lk,forcesafesearch.google.com
cname=google.co.ls,www.google.co.ls,forcesafesearch.google.com
cname=google.lt,www.google.lt,forcesafesearch.google.com
cname=google.lu,www.google.lu,forcesafesearch.google.com
cname=google.lv,www.google.lv,forcesafesearch.google.com
cname=google.com.ly,www.google.com.ly,forcesafesearch.google.com
cname=google.co.ma,www.google.co.ma,forcesafesearch.google.com
cname=google.md,www.google.md,forcesafesearch.google.com
cname=google.me,www.google.me,forcesafesearch.google.com
cname=google.mg,www.google.mg,forcesafesearch.google.com
cname=google.mk,www.google.mk,forcesafesearch.google.com
cname=google.ml,www.google.ml,forcesafesearch.google.com
cname=google.com.mm,www.google.com.mm,forcesafesearch.google.com
cname=google.mn,www.google.mn,forcesafesearch.google.com
cname=google.ms,www.google.ms,forcesafesearch.google.com
cname=google.com.mt,www.google.com.mt,forcesafesearch.google.com
cname=google.mu,www.google.mu,forcesafesearch.google.com
cname=google.mv,www.google.mv,forcesafesearch.google.com
cname=google.mw,www.google.mw,forcesafesearch.google.com
cname=google.com.mx,www.google.com.mx,forcesafesearch.google.com
cname=google.com.my,www.google.com.my,forcesafesearch.google.com
cname=google.co.mz,www.google.co.mz,forcesafesearch.google.com
cname=google.com.na,www.google.com.na,forcesafesearch.google.com
cname=google.com.nf,www.google.com.nf,forcesafesearch.google.com
cname=google.com.ng,www.google.com.ng,forcesafesearch.google.com
cname=google.com.ni,www.google.com.ni,forcesafesearch.google.com
cname=google.ne,www.google.ne,forcesafesearch.google.com
cname=google.nl,www.google.nl,forcesafesearch.google.com
cname=google.no,www.google.no,forcesafesearch.google.com
cname=google.com.np,www.google.com.np,forcesafesearch.google.com
cname=google.nr,www.google.nr,forcesafesearch.google.com
cname=google.nu,www.google.nu,forcesafesearch.google.com
cname=google.co.nz,www.google.co.nz,forcesafesearch.google.com
cname=google.com.om,www.google.com.om,forcesafesearch.google.com
cname=google.com.pa,www.google.com.pa,forcesafesearch.google.com
cname=google.com.pe,www.google.com.pe,forcesafesearch.google.com
cname=google.com.pg,www.google.com.pg,forcesafesearch.google.com
cname=google.com.ph,www.google.com.ph,forcesafesearch.google.com
cname=google.com.pk,www.google.com.pk,forcesafesearch.google.com
cname=google.pl,www.google.pl,forcesafesearch.google.com
cname=google.pn,www.google.pn,forcesafesearch.google.com
cname=google.com.pr,www.google.com.pr,forcesafesearch.google.com
cname=google.ps,www.google.ps,forcesafesearch.google.com
cname=google.pt,www.google.pt,forcesafesearch.google.com
cname=google.com.py,www.google.com.py,forcesafesearch.google.com
cname=google.com.qa,www.google.com.qa,forcesafesearch.google.com
cname=google.ro,www.google.ro,forcesafesearch.google.com
cname=google.ru,www.google.ru,forcesafesearch.google.com
cname=google.rw,www.google.rw,forcesafesearch.google.com
cname=google.com.sa,www.google.com.sa,forcesafesearch.google.com
cname=google.com.sb,www.google.com.sb,forcesafesearch.google.com
cname=google.sc,www.google.sc,forcesafesearch.google.com
cname=google.se,www.google.se,forcesafesearch.google.com
cname=google.com.sg,www.google.com.sg,forcesafesearch.google.com
cname=google.sh,www.google.sh,forcesafesearch.google.com
cname=google.si,www.google.si,forcesafesearch.google.com
cname=google.sk,www.google.sk,forcesafesearch.google.com
cname=google.com.sl,www.google.com.sl,forcesafesearch.google.com
cname=google.sn,www.google.sn,forcesafesearch.google.com
cname=google.so,www.google.so,forcesafesearch.google.com
cname=google.sm,www.google.sm,forcesafesearch.google.com
cname=google.sr,www.google.sr,forcesafesearch.google.com
cname=google.st,www.google.st,forcesafesearch.google.com
cname=google.com.sv,www.google.com.sv,forcesafesearch.google.com
cname=google.td,www.google.td,forcesafesearch.google.com
cname=google.tg,www.google.tg,forcesafesearch.google.com
cname=google.co.th,www.google.co.th,forcesafesearch.google.com
cname=google.com.tj,www.google.com.tj,forcesafesearch.google.com
cname=google.tk,www.google.tk,forcesafesearch.google.com
cname=google.tl,www.google.tl,forcesafesearch.google.com
cname=google.tm,www.google.tm,forcesafesearch.google.com
cname=google.tn,www.google.tn,forcesafesearch.google.com
cname=google.to,www.google.to,forcesafesearch.google.com
cname=google.com.tr,www.google.com.tr,forcesafesearch.google.com
cname=google.tt,www.google.tt,forcesafesearch.google.com
cname=google.com.tw,www.google.com.tw,forcesafesearch.google.com
cname=google.co.tz,www.google.co.tz,forcesafesearch.google.com
cname=google.com.ua,www.google.com.ua,forcesafesearch.google.com
cname=google.co.ug,www.google.co.ug,forcesafesearch.google.com
cname=google.co.uk,www.google.co.uk,forcesafesearch.google.com
cname=google.com.uy,www.google.com.uy,forcesafesearch.google.com
cname=google.co.uz,www.google.co.uz,forcesafesearch.google.com
cname=google.com.vc,www.google.com.vc,forcesafesearch.google.com
cname=google.co.ve,www.google.co.ve,forcesafesearch.google.com
cname=google.vg,www.google.vg,forcesafesearch.google.com
cname=google.co.vi,www.google.co.vi,forcesafesearch.google.com
cname=google.com.vn,www.google.com.vn,forcesafesearch.google.com
cname=google.vu,www.google.vu,forcesafesearch.google.com
cname=google.ws,www.google.ws,forcesafesearch.google.com
cname=google.rs,www.google.rs,forcesafesearch.google.com
cname=google.co.za,www.google.co.za,forcesafesearch.google.com
cname=google.co.zm,www.google.co.zm,forcesafesearch.google.com
cname=google.co.zw,www.google.co.zw,forcesafesearch.google.com
cname=google.cat,www.google.cat,forcesafesearch.google.com
cname=duckduckgo.com,www.duckduckgo.com,safe.duckduckgo.com
host-record=safe.duckduckgo.com,50.16.250.179
cname=duck.com,www.duck.com,safe.duckduckgo.com
host-record=strict.bing.com,204.79.197.220
cname=bing.com,www.bing.com,strict.bing.com
host-record=restrict.youtube.com,216.239.38.120
cname=www.youtube.com,restrict.youtube.com
cname=m.youtube.com,restrict.youtube.com
cname=youtubei.googleapis.com,restrict.youtube.com
cname=youtube.googleapis.com,restrict.youtube.com
cname=www.youtube-nocookie.com,restrict.youtube.com

Of course, you need to point kids device to use this Pi-Hole DNS server. This can be done through hard coding DNS server on end user devices (ipad, laptops) or put into DHCP reservation.

The details of Pi-Hole setup, please visit https://pi-hole.net/

Leave a Reply

Your email address will not be published. Required fields are marked *