1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-07 05:43:37 +12:00
0 Setting Domain Specific & Global Rules
Raymond Hill edited this page 2017-04-27 18:42:52 -04:00

This is a community-provided guide. Community-provided guides may or may not reflect my opinion of how to optimally use uMatrix. Feel free to contribute a guide.


The example below demonstrates how to create rules within uMatrix for either Domain Specific Rules or Global Rules which allows a user to achieve desired site functionality (e.g. The user wants to be able to always play embedded youtube videos on a website)

Setting Domain Specific Rules

For the steps below we will use an example website which has a youtube video embedded on the page.

  1. Select the Domain

From the uMatrix panel in the top left corner, make sure the selection is a blue domain which should show the website domain you are currently on.

step01_panel_onedomain


  1. Whitelist Rules

Select the rules you want to allow from the 3rd party domain.

step02_whitelistrules_onedomain

In example above we are allowing scripts and frames to load from 'www.youtube.com' on 'digg.com' only.


  1. Save the Rules

Click the unlocked padlock icon from the uMatrix panel to permanently save the new rules you have just allowed.

step03_saverules_onedomain

Alternative Method

Open the uMatrix dashboard and click on the 'My rules' tab. Make your temporary rules permanent by committing them by clicking on the step03_commit button.

step03alt_saverules_onedomain

The above method to make rules permanent is an alternative approach to clicking the padlock icon from the uMatrix Panel


  1. Refresh the Page

Click the step04_refresh icon in the uMatrix Panel to refresh the example website and test if the rules you have set allow the desired site behavior.


  1. Repeat Steps 1-4 as Needed

Repeat Steps 1-4 until the website functions in the desired manner -- For this example, we want the youtube video to fully load and allow playback in the example website.

step05_youtube_onedomain

Scripts for domains 'www.youtube.com', 'youtubei.youtube.com' & 's.ytimage.com' as well as XHR requests for 'googlevideo.com' & 'www.youtube.com' and frames for 'www.youtube.com' have now been allowed on 'digg.com' only.

Rules you set following the steps above should now only apply to the selected website.' (In this example, digg.com)



Setting Global Rules

For the steps below we will use an example website which has a youtube video embedded on the page.

  1. Select the Global Domain

From the uMatrix panel in the top left corner click the blue domain which should show the website domain you are currently on and select '*' instead of the domain you are currently on.

step01_panel_global


  1. Whitelist Rules

Select the rules you want to allow from the 3rd party domain.

step02_whitelistrules_global

In example above we are globally allowing scripts and frames to load from 'www.youtube.com'


  1. Save the Rules

Click the unlocked padlock icon from the uMatrix panel to permanently save the new rules you have just allowed.

step03_saverules_global

Alternative Method

Open the uMatrix dashboard and click on the 'My rules' tab. Make your temporary rules permanent by committing them by clicking on the step03_commit button.

step03alt_saverules_global

The above method to make rules permanent is an alternative approach to clicking the padlock icon from the uMatrix Panel


  1. Refresh the Page

Click the step04_refresh icon in the uMatrix Panel to refresh the example website and test if the rules you have set allow the desired site behavior.


  1. Repeat Steps 1-4 as Needed

Repeat Steps 1-4 until the website functions in the desired manner -- For this example, we want the youtube video to fully load and allow playback in the example website.

step05_youtube_global

Scripts for domains 'www.youtube.com', 'youtubei.youtube.com' & 's.ytimage.com' as well as XHR requests for 'googlevideo.com' & 'www.youtube.com' and frames for 'www.youtube.com' have now been globally allowed.


Rules you set following the steps above should now be global and apply to all websites.



Please keep in mind that out of the box, uMatrix is a powerful third party script blocker that may impact the full functionality of many websites. Because of this it is designed and intended to be used by advanced users.