Google ads that appear before search results

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

Expected Behaviour:

Google to display results without ads. Pi-hole is working properly otherwise.

Actual Behaviour:

Google displays results and loads ads a second later. Accidental clicks happen a lot. When you try to click the first result before the page loads fully, your click often lands on the ads which sneak up.

Is my pi-hole working correctly?

Debug Token:

[Replace this text with the debug token provided from running pihole -d (or running the debug script through the web interface]

Your Pi-hole is probably working just fine, as you report it working elsewhere.

As Pi-hole works by blocking DNS requests, it cannot block ads that are served from the same domain as the content you are viewing.

Google serves some of its ads (especially text ads) from domains such as https://www.google.com, which you can't block without losing access to the search feature.

As a quick test, try visiting http://www.googleadservices.com (which would be blocked by most blocklists), and see if you are presented with the Pi-hole blockpage. If you don't see the blockpage, something is amiss.

Browser addons such as ublock-origin for chrome and firefox are able to help with this type of ad, but of course do not provide whole-network protection like Pi-hole.

2 Likes

I see that my ublock origin is blocking www.googleadservices.com. On disabling it temporary:

This site can’t be reached
www.googleadservices.com refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Is this normal behaviour for pi-hole?

Ublock has been enabled the whole time and doesn't seem to help with the google.com domain ads. I wonder if it's something I did because those ads were not there a month before.

OK, if you already are running ublock then that sounds about right, because it will block many requests before they get to pi-hole.

This really doesn't seem like a Pi-hole issue.

Here are a couple of steps to try with ublock-origin:

In the ublock-origin dashboard, go into filter lists and if it's not already select "Parse and enforce cosmetic filters" and make sure "Ignore generic cosmetic filters" is unselected, then click update now.

It already has those settings. I clicked purge all caches and update now. The google search ads are still there.

OK, most likely either your current ublock-origin blocklists do not block the google ads, or one of your ublock-origin lists has whitelisted them for some reason.

In the ublock-origin logger is it showing any activity at all on that google page?

My log from the same search page:

You could also have accidentally added a whitelist entry yourself - check that there are no entries for google in the ublock-origin whitelist tab.

My log looks as busy as that.

My whitelist:
about-scheme
chrome-extension-scheme
chrome-scheme
moz-extension-scheme
opera-scheme
vivaldi-scheme
www.playretrogames.com

Your whitelist looks fine.

From your screenshot I can't see any cosmetic filters being applied there (the yellow ones in my screenshot, which were from filters in Fanboy's annoyance list, Easylist and Adguards annoyance list).

I guess I'll switch to Adblock. Really appreciate the help and the narrowing down of the issue.

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