> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.crisp.chat/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to troubleshoot "Invalid website" errors in the chatbox

*Fix “invalid chatbox code” or “Invalid Website” errors by checking your domain lock, installation code, and workspace state.*

These errors usually come from a mismatch between the installed chatbox code, the domain allowed to load it, and the Crisp workspace that owns the Website ID.

---

# ${color}[#0080dd](Check the domain lock option)

Crisp includes a security option that locks the chatbox to your configured website domain and subdomains. If this option is enabled, other domains cannot load the same chatbox.

For example, if your workspace domain is **www.mydomain.com**, the chatbox may be rejected on **localhost**, a preview URL, or another domain.

__To disable the domain lock while testing:__
1. Go to [**Crisp**](https://app.crisp.chat)
2. Open **Settings → Chatbox Settings → Chatbox Security**
3. Disable **Lock the chatbox to website domain (and sub-domains)**
4. Reload the website where the chatbox is installed

![Domain lock setting](https://storage.crisp.chat/users/helpdesk/website/87ae2703583ac800/domain-lock_lctcj3.png =1000xauto)

|| Keep the domain lock enabled only when your production domain is stable and you understand the security trade-off. Disable it temporarily for local, staging, or preview-domain tests.

---

# ${color}[#0080dd](Check the chatbox code)

A copy-paste error in the installation code can make Crisp reject the widget. The most important value is `CRISP_WEBSITE_ID`, which must match the Website ID of your workspace.

__Standard Crisp chatbox code shape:__
```html
<script type="text/javascript">
window.$crisp=[];
window.CRISP_WEBSITE_ID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();
</script>
```

The Website ID should follow this format:

```text
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
```

| To avoid copying an old ID, copy the current code from [**Crisp**](https://app.crisp.chat) in **Settings → Workspace Settings → Setup & Integrations → HTML**.

---

# ${color}[#0080dd](Check whether the workspace still exists)

If the workspace was deleted, the Website ID becomes invalid and the chatbox cannot load.

__What to check:__
* **Workspace list** → go to `https://app.crisp.chat/settings/websites/` and confirm the workspace still exists
* **Installed code** → confirm the Website ID belongs to the workspace you want to use
* **WordPress integration** → if you use WordPress, open the Crisp plugin settings and relink the workspace

If the workspace was deleted by mistake, you need to install the chatbox code from an active workspace instead.