Blocking specific webaddresses

Can we realisticly block specific webaddresses with the blacklist?

like http://youtube.com/thisannoyoingchannel ?

meaning can we use the pi-hole for content filtering?

You could certainly use it for content filtering... however you would only be able to block the domain, and not anything after the /.

For example:

blacklist.sh www.youtube.com would blacklist the whole of youtube.

blacklist.sh www.youtube.com/thisannoyingchannel would not do anything.

Unfortunately, the fact is youtube forces HTTPS. That complicates things...

However, we are looking into blocking certain parts of a domain for finer-grained control. Something like this:


$HTTP["host"] =~ "youtube.com" {
    url.rewrite = ( "^/thisannoyingchannel/(.*)" => "pihole/index.html")
}

that sounds interesting SuperNova.. I hope it'll come into action!

ok, so forgot I actually posted this question.. and asked the same question in a new thread..
but would like to check in and see if any work has been done in regards to this issue/feature?

Great! I really hope this gets implemented soon. Here in the Netherlands, one of the largest newspaper-sites, telegraaf.nl, has made a deal with auction-site bva-auctions and now they are showing ads for them from their own servers. Very annoying and at this moment the pi is unable to block this, as you would lose the whole newspaper-site.
newspaper-site: http://www.telegraaf.nl
the ad: http://www.telegraaf.nl/static/bva_new/bva-telegraaf-300x600.html

I was looking into blocking facebook in it's entirety, but as I read above, HTTPS causes problems

Is there a way to block facebook? HTTPS sites in general?

Take a look at the solution for wildcard blocking here at this post: https://github.com/pi-hole/pi-hole/issues/672#issuecomment-247863064

Thanks, bookmarked, I`ll have a try of that in the morning

Hi Supernova... news on this?

Gonna try again.. any more thoughts into this? I am unsure how to use the above code...

ok, so been messing around with dnsmasq.conf, lighttpd.conf and also the 02-wildcards.conf and not gotten anywhere. I can't seem to find the proper way of blocking specific pages from youtube.

The Pi-hole blocks on a DNS level and we are unable to block HTTP(S) traffic directly. We don't see any of the web traffic, so you would need another solution that would intercept the traffic, like a web proxy.

1 Like

Actually wanna pull this Thread out as it would be a f*cking awesome feature to be able to block whole URLs and not just on DNS level.

Example: AdSense (noone likes it)

Placed at: https://www.google.com/adsense/search/async-ads.js

So it uses the Domain (www.google.com) which you dont wanna block! But you for sure want to block the *google.com/adsense* path so everything related to adsense based on this Domain is blocked.

Actually the pattern should look like: (RegEx)

(.*)?google\.com\/adsense.*

So it matches every combination or the domain end everything behind /adsense. Think that would be awesome to block snitches like google which are putting (moving) their Ads/Trackers on the same domain as the maindomain. So you can either block the whole google or nothing.

If needed (wished) I will create a FeatureRequest if enough people are liking this.

Then you'll need to find another solution. It's not going to be possible at all with Pi-hole. Now, or ever.

Ok sad to read, but I understand that.
Contentfiltering is just something that will be more and more important. Blocking the whole DNS is cool, but as you see google would just have to put things on *google.com/googleanalytics/ and PiHole is played out..

They can do so with every tracking/ads service.

Won't happen, either supposition.

This page is a challenge anyone wants to have: Easy Raspberry Pi Minecraft Server Tutorial - Pi My Life Up

I was not able to block ads despite adding blocking filters. In Firefox ads always open.

FYI: I added these filters:

  1. (.|^)yyjvimo.com$
  2. (.|^)imasdk.googleapis.com$

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