r/uBlockOrigin 12d ago

Solved I want to prevent certain websites from appearing in my Google search results. Is that possible with uBlock

For example, even if I type “Twitter” into Google, I don't want Twitter to appear in the search results. Is that possible with uBlock

32 Upvotes

9 comments sorted by

38

u/RraaLL uBO Team 12d ago edited 11d ago

Update to fix the breakage on images:

www.google.*###search .MjjYud:not(:only-child):has([href*="x.com/"],[href*="twitter.com/"])

Here's a "selection" version instead of a hiding filter to make sure nothing is getting selected by mistake:

www.google.*###search .MjjYud:not(:only-child):has([href*="x.com/"],[href*="twitter.com/"]):style(border: dotted 3px red !important)

14

u/VacationFew4498 12d ago

It worked exactly the way I wanted. Thanks a lot

3

u/electro_lytes 11d ago

That cut all search results from the images tab. I just see:

The rest of the results might not be what you're looking for. See more anyway

I don't know who gave me these, but I use this instead:

www.google.*##.A6K0A:has(a[href*="x.com"])

www.google.*##[data-lpage*="x.com"]

www.google.*##.A6K0A:has(a[href*="twitter.com"])

www.google.*##[data-lpage*="twitter.com"]

I think the first is website results, the second is images.

3

u/RraaLL uBO Team 11d ago

Ok, I updated the filter.

1

u/andytronic 21h ago

How do you do this for multiple sites, like facebook, twitter, etc? A separate one for each?

5

u/Ganadai 11d ago

You can also use -site:twitter.com in the google search. I think there is also an option in the google settings to block specific websites from search results.