Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
369 views
369 views

In my web searches I come regularly across sites like subscriptions.packtpub.com that somehow managed to SEO their way into the top results, even though all they offer are teasers for paid content.

How can I stop those sites from cluttering my search results?

in Sysadmin
by (115)
2 19 33
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

You can use uBlock Origin for removing unwanted entries from your search results in your browser.

After installing the plugin click on the icon in the toolbar. In the dropdown that appears select the element picker icon:

uBlock Origin dropdown

Move the cursor over the search results until the element you want removed is highlighted:

uBlock page element selection

Click on the element to show the filter editor. The top frame of the editor dialog shows the selector for the element you want removed. Usually you'll see multiple page elements highlighted at this point, because the selector tends to be a CSS class, particularly for search engine results.

uBlock filter editor

Restrict the selection to just elements that contain the domain you want removed by adding a CSS has() selector:

##.w-gl__result__main:has(a[href*="subscription.packtpub.com"])

Click "Preview" and you should see only the (un)desired element highlighted.

Click "Create" to add the new filter to uBlock and remove the element from the search results.

by (115)
2 19 33
edit history
...