How to block porn and hentai easily

So, I was setting up my pihole and blocking certain sites, I figured out a simple way to do it and I'd like to share it:

First, I added this list to my blocked group: GitHub - paulbrandie/Pi-Hole-Porn-Blocking: List of porn sites that can be read by Pi-Hole.

Then, in DOMAINS >> regex filter , I created two rules: ^hentai and hentai$ , basically, "^hentai" blocks any site that has any character before 'h', and "hentai$" blocks any site that has any character after 'i', so any site with that word is blocked, adding of course with the txt I added

Your regex rules are wrong.

  • ^hentai will block domains starting with "hentai" (hentai.domain.com).
  • hentai$ will block domains ending with "hentai" (www.domain.hentai... I doubt this will ever match something).

Your rules will never block domains with hentai in the middle (www.hentai.com won't be blocked).

You only need one regex rule: hentai. This will match any domain containing the string "hentai", no matter the position.

Apart from the wrong regex, i doubt that each and every hentai site has hentai in the domain name.

I use this block list for all kinds of nsfw stuff https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/nsfw.txt