Adding www or https breaks blocking?

Please follow the below template, it will help us to help you!

Expected Behaviour:

All sites on chadmayfield list are blocked.

Actual Behaviour:

If I simply Google 'porn' and click on the link, the site loads. If I type pornsite.com into adress bar it is blocked, but www.pornsite.com is not. Have successfully loaded Chad's list into pihole...

Debug Token:

Sorry am typing on my phone so not easy.
Am I missing something to block all of the sites on Chad's list despite the prefix? Thanks...

Its only domains that Pi-hole blocks and is protocol (http, https, ftp etc) independent.

pi@noads:~ $ pihole -q  pornsite.com
 Match found in list.0.raw.githubusercontent.com.domains:
   anotherpornsite.com
   gaymegapornsite.com
   sweetasspornsite.com
 Match found in list.2.sysctl.org.domains:
   www.whatpornsite.com

pi@noads:~ $ pihole -q  www.pornsite.com
  [i] No results found for www.pornsite.com within the block lists

Run this command to see if the site is on a block list. You didn't specify which of the mayfield lists you loaded, but the top 1M list doesn't contain www.pornsite.com.

pihole -q www.pornsite.com

If the "www" version of the site does not appear and isn't on your black list either, it won't be blocked.

Your best solution would be to create a black list entry for "www.pornsite.com"

There are likely some regex solutions for blocking domains similar to this if you are running Pi-Hole V4. More information here:

https://docs.pi-hole.net/ftldns/regex/overview/

Thanks for you replies guys. Sorry I just used pornsite as an example but I suppose it is a real domain. The regex stuff seems a bit beyond me for now. I am using Chad Mayfield's heavy list.
Seems pointless to try to block any filth from the family home if a simple www will bypass the filter. I will try to build an automatic parser to add www to all the sites on that list, leaving originals as well hence doubling the list. Would this be a good solution? I have tried a couple of public DNSs but they seem pretty leaky. Thanks again.

Give regex a try. It‘s dynamic and you don‘t have to edit your blacklist continously. Just invest your time once in the regex and yor‘re done for the future.

You could also use a filtered DNS service as upstream DNS to selectively block content. Some users do that on a kid-friendly Pi-Hole.

I have used a couple of upstream DNS services but the ones I have tried seem to let quite a few sites through. Do you guys have any suggestions? Have tried freedns + another family one that I forget just now.
Thing with the heavy list is that it has many hundreds of thousands of websites it would be impossible to manually add the www version of each of them. However I could write a wee app or figure out how to add www to each site on it, doubling the list in size. I might try to give this a go later tonight but not sure how effective it would be? Will also read up on regex thanks devnul.

Okay this issue seems to have come up before as per here I will have to play around with various DNS sites until/unless pihole adds subdomain blocking as a feature.
Thanks for the great app will keep it running as it's great at its core function.

Does wildcard blocking not cover domain.com along with www.domain.com and ads.domain.com along with any other possible sub-domain?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.