Allowed domains and rotating your site key
Allowed domains are the websites a widget may load on, set under Allowed domains on the Widget Setup page. The site key identifies the widget in its embed snippet, and you can rotate it on the Embed page if it is exposed. Rotating invalidates the old key at once.
Allowed domains
Each widget carries a list of domains. You edit the list under Allowed domains on the Widget Setup page, and the same list is shown read-only as Connected Domains on the Embed page.
Add or remove a domain
Step 1: Open Leads, then Widget Setup.
Step 2: Select the widget in the Widget list.
Step 3: Open the Allowed domains section.
Step 4: Type a domain, for example
example.com, and press Enter.Repeat for each domain.
Step 5: Remove a domain with the x next to it.
Step 6: Select Save changes.
The site key
The Site Key is shown on the Embed page, with a Copy button, and is built into the Embed Snippet as data-site-key. It tells Clema which widget a page is loading. It is visible in your page source, so treat it as an identifier, not a password.
Rotate the site key
Rotate the key if it leaks, for example if it was committed to a public repository.
Step 1: Open Leads, then Embed.
Step 2: Select the widget in the Widget list.
Step 3: Select Rotate site key.
Step 4: Confirm.
A Site key rotated message confirms it.
Step 5: Under Embed Snippet, select Copy to copy the snippet with the new key.
Step 6: Replace the old snippet on your website and publish.
Troubleshooting
- Connected Domains shows No domains configured yet.
- Add your domains under Allowed domains on the Widget Setup page and save.
- The widget loads on one address but not another.
- Addresses such as
example.com,www.example.comand a staging address are separate domains. Add each one. - The widget stopped working right after a rotation.
- The site is still using the old snippet. Copy the snippet again and replace it.
Common questions
- Should I leave Allowed domains empty?
- No. List every domain you want the widget on. That keeps the widget working on your sites and gives you a clear record of where it is installed.
- Does rotating the site key delete my leads?
- No. Rotating changes the key used by the embed snippet. Existing leads and widget settings stay as they are.
- How often should I rotate the key?
- Only when you have a reason, such as the key appearing somewhere public. There is no schedule to follow.
- Does each widget have its own key?
- Yes. Rotating one widget's key does not affect your other widgets.