uBlock Origin Suggested Settings

Table of Contents
Recent changes to this guide are listed at the end of the document.
Introduction
First and foremost, use only uBlock Origin (uBO) by Raymond 'gorhill' Hill (here's the uBlock Origin page on the Firefox Add-ons website). While there may be some legitimate forks, there are also many ripoffs out there, including one named 'uBlock', and i would highly recommend avoiding them.
uBlock Origin is not simply an ad blocker, rather it is a powerful content filter, similar to a firewall, that is capable of both dynamic and static filtering. In addition to blocking annoying content such as ads, it can also dynamically block JavaScript, frames, images, 3rd party fonts and more, all of which help to prevent tracking and malware.
Working with uBO requires an understanding of static and dynamic filtering. Static filters are filter rules which are provided by the authors of the various filter lists. Essentially you have no control over static filters; you either enable a filter list, or you don't. Static filters attempt to block content like ads, malware, tracking technologies, annoyances and more. The static filter lists are enabled from the 'Filter lists' tab of the uBO dashboard. Dynamic filters are controlled from the pop-up interface when you click the uBO toolbar icon. Here you can create temporary or permanent filter rules to dynamically control the loading of images, JavaScript and frames on a global or per-domain basis. Dynamic filtering only becomes available after enabling the 'I am and advanced user' option in the uBO settings and it is crucial to read the uBO wiki before doing so.
Following are my personal preferences for setting up uBlock Origin. There are no "best" settings since every use case is different, however i like to think they provide a generally sensible template for those new to uBO. The configurations in the 2nd and 3rd columns of the table are intended to be used with the The Firefox Privacy Guide For Dummies! and the Firefox Configuration Guide for Privacy Freaks and Performance Buffs, respectively. In the former case the advanced mode option is disabled because i thought it might be too overwhelming for followers of the 'dummy' guide. Regardless of which guide you may be following, or if you're not using the guides at all, it is essential that you read the uBlock wiki.
Once uBO is installed, click its toolbar icon to reveal its popup user interface, then click the little sliders icon to reveal the "secret" Dashboard (i say "secret" because apparently some people don't know it exists and then complain about uBO not doing what they want). Following are the settings i recommend:
'Settings' tab
Settings not shown here are optional.
| Setting name | 'Dummy' guide settings | Advanced guide settings |
| Hide placeholders of blocked elements 1 | disabled | optional |
| Show the number of blocked requests on the icon | enabled | enabled |
| Privacy: | ||
| Disable pre-fetching | enabled | enabled |
| Disable hyperlink auditing | enabled | enabled |
| Block CSP reports | enabled | enabled |
| Uncloak canonical names | optional | enabled |
| Default behavior: | ||
| Disable cosmetic filtering | enabled | enabled |
| Block media elements larger than [50] KB | disabled | optional |
| Block remote fonts 3 | disabled | disabled |
| Disable JavaScript 4 | enabled | optional |
| Advanced: | ||
| I am an advanced user 2 | disabled | enabled |
Footnotes
1 - If you are new to uBO and content filtering, you should probably not enable this option. Leaving it disabled will sometimes provide a visual indication when something is blocked in the form of a placeholder where the object was, thus letting you know that something was blocked.
2 - This option may be enabled only after reading the Advanced user features section of the uBO wiki.
3 - Instead of blocking remote fonts globally and then allowing them per-site, you can automatically allow all 1st party fonts while blocking only 3rd party fonts. See the 'My filters tab' section below for more information. Novice users, or those that simply don't want to fool with filters for unblocking a 3rd party font needed for a given domain, may find it easier to set this to 'enabled' and then allow all remote fonts (1st and 3rd party) as needed from the uBO Dashboard.
4 - Enabling this option disables JavaScript globally by default and causes uBO to honor <noscript> HTML tags which are used to alter the web page for web browsers that don't support JS. A potential problem with this is that some page elements that might have been displayed had the <noscript> tags been ignored, may not display when this option is enabled. On the flip side, exactly the reverse may be true when this option is enabled in that the page may display desired elements, such as images, which would otherwise be hidden, or the page may display a JavaScript disabled warning message which can be helpful. Also see Display website content hidden by JavaScript. For anyone concerned with their on-line privacy, JavaScript should be disabled globally, then allowed on a per-site basis where necessary. If you are following the advanced guide then you can either enable the 'Disable JavaScript' master switch in uBlock's settings, OR block inline, 1st party and 3rd party scripts from the uBlock toolbar popup.
'Filter Lists' tab
Filter lists should be selected with care. Some filter lists are wholly or partially included in other lists, therefore one needs to consider how they interact with each other. You can discover this yourself by referring to the documentation for each list or simply reading its description which is often included within the list and accessible by clicking the 'eye' (view content) icon.
| General settings: | |
| Auto-update filter lists | enabled |
| Suspend network activity until all filter lists are loaded | enabled |
| Parse and enforce cosmetic filters | optional |
| Ignore generic cosmetic filters | optional |
| Network filters: | |
| My filters | enabled |
| Built-in: | |
| uBlock filters - Ads | enabled |
| uBlock filters - Badware risks | enabled 1 |
| uBlock filters - Privacy | enabled |
| uBlock filters - Quick fixes | enabled |
| uBlock filters - Resource abuse | enabled |
| uBlock filters - Unbreak | enabled |
| Ads: | |
| AdGuard Ads | disabled |
| AdGuard Mobile Ads | disabled |
| EasyList | enabled |
| Privacy: | enabled |
| EasyPrivacy | |
| AdGuard Tracking Protection | disabled |
| AdGuard URL Tracking Protection | enabled |
| Block Outsider Intrusion into LAN | enabled |
| Malware protection, security: | |
| Online Malicious URL Blocklist | enabled |
| Phishing URL Blocklist | enabled |
1 - Optional for Linux users, highly suggested for non-savvy Windows users
All other filter lists are optional.
Don't worry about the 'Regions, languages' section unless you browse sites in languages other than English in which case you'll want to enable those languages.
There are thousands of additional filter lists available for uBO, however i strongly advise you to be very careful about what ones you add, if any. In my experience the default filter lists offered by uBO are quite sufficient for general web browsing and adding more will use more memory, slow things down and potentially cause more conflicts and breakages.
'My filters' tab
You might wish to disable the 'Block remote fonts' option on the 'Settings' tab add the following to the 'My filters' settings instead. Depending on which line you uncomment (remove the ! ) you can allow all 1st party fonts while blocking all 3rd party fonts, or block all 3rd party fonts except for a single domain, or block all 3rd party fonts except for multiple domains. As written, the code below will allow all 1st party fonts while blocking all 3rd party fonts. All lines beginning with ! are comments and are not read by uBO.
! >>> UNCOMMENT ONLY ONE LINE AND EDIT IT AS NECESSARY <<< ! uncomment the line below to allow 1st party fonts + block 3rd party fonts (default): *$font,third-party ! uncomment the line below to allow 1st party fonts + allow 3rd party fonts for a single domain (example.com): !*$font,third-party,domain=~example.com ! uncomment the line below to allow 1st party fonts + allow 3rd party fonts for multiple domains: !*$font,third-party,domain=~example.com|~example2.net
'My rules' tab settings
If you are following the Firefox Configuration Guide for Privacy Freaks and Performance Buffs or otherwise using uBO on its own, and you have enabled the 'I am an advanced user' setting, you can optionally replace the default behind-the-scene rules on the 'My rules' tab with the the following, however understand that these filters can break some websites for which you may need to add exceptions by using uBlock's logger feature. The behind-the-scene * 1p-script block line can be omitted if you enabled the 'Disable JavaScript' option on the Settings tab:
no-large-media: behind-the-scene true behind-the-scene * 1p-script block behind-the-scene * 3p block behind-the-scene * 3p-frame block behind-the-scene * 3p-script block behind-the-scene * image block behind-the-scene * inline-script block
If you have enabled the 'Disable JavaScript' option on the Settings tab, then CSS (style sheets) will be blocked by default and this will destroy the layout of many websites. One solution is to allow CSS globally by adding the following to your rules:
* http:// css noop
* https:// css noop
Recent changes
9-Dec-2024
- lots of changes to the filter lists tab section