Can I block Google search results for specific websites?

d0x

Active Member
Interesting, what browser are you using? I tried this:
Code:
google.*#?#a[href*=".pinterest."] > div:contains(/.pinterest./):upward(3)
google.*#?#div[data-ru*=".pinterest."]
and they work on the browser of my choice (Firefox Nightly), but after reading your post I went to install Chrome and tried it, indeed it doesn't work there. Looked at the layout using remote debugging and it seems like Google displays vastly different layouts depending on useragent and maybe some other stuff like browser's rendering engine so there won't be a single rule that works across all browsers.

Assuming you're using Chrome, these should work (at least on my device, POCO F1, and using Pinterest as an example):

For regular search (2nd rule is for the gigantic pinned result at the top):
Code:
google.*#?#a[href*=".pinterest."] > div > span:contains(/.pinterest./):upward(7)

google.*#?#.g.card-section > div > div > div > div > cite:contains(/.pinterest./):upward(8)
For image search:
Code:
google.*#?#a[href*=".pinterest."][rel="noopener"]:upward(1)

Unfortunately, I have no idea how to deal with the image preview on regular search that @Joachim was talking about (presumably this: ) with just cosmetic filtering since those images are base64 thumbnails generated by Google itself and tapping on they doesn't actually send you to those sites but rather popping up a separate <div> element which then contains the link (very annoying).
Yeah they are the same on bing so blocking them there doesn't work either (I use bing allot) but at least there it tell you where the image is from under it.

I'll try your chrome version and post an update later. I just woke up so I need some coffee before I start messing with rules lol
 

ronege

New Member
I've also had the same problem and updated the query. This query filters pinterest and facebook from search results. (working on safari and chrome)

Code:
google.*#?#div[role="main"] > div#search > div > div > div > div[class="g"] > div > div > a[href]:contains(/pinterest.*|facebook.com/):upward(2)
 
  • Like
Reactions: d0x

d0x

Active Member
I've also had the same problem and updated the query. This query filters pinterest and facebook from search results. (working on safari and chrome)

Code:
google.*#?#div[role="main"] > div#search > div > div > div > div[class="g"] > div > div > a[href]:contains(/pinterest.*|facebook.com/):upward(2)
Awesome, OP should have everything they need to block any site from any search engine now.
 

g99poy

Beta Tester
This would be a great feature request.
This is actually something a lot of folks used in the prior chrome extension called Personal Blocklist.

There have been forks and attempts, but an integrated plugin to give a scripted button to allow simple way to manage these results with a quick click would be awesome.

On certain topics, say searching for a photography application, I've found an abundance of SEO optimized spam at the top that is difficult to sort through. Would love filtering out those spam sites, compare software sites, and others that come up repeatably, and not have to sift through that.
 

Joachim

New Member
This would be a great feature request.
This is actually something a lot of folks used in the prior chrome extension called Personal Blocklist.
Still hoping that the AdGuard team will think of this as a feature that really makes peoples search life much easier :)
 

Joachim

New Member
google.*#?#div[role="main"] > div#search > div > div > div > div[class="g"] > div > div > a[href]:contains(/pinterest.*|facebook.com/):upward(2)
Sadly this does not work on Android 11 with Edge browser.
Use google as search engine. Search for "Lego MOC" in image search.
Get this result: see attachment

I can't tell you, how I hate pinterest in search results, If you click on it accidently, it shows you completely different pictures and if you find the right one, it wants you to login and then redirects you to some other pictures.
 

Attachments

Top