# Pi-hole not blocking ads

**URL:** <https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470>\
**Category:** Help\
**Created:** [February 23, 2018, 1:28pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470 "2018-02-23T13:28:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 23, 2018, 1:28pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/1 "2018-02-23T13:28:00Z")

</div>

Hello. so, I'm new to pi-hole, and I've finished going through the instructions on the home page and done some testing. First thing I've noticed: no ads are being blocked. So, I was unable to change my router's primary DNC server through its settings, so I disabled its DHCP and enabled pi-hole's one. I've already tried searching on these forums for an answer but got none. I tried going through this solution here to try and block youtube ads: [How do I block ads on YouTube?](https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253), but that didn't work. The admin console does have connections to it, and has incoming queries and is blocking some, but those clearly aren't the ads that are being blocked. No idea what to do here. Please help me out.

## Expected Behaviour:

Ads should be blocked.

## Actual Behaviour:

Ads don't get blocked at all. Clients, queries and blocked queries are registering on the admin console, though.

## Debug Token:

r2bonh0iir

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 23, 2018, 2:05pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/2 "2018-02-23T14:05:13Z")

</div>

Did you disconnect & reconnect network on your clients after you switched DHCP from router to Pi-hole ?  
Maybe even reboot them just to be sure ?

Below one on a Windows client PC, run in a CMD box, will show you which DNS server(s) it is using:

`ipconfig /all`

And below one will show DNS server used on a Linux client:

`cat /etc/resolv.conf`

And below three for Android if run in a terminal window:

`getprop net.dns1`

`getprop net.dns2`

`getprop net.dns3`

Dont know equivalent for Apple IOS 😉

You can test on a Windows or Linux client with below two:

`nslookup pi.hole`

`nslookup pi.hole <PIHOLE_IP_ADDRESS>`

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 23, 2018, 10:55pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/3 "2018-02-23T22:55:25Z")

</div>

Currently the only device I'm testing this on is my PC, and yes I did reboot it whenever I made a change to the router & pihole. I ran _ipconfig /all_ and it said that my DNC servers are my pi's IPv6 (1st line) and IPv4 (2nd line) addresses, and my DHCP server is my IPv4 address. _nslookup pi.hole_ and the other one returned the same addresses. You think this might have something to do with pi-hole prioritising the IPv6 address over IPv4?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 24, 2018, 8:33am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/4 "2018-02-24T08:33:44Z")

</div>

If ipconfig only shows the ipv4 and ipv6 addresses of Pi-hole for DNS and no others, this is fine ?  
Can test both addresses displayed by ipconfig with nslookup on the Windows PC ?

`nslookup pi.hole <PIHOLE_IPV4_ADDRESS>`

`nslookup pi.hole <PIHOLE_IPV6_ADDRESS>`

Or even a naughty domain:

`nslookup doubleclick.com <PIHOLE_IPV4_ADDRESS>`

`nslookup doubleclick.com <PIHOLE_IPV6_ADDRESS>`

Can you post an example link, besides Youtube, that shows ads ?  
Also if using ipv6, have a read here:

> [@Use IPv6 ULA addresses for Pi-hole](https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127):
>
> Many users have reported that frequently changing IPv6 addresses cause page load to be slow or even prevent from working at all. The issues can be fixed by updating the IPv6 address in /etc/pihole/setupVars.conf followed by a run of pihole -g. However, this solution turns out to be very inconvenient since it might be necessary to change the IPv6 address on a regular basis (maybe even multiple times a day). An alternative approach we are currently looking into is the usage of ULA addresses which…

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 24, 2018, 8:59am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/5 "2018-02-24T08:59:58Z")

</div>

I dont know how nslookup is supposed to be a test... even with those different domains... whenever I put in a different domain it just says that domain besides _Name:_, and that's all that changes. Same goes for the IPv4 and 6 addresses.

Anyway, as for another example place besides youtube that has ads, there's Outlook; sign in to your email inbox and ads appear on the right hand side: [https://outlook.live.com/](https://outlook.live.com/)

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 24, 2018, 9:03am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/6 "2018-02-24T09:03:14Z")

</div>

> [@Azsorlex26](#):
>
> I dont know how nslookup is supposed to be a test… even with those different domains… whenever I put in a different domain it just says that domain besides Name:, and that’s all that changes. Same goes for the IPv4 and 6 addresses.

Its just a test if blocked domains get their IP redirected to Pi-hole's IP address instead of the real IP.  
Could you post full output for below one ?

`nslookup pi.hole`

> [@Azsorlex26](#):
>
> Anyway, as for another example place besides youtube that has ads, there’s Outlook; sign in to your email inbox and ads appear on the right hand side: [https://outlook.live.com/](https://outlook.live.com/)

I dont have an account on that site.

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 24, 2018, 10:35am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/7 "2018-02-24T10:35:17Z")

</div>

what in the hell..... I ran _nslookup pi.hole_ again and this time it was completely different from what it was before! Seriously! Before it was something along the lines of:

Server: raspberrypi  
Address: (my IPv4 address)

Name:  
Address: (my IPv6 address)  
(my IPv4 address)

Now it's this:

**Server: google-public-dns-a.google.com**  
**Address: 8.8.8.8**

\*\*\* google-public-dns-a.google.com can't find pi.hole: Non-existent domain

yeah... now I get why that command is a test... but seriously it was different all the previous times..  
As for another site example: [https://www.tenforums.com/tutorials/21454-turn-off-hard-disk-after-idle-windows-10-a.html](https://www.tenforums.com/tutorials/21454-turn-off-hard-disk-after-idle-windows-10-a.html)

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 24, 2018, 11:18am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/8 "2018-02-24T11:18:32Z")

</div>

> [@Azsorlex26](#):
>
> I ran nslookup pi.hole again and this time it was completely different

Are you sure only the Pi-hole ipv4 and ipv6 addresses are displayed in the DNS section when running `ipconfig /all` and no others like Google's `8.8.8.8` ?

> [@Azsorlex26](#):
>
> As for another site example: [https://www.tenforums.com/tutorials/21454-turn-off-hard-disk-after-idle-windows-10-a.html](https://www.tenforums.com/tutorials/21454-turn-off-hard-disk-after-idle-windows-10-a.html)

That site loads without a single ad for me.  
If your PC is configured to use the other DNS server (`8.8.8.8`) as well, ads will still leak through.  
This will not happen when you configure Pi-hole to be the DHCP server instead of your router.

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 24, 2018, 1:28pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/9 "2018-02-24T13:28:10Z")

</div>

> [@deHakkelaar](#):
>
> Are you sure only the Pi-hole ipv4 and ipv6 addresses are displayed in the DNS section when running ipconfig /all and no others like Google’s 8.8.8.8 ?

Yes; the pi-hole ipv4 and ipv6 addresses are the only ones displayed in the DNS section of _ipconfig /all_.

> [@deHakkelaar](#):
>
> ads will still leak through.
> 
> This will not happen when you configure Pi-hole to be the DHCP server instead of your router.

I already have.. I turned off my router's DHCP, inputted the default settings for that into pi-hole's DHCP settings, turned it on, applied, and restarted my system. My system is listed under _Currently active DHCP leases_ along with many others.

Also, should IPv6 support be enabled for DHCP?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 24, 2018, 2:12pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/10 "2018-02-24T14:12:04Z")

</div>

Does the DHCP server section in `ipconfig /all`, display the Pi-hole IP address ?  
I have no clue were you're Windows box is getting that DNS server `8.8.8.8` from.  
It certainly is not Pi-hole's DHCP service pushing that `8.8.8.8` IP to its clients as proven by the `ipconfig /all` output.  
If `nslookup pi.hole` is using that `8.8.8.8` address for DNS resolution, you can be sure that all software will query this not Pi-holed DNS server.  
Sorry but maybe someone else has an answer.

> [@Azsorlex26](#):
>
> Also, should IPv6 support be enabled for DHCP?

No, the PC/clients can aquire ipv6 IP details using regular ipv4 DHCP.

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 24, 2018, 11:06pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/12 "2018-02-24T23:06:22Z")

</div>

I remember during setup that I had to select an upstream DNS provider, and because I was unsure on which one to chose I just went with Google’s. Which DNS provider would be best for ad blocking?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 25, 2018, 3:52pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/13 "2018-02-25T15:52:36Z")

</div>

> [@Azsorlex26](#):
>
> I remember during setup that I had to select an upstream DNS provider,

Thats the upstream DNS server that Pi-hole is using:  
Client --\> Pi-hole --\> Upstream DNS --\> root DNS servers

> [@Azsorlex26](#):
>
> Which DNS provider would be best for ad blocking?

Thats partly your personal chose, stability, privacy, or maybe the one thats fastest.  
I am using the ISP provided ones like so:  
Client --\> Pi-hole --\> Router DNS --\> ISP provided DNS --\> root DNS servers

---

<div class="post-metadata">

**Author:** ![Azsorlex26](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@Azsorlex26](https://discourse.pi-hole.net/u/Azsorlex26)\
**Post date:** [February 26, 2018, 4:58am UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/14 "2018-02-26T04:58:46Z")

</div>

Hold on a minute... I found another post here on these forums that states you need to sign up with the DNS service to actually be able to utilise their DNS: [How do I choose an upstream DNS server? - #2 by iamoverrated](https://discourse.pi-hole.net/t/how-do-i-choose-an-upstream-dns-server/258/2). Is this really the case? It feels like it...

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [February 26, 2018, 9:52pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/15 "2018-02-26T21:52:11Z")

</div>

Yeah some you probably need to subscribe before you can use them ... haven't tried them all.  
But for your ISP provided ones, Google's and few others, you do not have to.

```
C:\>nslookup pi-hole.net 8.8.8.8
Server: google-public-dns-a.google.com
Address: 8.8.8.8

Non-authoritative answer:
Name: pi-hole.net
Addresses: 2604:a880:400:d0::1071:1
          159.203.180.3

```

* * *

```
C:\>nslookup pi-hole.net 9.9.9.9
Server: dns.quad9.net
Address: 9.9.9.9

Non-authoritative answer:
Name: pi-hole.net
Addresses: 2604:a880:400:d0::1071:1
          159.203.180.3

```

---

<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:** [March 19, 2018, 9:52pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-blocking-ads/7470/16 "2018-03-19T21:52:20Z")

</div>

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