Sites and keys
Each site in the dashboard has its hostnames, a mode, a protection level and its keys. Changes reach the check usually within a minute or two.
Hostnames
The check runs only on pages served over https from a hostname listed on the site.
- List exact hosts, like
shop.example.com, or wildcards, like*.example.com. - A wildcard matches subdomains at any depth (
a.example.com,a.b.example.com) but not the apex. Listexample.comseparately. - Hostnames are lowercase DNS names with at least two labels: no IP addresses, ports, paths or
localhost. - How many hostnames a site can have depends on your plan.
A page on a hostname that isn’t listed gets origin-not-allowed or a frame-timeout-* error. If you remove a hostname, tokens from its pages fail verification with invalid-input-response.
Note
localhost isn’t allowed for real keys. To develop locally, use the test keys: they work on any hostname, over plain http too.
Mode
shadow(the default, Invisible in the dashboard): roll out safely. Nobody is asked to do anything; your backend logsdecisionand doesn’t refuse anything yet.enforce: visitors the check isn’t sure about get a short visible check, and your backend acts ondecision. Enforce mode and the visible check are plan features.
Siteverify echoes the mode in every reply, so your backend can follow the setting. See Siteverify: modes.
Protection level
lenient- Lets more borderline traffic through, including visitors on VPNs and privacy networks.
balancedDefault- Between lenient and strict.
strict- Limits more borderline traffic, and in enforce mode sends more of it to the visible check.
Levels other than balanced are a plan feature.
Status
An active site works. When a site is suspended or deleted, its tokens fail verification with invalid-input-response.
Keys
| Key | Format | Where it goes |
|---|---|---|
| Sitekey | ace_site_ + 22 letters and digits | Your page. It’s public. |
| Secret | ace_secret_ + 43 letters and digits | Your server only. It’s shown once, when it’s issued. |
Never put the secret in a page, an app bundle or a repository. Keep it in your server’s secret store or environment, for example as ACE_SECRET.
Rotate a secret
Issuing a new secret keeps the previous one valid for 24 hours, so you can deploy the new one without downtime. You can’t rotate again during those 24 hours.
Revoke a secret
Revoking stops a secret at the edge, usually within a minute or two. After that, siteverify answers invalid-input-secret for it. If a secret leaks, issue a new one, deploy it, and revoke the leaked one instead of waiting out the 24 hours.
When changes apply
Changes to sites and keys (hostnames, status, rotation, revocation) reach the edge usually within a minute or two. They aren’t instant, so allow for that when you add a hostname right before a launch or revoke a secret.