1) Prevent overblocking by applying the law of [diminishing returns]() (always blocking more ≠ better blocking experience). 2) Aim for efficiency without sacrificing quality (use sane, quality resources). 3) Implement the minimum number of useful lists (avoid redundancy and bloat when possible).
For Twitch adblock, I use Violentmonkey with the AdGuard Extra userscript. This helps uBlock Origin block server-side ads.
You can also use Tampermonkey as a Twitch adblock solution.
Adblock not working on YouTube?
youtube.com
and any other ad-invasive site.
1) How to add custom filters 1) Privacy 2) Annoyances 3) Security 4) All-Purpose 2) Examples 1) Enhanced 2) Pro 3) Optimized 3) Mobile adblocking: block content with fewer rules 1) Disable cosmetic filters 2) Optimized lists 4) Advanced settings 5) uBlock Origin Lite 6) FAQ 7) Additional reading 8) Mentions
[!NOTE] This repo is tailored to uBlock Origin specifically. I cannot guarantee filters will work in other ad blockers.
Get uBlock Origin (uBO), if you don't have it already.
To import custom filters into uBlock Origin:
To import custom filters into AdGuard:
Do not use the subscribe link. Add your own custom filter lists from different sources just copying/pasting the RAW
URL and pressing save changes.
Raw
on the right-hand side of the page.brave://adblock
in the URL bar.1) :star: Privacy Essentials (1k rules) | subscribe
A curated list for advanced hardening. Includes click2load filters^what is this? and blocks requests like connect.facebook.com
and more that are not covered by uBO's default settings or in Annoyances lists.
[!WARNING] Privacy Essentials may prevent you from logging into sites using Facebook, Google, or other third-party accounts.
2) yokoffing's click2load filters (47 rules) | subscribe
(optional if using Privacy Essentials
) Turns many third-party audio and video players into click-to-load placeholders which only load once a user clicks on it. This list speeds up page load, uses less bandwidth and browser resources, and reduces privacy exposure (by contacting fewer domains during page load). The player will load by clicking on the placeholder.
3) :star: Hagezi Pro mini (78k domains) | subscribe
A smaller version of the Hagezi Pro DNS blocklist optimized for web browsers (78k vs. 159k rules). The streamlined list excludes rules not pertinent to web browsing, like those blocking IoT tracking and device telemetry. This mini version blocks domains associated with ads, tracking, analytics, and badware.
Add the functionality of ClearURLs to uBO. These filter lists automatically remove tracking elements from URLs to protect your privacy when browsing the Internet.
1) :star: Actually Legitimate URL Shortener Tool (2k rules) | subscribe
This list also includes all entries from AdGuard's URL Tracking Protection
as of October 2022, but you can use both lists.
2) ClearURLs for uBO (700 rules) | subscribe
This list is just the rules from the ClearURLs extension converted into a filterlist.
[!TIP] If you find websites with tracking parameters or experience site issues, you can submit those here.
1) Block third-party fonts (70 rules) | subscribe
This filter blocks fonts from third-party domains, which improves page load speed and protects your privacy. There are built-in exceptions to minimize site issues, such as allowing for font icons. Overall, it's more flexible than blocking all third-party fonts outright (e.g., $font,3p
).
[!NOTE] Blocking web fonts will affect the "look and feel" of some sites.
1) :star: yokoffing's Annoyance List (1k rules) | subscribe
A curated list that captures nuisances missed by other maintainers. It also cleans up the clutter around many sites (e.g., related articles, "read more", etc.).
2) Browse websites without logging in (370 rules) | subscribe
This list attempts to bypass forced logins on sites.
3) YouTube Clear View (17 rules) | subscribe
Cleans up some of the clutter on YouTube.
To most effectively bypass paywalls, use the Bypass Paywalls Clean extension. The blocklists are limited in what they can do and are therefore optional.
1) Bypass Paywalls Clean filter (960 rules) | subscribe
You do not need this filterlist if you use the extension.
2) Anti-paywall filters (2k rules) | subscribe
This list blocks additional third-party requests and annoyances that are not covered in the Bypass Paywalls Clean
filterlist.
High-risk sites can expose your device to threats. These lists can prevent that by warning you before navigation or limiting what you can access.
1) Most Abused TLDs (213 rules) | subscribe
Displays a warning before navigating to a site with an abused TLD. Allows exceptions for legitimate sites. Merged from my own Enhanced website protection list, Dandelion Sprout's Anti-Malware List
, LennyFox's Block non-Latin TLDs
list, and Spamhaus statistics.
2) Dandelion Sprout's Anti-Malware List (88k rules) | subscribe
This list blocks domains with high abuse rates and their search results. It also blocks domains involved in malware redirects, domain parking, and Windows PUP ads. It has many other subcategories that distinguish it from similar lists.
3) The malicious website blocklist (38k rules) | subscribe
This version includes author comments, vxvault.net's list, the anti-PUP list, and additional rules for uBO.
1) uBlock combo list (81k rules) | subscribe
(optional: You may not want all these sub-filters, or you may prefer to use the separate lists) This list filters URL tracking parameters as well as malware, scams, and phishing. It combines the following lists: Dandelion Sprout's Anti-Malware List, Actually Legitimate URL Shortener Tool, The malicious website blocklist, and the anti-typo list.
I've provided three setup guides: Enhanced, Pro, and Optimized.
Balanced approach for users with a low threshold for site issues:
In addition to the default lists, you should also enable:
Advanced apporach for users comfortable troubleshooting issues and reporting site breakage:
In addition to the default lists and everything under the Enhanced setup, you should also enable:
In addition to the default lists and everything under the Enhanced setup, you should also enable:
yokoffing's click2load filters
is included)Replace one-for-one with Optimized Lists.
Modern websites often have ads, cookie banners, newsletter pop-ups, social media icons, or any combination of these annoyances. Cosmetic filters hide visual nuisances from the page that can't be blocked with network filters. But there is also a third category.
Unique to uBlock Origin and AdGuard are a method of filtering called scriplets. They are small scripts that allow the content blocker to perform customized actions on websites, beyond just blocking elements. Scripts are small code snippets written in JavaScript, which perform certain functions.
This is where a powerful ad blocker like uBO or AdGuard shines, as they can block pop-ups on videos when you click them and other instrusive ads, whereas basic ad blockers only support the bare minimum of network and cosmetic filtering. You'll usually find these in built-in browser ad blockers. (I'm looking you Opera, Vivaldi, and Orion.)
Effective ad blocking now requires cosmetic filters in Ads and Annoyances lists to remove these elements. Most devices, including mobile devices, can handle cosmetic filtering without significant performance issues.
However, turning off cosmetic filtering when the webpage doesn't need it reduces your device's workload while still blocking unwanted network requests.
The most optimal way to improve performance without compromising security or privacy is to disable cosmetic filtering everywhere, and then enable it on sites where it's needed. This action still protects you from security and privacy risks by blocking unwanted network requests but reduces the overhead on less powerful devices during page load.
When I was testing this feature, I was amazed at how many ads and annoyances were blocked by network filters and scriplets alone. They do most of the heavy work on non-video sites. However, there are plenty of invasive sites where cosmetic filtering is needed.
To disable cosmetic filtering everywhere, go to the Settings pane in the dashboard. Under the Default behavior heading, check the option Disable cosmetic filtering.
From then on, cosmetic filtering will be turned off everywhere by default. To enable it for a specific site where it is really needed, click the "eye" icon in uBO's panel.
For sites where you already know that you want to block visual elements, such as traditional search, video streaming, and news sites, you can go to the Settings pane in the dashboard and click on the My rules tab. Then, under Temporary rules, you can enter something like this:
no-cosmetic-filtering: bing.com false
no-cosmetic-filtering: cnn.com false
no-cosmetic-filtering: google.com false
no-cosmetic-filtering: twitch.tv false
no-cosmetic-filtering: youtube.com false
Select Save and then Commit.
To enable cosmetic filtering when you're on the site, click the uBO icon in your browser toolbar and click the "eye" icon and then the "lock" icon.
It took less than a few browsing sessions to re-enable cosmetic filtering for ad-heavy sites that I visit reguarly. But I was generally impressed with how uBO's network filters and scriplets took care of a lot annoyances using my suggested Enhanced setup.
Another way to go about this is to disable cosmetic filters on only specific sites.
For a webpage where uBO seems unnecessary, turn off cosmetic filtering for the site. Disabling cosmetic filters on specific sites is more flexible than allowing cosmetic filters everywhere by default. However, it requires you to 1) assess a site and 2) remember to disable them. This method is also less of a net benefit for your device's performance.
In general, you'll want to disable cosmetic filtering for small blogs, benchmarking sites, government sites, and any other unobstrusive pages. If you already have a good idea of what those are, you can go to the Settings pane in the dashboard and click on the My rules tab. Then, under Temporary rules, you can enter something like this:
no-cosmetic-filtering: basicappleguy.com true
no-cosmetic-filtering: browserbench.org true
no-cosmetic-filtering: fda.gov true
no-cosmetic-filtering: pluralistic.net true
Select Save and then Commit.
More often, however, you'll disable cosmetic filtering for a site by clicking the uBO icon in your browser toolbar, selecting the "eye" icon and then the "lock" icon.
[!IMPORTANT] These lists sacrifice blocking comprehensiveness for efficiency, so expect occasional gaps in coverage when compared to their regular versions. Remember this if you run into less blocking than anticipated or when troubleshooting a website.
Another way to improve performance is to use alternative filter lists with fewer rules. These filters are intended predominately for mobile devices. So although uBO can handle over 500k+ rules, you don't need that many to block unwanted content effectively.
AdGuard offers filters that remove rarely used rules. These optimized lists load faster and use less memory while still blocking content effectively. AdGuard creates the lists using statistics that indicate how often each rule is applied.
[!NOTE] AdGuard for iOS automatically uses optimized filters, so you don't need to manually add the iOS-specific links provided below. The guide includes these links mainly for reference, as AdGuard doesn't explicitly label the built-in filters as "optimized" even though they are.
The rule counts below compare each optimized list to its original version in uBO. The numbers are a snapshot of the rule counts at the time of writing.
1) Easylist (Optimized) (45k optimized vs. 82k rules) | iOS version (28k rules) | subscribe
EasyList is the primary filter list that removes most adverts from web pages, including unwanted frames, images, and objects. This filter is the most popular list used by many ad blockers.
2) EasyList + AdGuard Base filter (Optimized) (73k optimized vs. 153k rules combined) | iOS version (34k rules) | subscribe
If Easylist (Optimized) is missing too many ads, then use this list, or stick with the built-in Easylist filter.
3) AdGuard Mobile Ads filter (9k rules optimized) | iOS version (6k rules) | subscribe
(optional: This filter is enabled by default when using uBO on Firefox for Android. It's an option in uBO under the category of Ads.)
AdGuard Tracking Protection (Optimized) (both use 100k rules; optimized removes comment lines !
) | iOS version (44k rules) | subscribe
A comprehensive list of various online counters and web analytics tools.
EasyPrivacy (Optimized) (14k optimized vs. 50k rules) | iOS version (14k rules) | subscribe
EasyPrivacy is a filter list to comprehensively block tracking on web pages, including tracking scripts and information collectors. EasyPrivacy protects personal data by stopping these trackers. This filter is the second most popular list used by many ad blockers.
1) Fanboy Annoyances (Optimized) (56k optimized vs. 81k rules) | iOS version (11k rules) | subscribe
Hides website notifications, social media widgets, cookie notices, chat widgets, and some newsletters, thereby substantially decreasing web page loading times and uncluttering them. Includes EasyList - Cookie Notices
and EasyList - Social Widgets
.
2) AdGuard Annoyances (Optimized) (44k optimized vs. 61k rules) | iOS version (24k rules) | subscribe
Contains the following AdGuard filters: Cookie Notices, Popups, Mobile App Banners, Other Annoyances and Widgets. (To block social media buttons, use AdGuard Social Media filter
as well.)
4) AdGuard Social Media filter (Optimized) (16k optimized vs. 21k rules) | iOS version (7k rules)
| subscribe
If you do not like numerous Like
and Tweet
buttons on all the popular websites on the Internet, then subscribe to this filter and you will not see them anymore.
Toggle on advanced settings.
[!WARNING] Do not change these values blindly. Read the description for each preference.
Updated: 26 July 2024, after uBO devs made improvements
Setting | Value | Description |
---|---|---|
autoUpdateAssetFetchPeriod |
5 (default) |
auto-updater waits x seconds before fetching the next filter list |
autoUpdateDelayAfterLaunch |
10 |
update out-of-date filter lists x seconds after browser startup |
autoUpdatePeriod |
1 (default) |
check every x hours for filter lists updates |
cnameMaxTTL |
480 |
(optional) cache CNAME aliases for x minutes |
filterAuthorMode |
true |
enable Dynamic Filtering |
updateAssetBypassBrowserCache |
true |
bypass cache when manually fetching a filter list more than once an hour |
uBlock Origin Lite (uBOL) is a lightweight browser extension that blocks unwanted content on websites.
The extension works efficiently by letting the browser do the heavy lifting, which means uBOL doesn't slow down your browsing experience or drain your device's resources.
After June 2024, Google Chrome users must switch to uBOL due to changes in Chrome's extension platform. Users of other Chromium-based browsers like Microsoft Edge, Opera, and Vivaldi will likely need to make the same change soon after.
uBOL has limited blocking capabilities because it doesn't ask for broad permissions to access and change website data. However, you can grant uBOL extra permissions to improve its blocking performance.
To change uBOL's default filtering mode:
For the best balance between blocking unwanted content and low resource usage, set the default mode to Optimal. This will ensure better overall blocking performance without significantly impacting your browsing experience.
If you don't want to fiddle with the settings ever again and aren't concerned about resource usage, then choose Complete.
For sites with heavy ad-injection, like YouTube, you will need to open uBOL's popup panel and choose Complete to block unwanted content.
To change the filtering level for a specific site:
You can also lower the filtering mode for a site by moving the slider to Basic or No Filtering.
uBlock Origin works best in Mozilla Firefox. The features supported only on Firefox include preventing unwanted DNS requests and CNAME uncloaking.
Starting June 2024, Google Chrome's extension platform will undergo changes that require users to transition from uBlock Origin (uBO) to uBO Lite (uBOL). It's expected that other Chromium-based browsers like Microsoft Edge, Opera, and Vivaldi, will follow suit shortly after.
uBlock Origin can do more compared to when only blocking requests at the DNS-level, like using cosmetic filters to hide first-party ads (e.g., YouTube ads), ad-placeholders, web annoyances, etc.1
Check out How I Experience the Web Today.
The Minified lists are part of an Adblock Plus-hosted unofficial project that was hardforked from their source lists in August 2019. They are smaller than AdGuard's Optimized lists but lack quality blocking. Because EL and EP are your primary defenses with content blocking, I wouldn't use the Minified lists.