# Blocking specific webaddresses

**URL:** <https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74>\
**Category:** Community Help\
**Created:** [March 29, 2016, 1:02am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74 "2016-03-29T01:02:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [March 29, 2016, 1:02am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/1 "2016-03-29T01:02:14Z")

</div>

Can we realisticly block specific webaddresses with the blacklist?

like [http://youtube.com/thisannoyoingchannel](http://youtube.com/thisannoyoingchannel) ?

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

---

<div class="post-metadata">

**Author:** ![PromoFaux](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/promofaux/32/1545_2.png) [@PromoFaux](https://discourse.pi-hole.net/u/PromoFaux)\
**Post date:** [March 29, 2016, 2:16am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/2 "2016-03-29T02:16:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dan019](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dan019/32/163_2.png) [@dan019](https://discourse.pi-hole.net/u/dan019)\
**Post date:** [March 30, 2016, 11:57am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/3 "2016-03-30T11:57:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![supernova](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@supernova](https://discourse.pi-hole.net/u/supernova)\
**Post date:** [March 30, 2016, 12:47pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/4 "2016-03-30T12:47:02Z")

</div>

However, we are looking into [blocking certain parts of a domain](https://github.com/pi-hole/pi-hole/issues/230#issuecomment-201109059) for finer-grained control. Something like this:

```

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

---

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [March 31, 2016, 1:54pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/5 "2016-03-31T13:54:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [June 23, 2016, 10:30am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/6 "2016-06-23T10:30:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![poktor](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@poktor](https://discourse.pi-hole.net/u/poktor)\
**Post date:** [October 10, 2016, 5:51pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/7 "2016-10-10T17:51:53Z")

</div>

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](http://www.telegraaf.nl)  
the ad: [http://www.telegraaf.nl/static/bva\_new/bva-telegraaf-300x600.html](http://www.telegraaf.nl/static/bva_new/bva-telegraaf-300x600.html)

---

<div class="post-metadata">

**Author:** ![Davey](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/davey/32/100_2.png) [@Davey](https://discourse.pi-hole.net/u/Davey)\
**Post date:** [October 18, 2016, 9:49pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/8 "2016-10-18T21:49:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [October 18, 2016, 9:52pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/9 "2016-10-18T21:52:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Davey](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/davey/32/100_2.png) [@Davey](https://discourse.pi-hole.net/u/Davey)\
**Post date:** [October 18, 2016, 9:54pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/10 "2016-10-18T21:54:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [March 2, 2017, 5:22am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/11 "2017-03-02T05:22:33Z")

</div>

> [@supernova](#):
>
> However, we are looking into [blocking certain parts of a domain](https://github.com/pi-hole/pi-hole/issues/230#issuecomment-201109059) for finer-grained control. Something like this:
> 
> ```
> 
> $HTTP["host"] =~ "youtube.com" {
> url.rewrite = ( "^/thisannoyingchannel/(.*)" => "pihole/index.html")
> }
> ```

Hi Supernova... news on this?

---

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [June 25, 2017, 7:48am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/12 "2017-06-25T07:48:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![symbiot78](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/symbiot78/32/7455_2.png) [@symbiot78](https://discourse.pi-hole.net/u/symbiot78)\
**Post date:** [June 25, 2017, 2:31pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/13 "2017-06-25T14:31:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [June 26, 2017, 12:09am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/14 "2017-06-26T00:09:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Martin\_Anonym](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/martin_anonym/32/13100_2.png) [@Martin\_Anonym](https://discourse.pi-hole.net/u/Martin_Anonym)\
**Post date:** [September 11, 2020, 7:05pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/15 "2020-09-11T19:05:17Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [September 11, 2020, 7:12pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/16 "2020-09-11T19:12:40Z")

</div>

> [@Martin\_Anonym](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![Martin\_Anonym](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/martin_anonym/32/13100_2.png) [@Martin\_Anonym](https://discourse.pi-hole.net/u/Martin_Anonym)\
**Post date:** [September 11, 2020, 7:18pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/17 "2020-09-11T19:18:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [September 11, 2020, 7:19pm UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/18 "2020-09-11T19:19:39Z")

</div>

> [@Martin\_Anonym](#):
>
> but as you see google would just have to put things on `*google.com/googleanalytics/` and PiHole is played out..

Won't happen, either supposition.

---

<div class="post-metadata">

**Author:** ![superperm](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/a3d4f5/32.png) [@superperm](https://discourse.pi-hole.net/u/superperm)\
**Post date:** [September 20, 2020, 2:59am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/19 "2020-09-20T02:59:14Z")

</div>

This page is a challenge anyone wants to have: [Raspberry Pi Minecraft Server - Pi My Life Up](https://pimylifeup.com/raspberry-pi-minecraft-server/)

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$

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [October 11, 2020, 3:10am UTC](https://discourse.pi-hole.net/t/blocking-specific-webaddresses/74/21 "2020-10-11T03:10:18Z")

</div>

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