Site rules
Overview · Actions · Site rules · Export & import · Permissions · FAQ
Every shortcut carries its own site scope. There are three modes.
| Mode | Behaviour |
|---|---|
| All sites | The default. The shortcut works everywhere. |
| Only these sites | An allow list. The shortcut works on the listed hosts and nowhere else. |
| Except these sites | A deny list. The shortcut works everywhere but the listed hosts. |
How a pattern matches
Patterns are matched against the page's hostname. One pattern per line.
| Pattern | Matches | Does not match |
|---|---|---|
example.com |
example.com, www.example.com, a.b.example.com |
notexample.com |
*.example.com |
Identical to the line above — the bare domain and its subdomains | notexample.com |
A plain domain already includes its subdomains, so
example.com and *.example.com behave the same way.
The *. form exists because people expect to be able to write it;
it is not a different rule. There is no pattern that matches a domain
without its subdomains.
Paths, query strings and ports are not part of the match. A rule for
github.com applies to every page on GitHub.
Write the bare hostname. You do not have to be careful about the
shape of it: GitHub.com, https://github.com,
github.com/user and github.com:3000 are all read as
github.com when the rule is saved. One form is not guessed at, because
two readings are possible: *github.com, a wildcard with no dot. The options
page leaves that line alone and says so under the box — write
*.github.com, or plain github.com, which already covers
subdomains.
Worked examples
- Mute only where you watch video. Bind Alt+M
to Mute / unmute tab, mode Only these sites, patterns
youtube.comandtwitch.tv. Both cover their subdomains automatically. - Keep a shortcut away from an app that already uses it. Bind
Alt+J to Next tab, mode Except these sites,
pattern
docs.google.com. It works everywhere else. - Two different actions on the same keys. Nothing stops you binding the same combination twice with non-overlapping site scopes — the first matching rule in list order wins. New rules land at the end of the list, and each row has up and down buttons if you need a narrower rule to win over a broader one.
What happens on pages the extension cannot reach
Chrome does not allow extensions to run on its own internal pages
(chrome:// addresses, the Web Store, and the new tab page in some
configurations). Page-level shortcuts do not fire there. This is a browser rule,
not a setting.