[blocking]

Which domains are blocked, which never are, and which devices skip filtering.

Keys

KeyTypeDefaultDescription
enabledbooleantrueFilter queries against the lists. The web UI's pause buttons switch this off for a while without touching the file.
modestring"null"How a blocked query is answered: "null" (A gets 0.0.0.0, AAAA gets ::, other types an empty answer), "nxdomain" or "refused".
listsarray of stringstwo lists, belowBlocklists: http(s) URLs or local file paths. Hosts files, plain domain lists and AdBlock-style lines are accepted and can be mixed.
allowarray of domains[]Domains that are never blocked, with their subdomains. Allow wins over every list.
denyarray of domains[]Extra domains to block, with their subdomains.
unfiltered_clientsarray of IPs or CIDRs[]Clients that are never blocked.
refreshduration"24h"How often the lists are downloaded again. The minimum is 1m.
cache_dirpath"/var/lib/sito/lists"Where downloaded lists are saved. If a download fails, the saved copy is used.

The default lists are StevenBlack's hosts and HaGeZi's multi list, about 229,000 domains together.

List formats

Sito reads each line of a list and keeps the domain. These three forms are recognised, and one list can mix them. A listed domain also blocks its subdomains.

# hosts file
0.0.0.0 ads.example.com

# plain domain list
tracker.example.net

# AdBlock-style
||telemetry.example.org^

Unfiltered clients

Some devices misbehave behind a filter: a work laptop on a VPN, a smart TV that refuses to start. List their addresses in unfiltered_clients and their queries skip step 3 of the pipeline: allow, deny and the lists. Local records and conditional forwarding still apply, and their queries are still logged.

Example

[blocking]
lists = [
  "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
]
allow = ["example.com"]
# work laptop: the VPN breaks when filtered
unfiltered_clients = ["192.168.1.42", "192.168.1.0/28"]

Save the file and Sito reloads it within seconds. Changes made in the web UI are written back here, with your comments kept.