How to whitelist a web site

Raymond Hill edited this page May 15, 2016 · 35 revisions

I've read a couple of feedbacks of people who wish it was possible to whitelist a web site, i.e. to disable uBlock on a specific web site.

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

uBlock's popup

Detailed syntax

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

As of version uBlock, the whitelist directive syntax is split into three classes:

  • Plain
  • Complex
  • Comment

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, the wildcard * can be used with complex directives for more flexibility.

A comment is a line prefixed with #. Comments are ignored by uBlock.

If no / appears in a whitelist directive, and if the directive contains characters which are not allowed for a plain hostname, then the whitelist directive will be commented out and ignored by uBlock. This allows you to fix your directive.

Plain hostname

  • whitelist all pages from or above (i.e.,
  • whitelist all pages from or above (i.e.,, but not
  • org: whitelist all pages from TLD org (i.e.,

Single web page

  • whitelist only this one page, i.e. when the URL in the address bar matches exactly

Section of a web site

  •*: whitelist this one page, and everything underneath, i.e. when the URL in the address bar starts exactly with

Specific pattern

  • **

Wildcards can be used at any position. However, when a wildcard is used within the hostname portion of a directive, it cannot be at the end of the hostname, and also must be at the boundary of a hostname label.

Other details

If you re-enable uBlock by clicking the whitelist button in the popup while a whitelist directive you handcrafted is in effect, your handcrafted whitelist directive will simply be commented out. This way you can bring it back to life if ever you un-whitelist by mistake.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.