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 have some regex filters you can try out and expand on, hope this helps. Add as denied in the RegEx filter tab.
^(.[.-]+)?([a-z0-9]+)?onlyfans([0-9a-zA-Z]+)?([.-].+)$
Blocks 1000
^(.[.-]+)?([a-z0-9]+)?hentai([0-9a-zA-Z]+)?([.-].+)$
Blocks 10,000
^(.[.-]+)?([a-z0-9]+)?porn([0-9a-zA-Z]+)?([.-].+)$
Blocks 126,000
^(.[.-]+)?([a-z0-9]+)?slut([0-9a-zA-Z]+)?([.-].+)$
Blocks 7000