# Publish

## Generating Embed Code

Once you have completed all your customizations, click on the "Publish" tab. Aicado generates code for you when you create your embeddable AI tool. You don't need to do any extra work to create the embed code. Just copy your code.

Below are two ways to run your AI Agent on the web. Pick the one that fits your use case, then follow the steps under each heading.

* **Connect your Domain** — Run your agent on a custom subdomain like `chat.yourdomain.com`. Requires a **CNAME** DNS record. Embedding is **not** needed in this setup.
* **Embed** — Paste a small code snippet into your site or app (Bubble, Webflow, WordPress, custom HTML, etc.). No DNS changes required. Optional **domain restriction** lets you limit where the agent can load.

<figure><img src="/files/n7twccqkP6ho2kozyFmU" alt=""><figcaption><p>Publish tab of your AI Agent</p></figcaption></figure>

### Connect your Domain (CNAME)

**What it does:** Your agent is served directly under your own domain (e.g., `chat.yourdomain.com`). This is ideal if you want a branded, standalone URL.

**Before you start**

* You have access to your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap).
* You have decided on a subdomain (e.g., `chat`, `assistant`, `ai`).

**Steps**

1. In Aicado, go to **Domains** and **Add Domain** (e.g., `chat.yourdomain.com`).
2. Copy the **CNAME target** shown in Aicado.
3. In your DNS provider, create a **CNAME** record:
   * **Name/Host:** the subdomain you chose (e.g., `chat`).
   * **Target/Value:** the CNAME target from Aicado.
4. Wait for DNS propagation (this can take some time depending on your provider).
5. Back in Aicado, click **Verify**. Once verified, your agent will run directly at `https://chat.yourdomain.com/`.
6. Open your subdomain in a browser to confirm it’s live.

> **Note:** You can connect one domain via DNS for the agent. When using this method, you do **not** need to embed code on your website.

***

### Embed

**What it does:** Lets you add your agent to any website or app by pasting a snippet. Great for placing the agent inside existing pages.

#### 1) Embed

1. Open your AI Agent's editor. Go to the Publish tab and click Embed.
2. Choose **Visibility**:
   * **Restrict to selected domains**: Select domains from the **domain list** where the agent is allowed to load. Make sure the domain you embed on exactly matches a domain you selected (e.g., `www.yourdomain.com` vs `yourdomain.com`).
   * **No restriction**: The agent can load on any domain.
3. Click **Save**.
4. Click **Copy** to grab your embed code snippet.

> **Important:** If you change restriction settings later, click **Save** again—otherwise changes won’t apply.

<figure><img src="/files/oCrcvVMrD2tikkpQVFz8" alt="" width="563"><figcaption></figcaption></figure>

#### 2) Snapped

Boost user engagement on your website by embedding Aicado as a chat balloon. This feature enables visitors to interact with your AI agent in a smooth and intuitive manner, offering them instant support and information.

1. Open your AI Agent's editor. Go to the "Publish" tab and click Embed.
2. Customize your **Snapped widget**: Aicado allows you to customize the chat balloon to match your brand's aesthetics. You can adjust:
   * **Avatar:** Modify the balloon's avatar to align with your branding.
   * **Positioning:** Choose where the chat balloon appears on the screen (e.g., bottom-right, bottom-left).
   * **Welcome Message:** Set an initial greeting message to engage users when they visit your site.

> After making changes, always **copy the updated embed code** and replace it in your app/website to apply the changes.

<figure><img src="/files/Loi4HJerR98CHSfRlEbd" alt="" width="563"><figcaption></figcaption></figure>

3. Copy the provided embed code.

<figure><img src="/files/7fakSeYyGMTy3LpZSV2t" alt="" width="563"><figcaption></figcaption></figure>

4\. Adding embed code: Whether you’re using a website or any other web tool (such as project management or blog creation platforms), if your service supports Embed/HTML features, you only need to use the embed code in the embed.

We created detailed walkthroughs for different platforms.

#### Embed Documentations: <a href="#integrationdocumentation" id="integrationdocumentation"></a>

* [AI Embed to Your Wix Website](https://aicado.ai/integrations/how-to-add-aicado-to-wix)
* [AI Embed to Your Wordpress Website](https://aicado.ai/integrations/how-to-add-aicado-to-wordpress)
* [AI Embed to Your Shopify Website](https://aicado.ai/integrations/how-to-add-aicado-to-shopify)
* [AI Embed to Your Squarespace Website](https://aicado.ai/integrations/how-to-add-aicado-to-squarespace)
* [AI Embed to Your Framer Website](https://aicado.ai/integrations/how-to-add-aicado-to-framer)
* [AI Embed to Your Thunkable Website](https://aicado.ai/integrations/how-to-add-aicado-to-thunkable)
* [AI Embed to Your FlutterFlow Website](https://aicado.ai/integrations/how-to-add-aicado-to-flutterflow)
* [AI Embed to Your Bubble Website](https://aicado.ai/integrations/how-to-add-aicado-to-bubble)
* [AI Embed to Your Softr Website](https://aicado.ai/integrations/how-to-add-aicado-to-softr)
* [AI Embed to Your Toddle Website](https://aicado.ai/integrations/how-to-add-aicado-to-toddle)

## **Understanding Domain Connection**

Aicado's AI agents only worked on defined domains. If you'll try to run your AI embed on another domain you'll get error. Multi-domain support allows you to manage and deploy AI embeds across different websites or applications. Each embeddable AI tool can have multiple domains and this providing flexibility and scalability.

{% hint style="info" %}
On Aicado, you can create limitless embeds. If you want to use different domains on same or other embeds you'll need to purchase extra domain add-on package.
{% endhint %}

You can access and change your free domain from Dashboard -> Domains. (Make sure your current embeds can be broken after you changed your domain).

<figure><img src="/files/VqUXvp14gISchuDU6pUS" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Don't forget to bound your defined domain with your embed. You can always change your embed's bounded domains from its editor. Click the Publish tab of the relevant AI Agent. Then add the domain from the field shown in the image below.
{% endhint %}

<figure><img src="/files/GpndrT9IzZ8HMzjzdqXe" alt=""><figcaption></figcaption></figure>

## Using on multiple domains

Aicado supports hosting multiple domains on embeddable AI agents, making it an excellent choice for businesses with multiple websites or projects and agencies. This guide will walk you through the process of purchasing additional domains and linking them to your embeddable AI agents.

**1. Purchasing Additional Domains**

If you need to host additional domains, you can easily purchase them through your Aicado account. Here’s how:

1. **Log in to Your Aicado Account:**

* Visit the [Aicado](https://aicado.ai/) and log in to your account.

2. **Navigate to the "Plan and billing" tab:**

* After logging in, click on the "Plan and billing" tab in the dashboard that opens. Click on the "Subscribe" button.

<figure><img src="/files/HLS6JXxL5wU8rMWFfTpp" alt="" width="563"><figcaption></figcaption></figure>

3. **Purchasing:**

* Enter how many domains you want to purchase, then click the "Subscribe" button on the right. Follow the instructions to complete the purchase. After your payment is successful you'll be able to connect selected domains with your embeddable AI agents.

<figure><img src="/files/Y3cdLaB6SSyqijtB7gRo" alt="" width="563"><figcaption></figcaption></figure>

4. **Add Domain:**

* After completing your payment, go back to the "Domains" tab and click the "Add domain" button. Enter your bare domain (e.g., kod-suz.com) into the text box. There's no need to include "https\://".

<figure><img src="/files/qHCFfnSsCZwfBjld8Olb" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Your domain subscription renews every month. You can cancel whenever you want.
{% endhint %}

**2. Linking a Domain to Your AI Agent**

After purchasing the additional domain, you’ll need to link it to your  AI agents. Here’s how:

1. **Access Your AI Agent:**
   * Select your AI agent which want to connect additional domain.
2. **Select the Domain to Link:**

   * Find the domain you’ve purchased and select it from the list.

   <figure><img src="/files/XLWJqxtG8T74u9UvvlE1" alt=""><figcaption></figcaption></figure>
3. **Verify and Test:**
   * Ensure that the domain is correctly linked and the AI agents are functioning as expected. Refresh your embed page.


---

# 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.aicado.ai/creating-ai-agent/publish.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.
