# Pihole is not blocking ads according to regex

**URL:** https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730
**Category:** Help
**Created:** [November 23, 2020, 4:38pm UTC](https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730 "2020-11-23T16:38:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tkahn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tkahn/32/19856_2.png) [@tkahn](https://discourse.pi-hole.net/u/tkahn)
#### Post date: [November 23, 2020, 4:38pm UTC](https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730/1 "2020-11-23T16:38:03Z")

</div>

## Expected Behaviour:

I've added a regex rule for the domain adnxs.com:

 ![regex](https://discourse.pi-hole.net/uploads/default/original/3X/3/c/3c969aa444f522b36f20b6c050227025279317e6.png)

I expect this to block all DNS request for this domain and any subdomain used with it.

## Actual Behaviour:

When I look at the log in Pihole i see that it's not blocking what I think it should block:

 ![adnxs](https://discourse.pi-hole.net/uploads/default/original/3X/1/0/10a34334306cbb12d686688dc397cdaf2ab2b3f9.png)

## Debug Token:

[https://tricorder.pi-hole.net/vqiyas3j5u](https://tricorder.pi-hole.net/vqiyas3j5u)

##dhcp settings  
These are the DHCP settings in my network router. The IP 192.168.1.82 is the Raspberry Pi running Pihole.

 ![dhcp-settings](https://discourse.pi-hole.net/uploads/default/original/3X/b/a/ba7dc9cef66c0b84f5b2dd517faff3e0f8549a6b.png)

##Network settings  
These are the network settings for the Windows 10 machine using Pihole as a DNS.

 ![network-settings](https://discourse.pi-hole.net/uploads/default/original/3X/8/d/8dd5fb8d30f72b91f4f3309c59b69e04711c6944.png)

---

<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: [November 23, 2020, 4:40pm UTC](https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730/2 "2020-11-23T16:40:33Z")

</div>

You've applied the regex to the `default` group.

Client 192.168.1.114 is a member of group `Dat..` and `Th...` but not default. (Group membership 1 and 6).

The only client in the default group is 192.168.1.82.

You'll need to apply that regex to the groups that you want it blocked on, or add the required clients to the default group.

---

<div class="post-metadata">

### Author: ![tkahn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/tkahn/32/19856_2.png) [@tkahn](https://discourse.pi-hole.net/u/tkahn)
#### Post date: [November 23, 2020, 5:45pm UTC](https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730/3 "2020-11-23T17:45:07Z")

</div>

Ah! Thanks for pointing that out!  
I must have misinterpreted the use of groups since I thought it's primary use was to be able to filter statistics. I didn't realize it was a part of the actual DNS filtering as well.

I was going crazy here - have used Pihole for many years now and didn't understand what was going on. But now I understand. Thanks for solving this problem for me!

---

<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: [December 14, 2020, 5:45pm UTC](https://discourse.pi-hole.net/t/pihole-is-not-blocking-ads-according-to-regex/40730/4 "2020-12-14T17:45:18Z")

</div>

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