uBlock Origin Suggested Settings

uBlock Origin

See the change log at the end for a complete revision history.


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 and i would highly recommend avoiding them.

uBlock Origin is not simply an ad blocker as many might assume, 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 block JavaScript, frames, images, 3rd party fonts and more, as well as help to prevent tracking and malware.

So what is the difference between static and dynamic filtering you ask? Static filters are filter rules which are provided by the various filter lists. Essentially you have no control over the filters provided by these lists; they are either enabled or disabled. Static filters filter out content like ads, malware, tracking technologies, annoyances and more. 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 control images, JavaScript and frames and the rules can be applied globally or per-domain. Dynamic filtering only becomes available after you enable the 'I am and advanced user' option in the uBO settings and it is crucial to read the uBO wiki before enabling this option.

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 are generally sensible settings to start with. 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 felt it would be too overwhelming for 1st time users and followers of the 'dummy' guide.

Regardless of which guide you are following, it is essential that you read the uBlock wiki with the exception of the Advanced-user-features section. If you are not following either guide i would highly suggest enabling the advanced mode option in uBO in order to leverage its dynamic filtering capability, as well as reading the Advanced-user-features section of the 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 quite a few people don't know it exists). These 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 optional
Disable tooltips disabled optional
I am an advanced user disabled 2 enabled
Disable pre-fetching enabled enabled
Disable hyperlink auditing disabled 3 disabled 3
Block CSP reports enabled enabled
Uncloak canonical names enabled enabled
Default behavior:
Disable cosmetic filtering enabled enabled
Block media elements larger than [50] KB disabled optional
Block remote fonts disabled enabled
Disable JavaScript 4 enabled optional
[1] If you are new to uBO and content filtering, you should probably not enable this option. Leaving this option 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] This option can be left disabled as long as dom.security.https_only_mode is enabled in your user.js or user-overrides.js, otherwise it should be enabled. [4] Enabling this option disables JavaScript globally by default and causes uBO to honor <noscript> HTML tags. 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, some websites may display a JavaScript disabled warning message which can be beneficial for novices. Also see Display website content hidden by JavaScript and Display YouTube videos hidden by JavaScript. For anyone concerned with their on-line privacy, JavaScript must be disabled globally, then allowed only for the websites where the functionality it provides is 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.


Next we want to temporarily enable the 'I am an advanced user' option after which a little gear icon will appear to the right of the "I am an advanced user" text. Click the icon to display some advanced settings and change suspendTabsUntilReady to yes. Although there is no guarantee, when you start Firefox uBO will attempt to delay network requests until it is fully loaded. This is most useful if you exit Firefox with open tabs and have it set to restore your previous tabs on restart. If you are following one of my Firefox guides, don't forget to return to the Dashboard and disable the 'I am an advanced user' option.

'Filter Lists' tab

Filter lists:
Auto-update filter lists enabled
Parse and enforce cosmetic filters disabled
Ignore generic cosmetic filters enabled
Network filters:  
My filters​​​​​ enabled
uBlock filters​ enabled
uBlock filters – Badware risks​ 1 enabled
uBlock filters – Privacy​​​​​ enabled
uBlock filters – Resource abuse​​​​​ enabled
uBlock filters – Unbreak​​​​​ enabled
AdGuard Base disabled
AdGuard Mobile Ads​ 2 disabled
EasyList​ enabled
AdGuard Tracking Protection​ disabled
Block Outsider Intrusion into LAN enabled
EasyPrivacy enabled
Malware domains:
Online Malicious URL Blocklist enabled
Spam404 enabled
AdGuard Annoyances​ enabled
AdGuard Social Media​ disabled
Anti-Facebook List​ disabled
EasyList Cookie optional 3
Fanboy’s Annoyance enabled
Fanboy’s Social disabled
uBlock filters – Annoyances​​​​​ enabled
Dan Pollock’s hosts file​ disabled
MVPS HOSTS​ disabled
Peter Lowe’s Ad and tracking server list​ disabled
[1] Optional for Linux users [2] Enable if using Firefox on a mobile device [3] Enabling this list will hide a lot of those idiotic cookie notices


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.

As of this writing you can find over 12 million filter lists on the FilterLists website, however i strongly advise 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 break more web pages.

'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. Only uncomment one line.

! uncomment the line below to allow 1st party fonts + block 3rd party fonts: *$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 a 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:

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 noop
behind-the-scene * inline-script block

If you are using the LocalCDN add-on you will need to add some rules to the 'My Rules' tab in the uBO Dashboard. The rules can be found in the preferences section of the LocalCDN add-on from where you will copy the rules specific to uBlock. After copying the rules, paste them on a new, blank line in the 'Temporary rules' section of the 'My Rules' tab after which you need to save and commit the changes. When adding the rules, be sure to remove any conflicting rules for the same domains if there are any (there won't be if you're starting fresh).

Dynamic filtering

If you are running uBO with the 'I am an advanced user' option enabled in order to activate dynamic filtering, i recommend setting the following rules in the 'Global rules' column of the popup interface:

uBlock Origin - suggested dynamic rules

Setting the 'images' item to gray (noop) will allow all images everywhere, but still subject them to the static filter lists which may remove some annoying ones. All of the rest you should set to red to block these resources globally, then allow them (noop/gray) as needed per domain in the local rules column.


Click to expand...


  • remove 'Prevent WebRTC from leaking local IP addresses' in 'Settings tab' table since it's no longer present
  • removed 'Advanced guide settings, with uMatrix' column in 'Settings tab' table since uM is no longer developed
  • removed all references to uMatrix
  • removed the 'behind-the-scene * * block'  filter from the 'My rules' tab settings section
  • added 'Block Outsider Intrusion into LAN' filter setting in the 'Filter Lists' tab section
  • misc. edits


  • changed setting for WebRTC and updated the footnote - thanks to commenter 'black_mamba'


  • added a footnote regarding WebRTC


  • added the 'Uncloak canonical names' setting
  • removed 'Fanboy’s Enhanced Tracking List​' (thanks to 'tiger_man' for informing me of a change)
  • minor edits


  • re-added the 'My filters tab' section with code to block all 3rd party fonts while allowing all 1st party fonts
  • minor edits


  • several edits and a few changes to the 'Settings tab settings' section
  • changed the value of the behind-the-scene * image filter from 'block' to 'noop' in the 'My rules tab settings' section
  • minor edits


  • changed the setting for the 'Disable hyperlink auditing' option


  • fixed formatting and made minor change to the 'My rules tab settings' section
  • added missing settings for 'images' and '3rd-party' rules
  • rewrote the 'Dynamic filtering' section
  • minor edits


  • edited information regarding remote fonts
  • added a footnote for the 'Disable JavaScript' setting
  • reversed order of change log items (newest first)
  • minor edits


  • updated the information for the behind-the-scenes rules\


  • updated 'Filter Lists tab settings' section - credit to reader '512Kb' for reminding me :)
  • removed link: Blocking Web Fonts for Speed and Privacy | InfoSec


  • minor edit: expanded instructions for adding LocalCDN rules to uBO


  • edited unclear/incorrect information
  • added a 4th column to the 'Settings tab' section for advanced users not following either of my guides and using uBlock Origin without uMatrix
  • misc. minor edits


  • minor edits


  • corrected an error in the 'My rules tab settings' section - thanks to commenter 'Hash' for notifying me


  • removed information regarding the CSP (Content Security Policy) issue since this is fixed with Firefox v77


  • replaced reference to Decentraleyes with LocalCDN and added additional information


  • changed 'I am an advanced user' setting from 'enabled' to 'disabled' for the 'Advanced guide settings' - i don't know why i ever had this set to 'enabled', especially for those using uMatrix, which is the case in the advanced guide
  • removed filter lists no longer included with newest version of uBO - thanks to 'theltalpha'
  • minor edits


  • removed Adblock Warning Removal List (thank you 'someone')


  • updated filter list settings
  • minor edits


  • removed cnameAliasList from uBO settings (depreciated)
  • minor edits


  • changed value of suspendTabsUntilReady from true to yes
  • separated settings according the Firefox guide being followed
  • added a table of contents
  • misc. edits


  • added info regarding cnameAliasList option


  • article first published


Note that both reader and my comments, while they may have been accurate at the time, might be inaccurate today. This is a highly dynamic environment so please verify the accuracy of comment content should you wish to utilize it. Failing that, ask me and i'll give it a crack.

109 thoughts on “uBlock Origin Suggested Settings”

  1. uB0 v1.38.0:
    The setting “Prevent WebRTC from leaking local IP addresses” has been removed since it is no longer necessary in modern browsers, except for Firefox for Android where the issue is still present.

  2. Hi
    Regarding Cname: I got the setting: “Uncloak canonical names” enabled; but I’m not quite sure whether I’m actually protected by cname-tracking or whether ublock “just” detects this kind of tracking and leave further action of how to deal with this up to me. The cname is not blocked=green, and when I open the logger no blocking here either as far as I can see.

    1. i’m not 100% certain and i don’t have time to look into it at the moment, but i’m fairly sure that when you enable uncloaking you can prevent the tracking because, when you enable the setting, you’ll see hosts in the uBO pop-up interface that are colored blue and those are the ones that cname uncloaking exposes and therefore they can be blocked

    1. very interesting – thanks for sharing!
      it’s very new and reading through the uBO issue you linked to, i’m not sure how well versed the author is in RegEx, so personally i think i’ll let the project bake a while before kicking the tires but, yeah, i too am all for dumping as many extensions as possible

      1. I don’t know if it’s the author being inexperienced as you said or the fact that it’s a filter list and not an extension like ClearURLs but after using it for a whole day I can agree with you that it needs some serious polishing as I noticed it removes parameters for sites that have no tracking parameters in their urls thus rendering them almost unusable. I’ll stick with ClearURLs for now.

        1. i don’t use gaagle directly so i don’t know what pop-up you’re referring to, nor do i log on to ThemTube

          Firefox has a built-in pop-up blocker and you could also use CSS if you know how – i use basically the same config as outlined in the advanced guide, less uMatrix (i’m testing without it), and i never see any pop-ups anywhere – i do see stupid CSS-styled overlays on occasion, but i destroy them with CSS

          uBO also has an element hider function you might find useful

            1. if you’ve set up uBO according to my guide, check that ‘element hiding’ is not disabled – uncheck ‘Disable cosmetic filtering’ in settings and on the filter lists tab, check “Parse and enforce cosmetic filters”

                  1. your recommendations (and settings) do work for for example for translate.google com or maps.google com, but they don’t work for youtube.com. one still gets the “sign in to youtube” popup

                  2. the problem with youtube/google exists only if the users IP is in EU and while using Firefox.

                    using Brave browser there is no need to turn on uBlock at all as well as turn on built into the browser trackers&ads blocking or fingerprints blocking.

                    1. i don’t know what the YT pop-up looks like – if it’s a DIV layer, you can easily kill it with CSS – if it’s a page that forwards, you can possibly use a redirect

                      whatever the case, more people need to stop using the platform

  3. Hi
    It puzzles me, that the filterlists in UblockOrigin do not update automatically, even though auto-update is enabled. I noticed a while ago, but I don’t know for how long this has been the case. at one point after a manual update, I discovered 3 cookies set by some of these filterlists. I don’t recall which. normally I only allow cookies, if necessary. Any suggestions to why this happens and how to solve it?
    Best Regards

    1. odd, in my case the filter lists are auto-updating as they should

      regarding cookies being set by a filter list, i didn’t even know that was possible – can you provide more detail, such as how you knew they were set by a filter list and perhaps their name(s)?

        1. hmmm… not sure what to think of that – for the lists i use, cookies were set by…


          i tried looking at these cookies with the browser console and i’m not seeing anything that looks nefarious to me – i suspect they are probably set in order to establish the time that the client last updated the lists, perhaps to avoid unnecessary concurrent downloads from the same client – that’s just a guess though and, frankly, i’m not concerned enough to look into it deeper, but if you do, let us know

          thanks for reporting this

          1. exactly the same cookies as mentioned by you, are set in my browser too.
            Besides: am I supposed to activate “purge all caches” once in a while, given the fact that these filterlists do not auto-update? I’m not quite sure what the term means/involves in regards of UblockOrigin settings

            1. you should not ever have to purge the filter lists cache and they should update automatically

              i think the purge thing is for when you want to disable a list where purging will remove it from memory

              when you purge, are you able to manually update this lists? and are you sure they are actually updated? – to test, disable your network connection, purge a list, click the ‘eye’ looking icon (view content) for the list and make sure the list is empty, then enable your connection and manually update and check the list again


              enable the ‘I am an advanced user’ setting and you’ll see a gear icon appear right after that option – click that and then press Ctrl+F and enter:


              and check those settings – here’s mine:

              assetFetchTimeout 30
              autoUpdateAssetFetchPeriod 120
              manualUpdateAssetFetchPeriod 500
              updateAssetBypassBrowserCache false

              also check…
              autoUpdateDelayAfterLaunch 180

              on a side note, try setting uiTheme to dark … pretty cool

              don’t forget to disable advanced mode

              if that doesn’t straighten things out, let me know and we’ll dig deeper

              1. I found all the mentioned asset settings as well as autoUpdateDelayAfterLaunch and with the same numbers. I think things might work as they should by now: when I hover over the clock-symbol all lists have been automatically updated after the date of my manual update.
                I feel a bit uneasy about the cache purge action: it is not clear to me how to purge one list without disabling all the others. I will leave it be and cross my fingers for the update problem to be solved.
                I searched for how to change theme color but couldn’t find where to do this. Is it the colorblind- help out -option in the settings?

                1. you can’t purge a single list apparently – sorry, i didn’t realize that

                  to change the theme color, enable advanced mode and in the advanced settings change the value of uiTheme – i didn’t look up what the possible values are, but i found that ‘dark’ works

                    1. if you want to change the theme, yes, replace ‘unset’ with ‘dark’ – 3 possible values are ‘light’ ‘dark’ and ‘unset’

  4. Hello. I tried looking at the uBO wiki but couldn’t find an answer (at least in plain view, I’m still a newbie) so I ask you: what does “no-large-media: behind-the-scene true” do and should I set it to true if I have the “Block media elements larger than …” option enabled?
    Thank you and keep up the good work.

    1. from the wiki…

      Behind the scene network requests

      This wiki page is out of date and in need of revision. When this documentation was created, the behind-the-scene network requests uBlock Origin was able to see and filter originated from many places, such as those from other extensions or from various browser operations (ex.: real-time search suggestions).

      Since then things have changed: uBO no longer can see network requests from other extensions, and behind-the-scene network requests are now quite less frequent. Furthermore, the webRequest API now provides more context to event listeners, such that it is often possible to still filter properly even when it’s not possible to know from which exact tab a network request originates.

      Because of this (and other reasons which will eventually come to light – the “Who Left Open The Cookie Jar?” vulnerability), starting with uBO 1.15.20, the behind-the-scene scope will no longer be on the Trusted sites list by default, meaning network requests from the behind-the-scene scope will be subject to filtering by default.


      The filtering of behind-the-scene network request is available to advanced users.

      What are behind-the-scene network requests

      Behind-the-scene network requests are network requests which uBlock cannot associate with a specific tab in your browser: these requests come from somewhere, but uBlock is missing information to report exactly from where.

      All network requests without a specific origin are classified as behind-the-scene.

      i’m really not sure how to advise regarding this setting – i have it set to ‘false’ for potentially less breakage, but that may not be necessary

      behind-the-scene stuff is, as it says, requests that uBO can’t associate with a tab (doesn’t know where the request originated) – the ‘Block media elements larger than’ option is for media elements that CAN be associated with a tab – this sets the default for the per-site switch on the main pop-up, ‘click to block large media elements for this site’ – so if you don’t want media elements larger than ‘x’ to be loaded for a given site, you can specify a size and then use the per-site switch

      personalty, i wouldn’t bother unless you need to conserve bandwidth – most all this stuff will be blocked by default anyway if you have blocked JS globally (which you should) – then you can allow JS per-site or certain JS (such as for youtube) globally

      also see…

      No large media elements

      1. Actually I have it enabled not for bandwidth saving but because I have an 11 years old laptop running Win7 (can’t install a Linux distro on it thanks to the graphic chip…) with only 4gb of ram and I thought that would help in terms of performance. Dunno if this assumption is correct though.
        I guess I’ll have to start getting used to disable js and whitelist sites I uses regularly.

        Another thing: I dumped LocalCDN because I read it’s basically redundant with the arkenfox user.js (and also because like I said the less stuff I have installed the better) but I noticed I have to whitelist a lot more stuff in uBO now to make sites work (Cloudfare mostly), so do you think I should go back to it or keep whitelisting them as I use said sites?

        1. Linux is great for older machines i’ve heard (over and over) – as far as the graphic chip, you *should* be able to use the open source driver at least

          i don’t think (really not sure though) blocking large media will help performance wise, but pages with large media might load faster

          > I dumped LocalCDN because I read it’s basically redundant with the arkenfox user.js …

          true, but sites relying on CDNs will likely take a bit longer to load since that content is no longer loaded locally

          > … do you think I should go back to it or keep whitelisting them as I use said sites?

          totally up to you – personally i still use LocalCDN for speed reasons and because i don’t think the redundant privacy hurts anything

          1. I reinstalled LocalCDN after all and started getting used to hard blocking mode + JS disabled, it’s actually pretty comfy, pages finally load faster. Sure, the ‘My rules’ panel is loaded with lines now but it can’t be helped I guess.


            >Linux is great for older machines i’ve heard (over and over) – as far as the graphic chip, you *should* be able to use the open source driver at least

            I know, I have an even older netbook with Bunsenlabs on it and it goes like a true champ. Unfortunately the laptop I use regularly (and has a bigger screen too) is “infected” with the SiS Mirage 3+ 672 graphic chip and the 2 solutions I found (1: https://gist.github.com/fevangelou/46a2885233c45011ad5c8752f18eac73 , 2: https://linux-sis-driver.weebly.com/linux-ubuntu-distros-and-the-infamous-sis-chips/linux-driver-for-infamous-sis-671-672-771-772-717) don’t work no matter how many times I try… Oh well.

            1. > JS disabled, it’s actually pretty comfy, pages finally load faster.

              sure do, also most tracking and fingerprinting (and malware, pop-ups, etc.) require JS

              so you’re using uBO without uMatrix i take it?

              1. >sure do, also most tracking and fingerprinting (and malware, pop-ups, etc.) require JS

                Well they load faster because there’s nothing left to load most of the times, hahaha

                >so you’re using uBO without uMatrix i take it?

                Yeah, I’m still at the stage of constantly learning how to use uBO properly. Also from the little I’ve read uBO can actually do a fair amount of the things uM does, so I feel comfortable using just one right now.

                A question: have you ever thought of making a uMatrix setup guide just like this one? I know you basically already did in the Freaks Firefox guide but having a separate one would be nice.

                1. > uBO can actually do a fair amount of the things uM does

                  it can, but if you want granular control uM is easier to work with IMO – actually i think it’s easier period, but it might be a good thing if you stuck with uBO for a bit and learned how to use it well – the wiki is a great resource and it actually covers some stuff that’s missing in the uM wiki

                  > have you ever thought of making a uMatrix setup guide…

                  i recommend uM in the advanced guide only, so no – i broke out the uBO guide from both config guides only because a lot of the stuff was redundant and i got tired of having to edit both guides every time i changed stuff for uBO in one of them

                  1. Fair enough.

                    Last question: what’s the rationale you used on selecting these Filter lists? For example, the uBO wiki recommends the “Peter Lowe’s Ad and tracking server list” enabled for medium blocking mode and higher but you have it disabled in your guide?

                    1. that’s a hosts file list and they can be problematic for some reason – this is even discussed in one of the wiki’s i think – my choices are based on my experiences and pretty much never give me any trouble

  5. Hi!

    I did scan my ~/home dirrectory with clamscan and it find:
    extensions/uBlock0@raymondhill.net.xpi: Urlhaus.Malware.191095-8836388-0 FOUND

    I did remove uBO, clean everything and was okay. After add uBO back there is the same find.

    Thank you.

    1. as long as you downloaded uBO from AMO or github, i’m sure you can ignore that – it’s almost certainly a false-positive

      also i’m not sure that clam is worth using on a Linux system – at least i was told it wasn’t from people more knowledgeable than myself

      i would also highly recommend NOT using any of the big name A/V’s on Linux either since they essentially are malware, and potentially very dangerous

Leave a Reply to 12Bytes Cancel reply

Your email address will not be published. Required fields are marked *