-
Notifications
You must be signed in to change notification settings - Fork 472
How to create rules which apply everywhere, on all web sites
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:
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):
From there, we will create global rules which will allow embedded Youtube videos to work everywhere, on all web sites.
Select the global scope:
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):
Force a reload of the page to see the effect of these new rules:
Now let's find out if the video plays properly. Nope, it does not work:
Apparently we need to whitelist more stuff. Now the matrix shows a new entry, googlevideo.com
, this must be it:
Again, select the global scope:
Whitelist everything from googlevideo.com
:
Force a reload of the page:
Let's find out if this fixes the embedded Youtube video. It does, the Youtube video plays fine now:
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):
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:
As seen in the matrix, the global rules created above are propagating to the narrower domain scope:
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.
uMatrix: Point and click matrix to filter net requests according to source, destination and type.