Rule priority is not baked in stone, but roughly speaking, the more specific rule should win. Let’s look at some examples.
Precedence
When more than one rule can be applied, which one has precedence?
Rule priority is not baked in stone, but roughly speaking, the more specific rule should win. Let’s look at some examples.
Example 1 : youtube.com vs www.youtube.com
block youtube.com
allow www.youtube.com
Will https://www.youtube.com/ be blocked or not given the above two rules?
Short Answer: The main web page, https://www.youtube.com/ will not be blocked because allow www.youtube.com
is more specific than block youtube.com
.
Longer answer: Some sub-resources may be blocked, because some sub-resources may come from https://api.youtube.com/ , and allow www.youtube.com
is irrelevant to api.youtube.com, but block youtube.com
is relevant, and will instruct Plucky to block.
Advice: Avoid adding rules for both a domain and its subdomain (e.g., for youtube.com
and www.youtube.com
) because the result is almost never what you want. The main exceptions to this are huge sites such as google.com that has accounts.google.com, mail.google.com, store.google.com, etc.
Example 2 : https://www.youtube.com/ vs youtube.com
block youtube.com
allow https://www.youtube.com/
Will https://www.youtube.com/ be blocked or not given the above two rules?
It will be allowed, not blocked, because a url rule is more specific than a host rule.
Advice: Do not mix url and host rules. If you want to block or allow an entire host, then use a host rule, but if you want to allow some urls, but not others on a given site, then use only url rules for that host.
Example 3 : https://www.youtube.com/ vs https://www.youtube.com/watch
allow https://www.youtube.com/
block https://www.youtube.com/watch
Will https://www.youtube.com/ be blocked or not given the above two rules?
https://www.youtube.com/ won’t be blocked, but https://www.youtube.com/watch?v=ZpNGsZvM7VY will be blocked.
Example 4 : program vs url
allow program chrome.exe
block https://www.youtube.com/
Will youtube be allowed?
In Chrome, yes, https://www.youtube.com/ will be allowed because the allow program chrome
rule is high priority.
Example 5 : user vs url
allow user jon
block https://www.youtube.com/
Will youtube be allowed?
For jon, yes, https://www.youtube.com/ will be allowed because the allow user jon
rule is high priority.
Example 6 : everything vs url
allow everything
block https://www.youtube.com/
Will youtube be allowed?
Yes, because allow everything
is nearly the highest priority rule possible, second only to block everything
.
Example 7 : block, flee, and unblock
block youtube.com
flee + word pizza
unblock www.youtube.com
Will https://www.youtube.com/ be allowed if it does not contain the word pizza? Yes.
Will https://www.youtube.com/ be allowed if it contains the word pizza? No, because unblock
does not prevent flee
from working.
Last updated: 2023-06-13