Sitekey
A sitekey functions as a special identifier that a server may attach to a resource to enable filtering decisions regarding content delivery.
How Sitekeys Work
These identifiers typically allow legitimate resources from particular servers serving multiple domains. When users visit different websites handled by the same sitekey server, network response headers contain x-adblock-key encoding the sitekey information.
Server-Side Sitekey Computation
The sitekey server combines three data points separated by null characters:
-
The requested URL path with query parameters
-
The host contacted by the client
-
The client's user agent string
Example input:
/page.html?param-value\0catstoys.com\0Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Using a permanent secret private key, the server encrypts this input to generate a unique hash signature. The server returns two components:
-
Signature: The encrypted output (changes per request)
-
Sitekey: The public key (remains constant)
These combine with underscore separation (format: sitekey_signature) and transmit via the x-adblock-key header.
Example combined value:
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANnylWw2vLY4hUn9w06zQKbhKBfvjFUCsdFlb6TdQhxb9RXWXuI4t31c+o8fYOv/s8q1LGPga3DE1L/tHU4LENMCAwEAAQ_nLH8Vbc1rzmy0Q+Xg+bvm43IEO42h8rq5D9C0WCn/Y3ykgAoV4npzm7eMlqBSwZBLA/0DuuVsfTJT9MOVaurcA=
Browser-Side Processing
Upon receiving x-adblock-key headers, browsers split the string into separate sitekey and signature components. Because the browser possesses the signature's three parameters and the public key, it can verify the sender possesses the corresponding private key.
This verification confirms the server's legitimacy as a sitekey provider. Applicable filter rules then enable allowlisting:
@@$document,sitekey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANnylWw2vLY4hUn9w06zQKbhKBfvjFUCsdFlb6TdQhxb9RXWXuI4t31c+o8fYOv/s8q1LGPga3DE1L/tHU4LENMCAwEAAQ
Such filters enable resource loading and disable element hiding on pages featuring the specified sitekey.