> For the complete documentation index, see [llms.txt](https://docs.ebbot.ai/ebbot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/subdomain-manager-for-chat.md).

# Subdomain Manager for Chat

## Enabling Subdomain manager for Ebbot Chat

These instructions will guide you through enabling Subdomain manager for Ebbot Chat.

### Prerequisites

Before you begin, ensure you have access to your domain's DNS settings and can create SSL certificates.

### Step 1: DNS configuration

To enable chats across subdomains, you need to configure your DNS and establish a secure connection. Follow these steps:

#### Create a CNAME Record

**1. Access DNS Settings:**

\- Log in to your domain registrar's dashboard where DNS records can be managed.

**2. Create CNAME Record:**

* **Host/Name:** Select the corresponding subdomain (e.g., `ebbot.yourdomain.com`).
* **Target/Value:** Enter `ebbot.eu`.

### Step 2: Ebbot settings

#### Add subdomain to the Ebbot subdomain manager:

* **Alias:** Enter an alias for the subdomain entry. This does not affect the functionality itself.&#x20;
* **Path:** The full subdomain that you have configured excluding https\:// or http\://, where you intend to host the Ebbot widget. In this example it would be: `ebbot.yourdomain.com`

### Step 3: Modify and add the JavaScript snippet to your website

Add the apiUrl parameter to the Ebbot Chat widget script.

{% hint style="warning" %}
Please note that the below snippet is only an example. You can access your snippet from the sidebar of the Ebbot Chat platform, under **Chat widget > Settings**
{% endhint %}

```javascript
<script>
      window.Ebbot = {
        botId: 'yourbotid123',
        ovh: true,
        apiUrl: 'ebbot.yourdomain.com'        
      };
    </script>
    <script>!function(t){var e="init-js-widget";if(!t.getElementById(e)){var i=t.createElement("script");i.id=e,i.src="https://storage.url.net/ebbot-web/init.js?..."+Math.random(),t.querySelector("body").appendChild(i)}}(document);</script>
```

Done! Your chat sessions should now be kept alive between the selected subdomain and your main domain.
