Embed keys and domains
An embed key is a string starting with sl_embed_ that says which site the script is on. A key works on one domain and all of its subdomains.
Making a key
Keys are made under API Key in the dashboard, where you can give each a label such as the site it is for. The key goes in the script tag as data-key; see Install the script.
The key is meant to be public: it ships in your HTML, and it grants nothing by itself. Reading and writing comments still happens as the visitor's own session, under the database's row-level security.
What a key does
On every page load the script sends the key and the page's hostname to SharedLayers and gets back the site it stands for, whether the account may embed, and whether this hostname is allowed. Only then does it draw anything. A key that fails this check makes the script log one warning and stop. The check cannot be skipped from the page: without it the script has no site to show comments for.
One domain, with its subdomains
There is nothing to set up. The first time the script loads with a new key, the key takes that page's domain, and from then on it works there and on every subdomain of it. The key's card in the dashboard says which: On acme.com.
- A domain comes with its subdomains.
acme.com,www.acme.com,staging.acme.comanduat.acme.comare one domain, so one key covers production, staging and every other environment on it. Each of those addresses still keeps its own comments and layers. - A domain is what you register, worked out from the Public Suffix List:
acme.co.ukis one domain, and so isacme.com.au. - On any other domain the key refuses to load, and the console says which domain it is for. Make a key for that site, or remove the domain from the key in the dashboard; the next domain the key loads on then becomes its domain.
Addresses that never count
These work with any key and never become its domain:
- A hosting platform's own addresses, such as
acme.pages.dev,acme.vercel.app,acme.netlify.apporacme.github.io: every name in the Public Suffix List's private section. So a site on its own domain still has comments on its platform previews, with the same key. - Your own computer and your local network:
localhost,127.0.0.1and addresses such as192.168.1.20. On your own computer the script keeps comments in the project folder; see Apps on your computer.
Keys and your plan
Installing by script is part of the Pro plan, and how many domains your account can have comments on is set by the plan: Pro comes in blocks of five, under Plan in the dashboard. Make one key per site: it is what lets you revoke one site without touching the others.
Keys made before 23 October 2026 could take up to five domains. They keep those domains, and take a new one only once they have none left.
Revoking and regenerating
Revoking a key makes every snippet that carries it stop loading, immediately on the next page view. Comments are not deleted. Regenerating a key gives it a new string while keeping the same site and comments; update the snippet and the old string stops working.
A revoked key and a mistyped key look the same to the script, and both produce the “not recognised” warning listed under Console messages.