> ## Documentation Index
> Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Control where the chatbot appears

> Limit the websites that can show your chatbot, hide the chat icon on some pages, share a chat link, embed the chat inside a page, and test before you go live.

After you [add the chatbot to your website](/docs/guides/install/add-to-website), you can control where it shows. This page covers these tasks:

* [Test before you go live](#test-before-you-go-live)
* [Allow only your own websites](#allow-only-your-own-websites)
* [Hide the chat icon on some pages](#hide-the-chat-icon-on-some-pages)
* [Share a link to the chat](#share-a-link-to-the-chat)
* [Show the chat inside a page](#show-the-chat-inside-a-page)

## Before you start

* Role: Manager or higher on the chatbot to change **Settings** > **General**. See [Invite and manage team members](/docs/guides/account/team-members).

## Test before you go live

You can test your chatbot in the dashboard before you add it to your website.

* On every page of your chatbot in the dashboard, the chat icon shows in the bottom corner. Select it to chat with your chatbot.
* The **Appearance** page shows a live chat in the **Your Chatbot** panel.
* After your chatbot has learned from your content, the **Dashboard** page shows a **Chat with your chatbot** button. It opens your chatbot's [hosted chat page](#share-a-link-to-the-chat).

The dashboard preview always works, also when you set **Allowed Domains**.

<Note>
  The dashboard is not your website. Settings that depend on the page, such as **Excluded Pages** and starters that show only on some pages, can only be tested on your own website.
</Note>

## Allow only your own websites

By default, the chatbot works on any website that has your embed code. If someone copies your code to another website, your chatbot shows there too. **Allowed Domains** stops this.

<Steps>
  <Step title="Open General settings">
    In your chatbot's sidebar, select **Settings** > **General**.
  </Step>

  <Step title="Add a domain">
    In **Allowed Domains**, type a domain, such as `example.com`, and press Enter.
  </Step>

  <Step title="Add the other domains">
    Add each other domain the same way, one at a time. You can add up to 50 domains.
  </Step>

  <Step title="Save">
    Select **Save Changes**.
  </Step>
</Steps>

How the list works:

* Each domain also covers all its subdomains. For example, `example.com` also covers `www.example.com` and `shop.example.com`.
* If you paste a full URL, such as `https://www.example.com/pricing`, SiteGPT keeps only the domain.
* If the list is empty, the chatbot works on any website.

On a website that is not in the list:

* The chat icon does not show. The browser console shows a message from SiteGPT with the name of the domain.
* The chat also does not load in an [iframe](#embed-the-chat-page-in-an-iframe) on that website.

Allowed Domains controls which websites can show the chat. It does not stop other programs from sending requests to SiteGPT.

## Hide the chat icon on some pages

If your embed code is on every page, you can hide the chat icon on some pages, such as a checkout page.

<Steps>
  <Step title="Open General settings">
    In your chatbot's sidebar, select **Settings** > **General**.
  </Step>

  <Step title="Add a page path">
    In **Excluded Pages**, type a path, such as `/checkout/*`, and press Enter.
  </Step>

  <Step title="Add the other paths">
    Add each other path the same way. You can add up to 50 paths.
  </Step>

  <Step title="Save">
    Select **Save Changes**.
  </Step>
</Steps>

Use these path patterns:

| Pattern       | Matches                                                                 |
| ------------- | ----------------------------------------------------------------------- |
| `/pricing`    | Only that page. A trailing slash and upper or lower case do not matter. |
| `/checkout/*` | The `/checkout` page and every page under it.                           |

If you paste a full URL, SiteGPT keeps only the path.

On an excluded page:

* The chat icon and the tooltip do not show.
* The chat does not open automatically.

Excluded Pages does not change these:

* A chat that you put inside a page with the [inline container](#show-the-chat-inside-a-page).
* An install that uses `hideBubble=true` or `hideButton=true`, such as your own chat button. See [Embed code options](/docs/guides/install/add-to-website#embed-code-options).

Excluded Pages only hides the chat icon. It is not a security control. There is no setting to show the chat icon only on some pages. To do that, add the embed code only to those pages.

## Share a link to the chat

Your chatbot has a hosted chat page. It shows the chat on a full page, with no website around it. You can share this link in emails, in your help center, or on social media.

The link has this format:

```text theme={null}
https://widget.sitegpt.ai/c/YOUR_CHATBOT_ID
```

Replace `YOUR_CHATBOT_ID` with the chatbot ID from your **Installation** page. To open the page from the dashboard, select **Chat with your chatbot** on your chatbot's **Dashboard** page.

<Note>
  If you set [Allowed Domains](#allow-only-your-own-websites), a link to the hosted chat page on another website can show an error. Add that website to **Allowed Domains**, then test the link.
</Note>

The hosted chat page tells search engines not to index it.

## Show the chat inside a page

By default, the chat floats in a corner of the page. You can also put the chat inside the page, for example on a support page. There are two ways.

### Use the inline container

Use this way on most websites. The chat shows inside a box on your page, and the floating chat icon does not show.

<Steps>
  <Step title="Copy the Inline Container code">
    On the **Installation** page, in **Embed Options**, find **Inline Container**. Select **Copy**.
  </Step>

  <Step title="Paste the code">
    Paste the code in your page where you want the chat to show.
  </Step>

  <Step title="Remove the other embed code from that page">
    If this page also has the JavaScript embed code, remove it from this page. The inline code already loads the chat. If both are on the page, the floating chat icon can still show.
  </Step>
</Steps>

The code looks like this:

```html theme={null}
<!-- Add container(s) where you want the chat -->
<div class="sitegpt-chat-widget" data-sitegpt-id="YOUR_CHATBOT_ID" style="width: 100%; height: 600px;"></div>

<!-- Include the JavaScript embed code with ?hideBubble=true -->
<script type="text/javascript">window.$sitegpt=[];(function(){d=document;s=d.createElement("script");s.src="https://sitegpt.ai/widget/YOUR_CHATBOT_ID.js?hideBubble=true";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
```

* Change `height` in the `style` to make the chat taller or shorter.
* You can add more than one container to the same page. The chat shows in each one.

### Embed the chat page in an iframe

Use an iframe only when your website does not allow scripts. The iframe shows the [hosted chat page](#share-a-link-to-the-chat) inside your page.

<Steps>
  <Step title="Copy the iFrame Embed code">
    On the **Installation** page, in **Embed Options**, find **iFrame Embed**. Select **Copy**.
  </Step>

  <Step title="Paste the code">
    Paste the code in your page where you want the chat to show.
  </Step>
</Steps>

The code looks like this:

```html theme={null}
<iframe src="https://widget.sitegpt.ai/c/YOUR_CHATBOT_ID" width="400" height="600" frameborder="0"></iframe>
```

You can change `width` and `height` to fit your page.

With an iframe, your page cannot control the chat with the [widget SDK](/docs/developers/widget-sdk), and it does not get [tracking events](/docs/developers/tracking-events). Use the inline container when you can.

## Check that it works

1. Open your website in a new private browser window.
2. On a page in **Excluded Pages**, the chat icon does not show. On other pages, it shows.
3. On a page with the inline container, the chat shows inside the page.
4. Open the hosted chat link in a new tab. The chat shows on a full page.
