Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

How to create rules which apply everywhere, on all web sites

Raymond Hill edited this page Nov 30, 2017 · 13 revisions

Just a quick guide to show how to create rules which apply everywhere. This is convenient for domains which use is widespread and which you trust. First an example page -- notice the embedded Youtube video in it (a common occurrence), which is being blocked by uMatrix:

a

The popup panel shows what you get when using uMatrix with out-of-the-box ruleset (correction: the cookie block rule is not part of the out-of-the-box ruleset, it's my own rule I forgot to remove):

a

From there, we will create global rules which will allow embedded Youtube videos to work everywhere, on all web sites.

Select the global scope:

a

Once the global scope is selected, whitelist everything from youtube.com, and also whitelist frame for youtube.com (a necessary step since 3rd-party frames are blocked with default ruleset):

a

Force a reload of the page to see the effect of these new rules:

a

Now let's find out if the video plays properly. Nope, it does not work:

a

Apparently we need to whitelist more stuff. Now the matrix shows a new entry, googlevideo.com, this must be it:

a

Again, select the global scope:

a

Whitelist everything from googlevideo.com:

a

Force a reload of the page:

a

Let's find out if this fixes the embedded Youtube video. It does, the Youtube video plays fine now:

a

Since these global rules proved to work fine to unbreak embedded Youtube videos, it's a good idea to make them permanent by clicking the padlock (rules are all temporary by default in uMatrix):

a

Now you have created three global rules which will un-break embedded Youtube videos on all sites. In this other site the embedded Youtube video plays just fine without having to fiddle with uMatrix:

a

As seen in the matrix, the global rules created above are propagating to the narrower domain scope:

a

Sidenotes

For reference, the three rules created in the current tutorial were:

* youtube.com * allow
* youtube.com frame allow
* googlevideo.com * allow

If you know beforehand which domains you want to trust everywhere, you can enter the rules directly in the My rules pane in the dashboard. A rule which applies on all sites would look like this:

* ajax.googleapis.com * allow

Just replace ajax.googleapis.com with whatever is in your list of trusted domain names.

Always keep in mind that all rules you create are temporary, so you have to explicitly persist them using the padlock to make them permanent.

The badge count on the padlock shows you how many temporary rules have not been saved in the current context. It won't show you temporary rules from other contexts however. You may go to My rules pane in the dashboard to see all the current temporary rules.