Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

How to whitelist a web site

gorhill edited this page Dec 15, 2014 · 27 revisions

I've seen a couple of feedbacks in the store of people who wish it was possible to whitelist a web site, i.e. to disable µBlock on a specific web site.

The feature is already available, it is the big power button: it serves to whitelist the current web site, its state will be remembered next time you visit the web site.

µBlock's popup

Detailed syntax

All whitelist directives are matched against the URL address of web pages.

As of version 0.8.2.0, the whitelist directive syntax is split into two classes:

  • Plain
  • Complex

Plain syntax is when using only hostname label(s), which means only the hostname portion of a URL will be taken into account. With plain syntax, the matching is performed by comparing the right-most portion of the page hostname with the whitelist directive. Wildcards are not allowed when using plain syntax.

Complex syntax occurs if and only if at least one / appears in a whitelist directive. Optionally, wildcard * can be used with complex directives for more flexibility.

If no / appears in a whitelist directive, and if the directive contains characters which are not allowed for plain hostname, then the whitelist directive will be commented out and ignored by µBlock.

Plain hostname

  • example.com: whitelist all pages from example.com or above (i.e. example.com, www.example.com).
  • www.example.org: whitelist all pages from www.example.org or above (i.e. www.example.org, forums.www.example.org, but not example.org).
  • org: whitelist all pages from TLD org (i.e. example.org, wikipedia.org).

Single web page

  • http://www.twitch.tv/letofski: whitelist only this one page, i.e. when the URL in the address bar matches exactly http://www.twitch.tv/letofski.

Section of a web site

  • http://www.twitch.tv/letofski*: whitelist this one page, and everything underneath, i.e. when the URL in the address bar starts exactly http://www.twitch.tv/letofski.

Specific pattern

Clone this wiki locally