# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/subdomain-manager-for-chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
