Articles in this section

How to Add Trusted Domains to Your Chat Widget in Bold Agent

Published:

Trusted domains allow you to control where the chat widget is allowed to appear. By adding trusted domains, you can restrict widget embedding to approved websites and prevent unauthorized usage.

This article explains how to add trusted domains for the chat widget in Bold Agent.

Prerequisites

  • An Agent is created and published.
  • You have the domain or subdomain details where the chat widget will be embedded.

Steps to Add Trusted Domains

  1. Log in to Bold Agent.
  2. Open Agent Builder and select the required agent.
  3. Navigate to Channels > Widget.
  4. Click the Preference tab.

Widget

  1. Enable the Trusted Domains option.

Enable Trusted Domain.png

  1. Enter the domain or subdomain where the chat widget is allowed to load.

Enter Domain

  1. Click Add domain, if additional domains required.

Add Domain

  1. Click Save.

Save Changes

Add Subdomains

You can add subdomains based on your requirement.

Add a Specific Subdomain

Use this option to allow the chat widget only on a specific subdomain.

support.example.com

Allow All Subdomains

Use an asterisk (*) to allow the chat widget on all subdomains of a domain.

*.example.com
https://*.example.com

Use Appropriate Domain Patterns

Bold Agent supports exact domain matching, wildcard domains, and URL path–based patterns. Use the appropriate format based on your access requirement.

Domain Pattern Access Rule
example.boldagent.ai Exact domain match (supports both HTTP and HTTPS)
https://example.boldagent.ai HTTPS-only match
*.boldagent.ai Allows all subdomains of boldagent.ai
*.boldagent.ai/sales Allows all subdomains with the /sales path
example.boldagent.ai/sales* Allows URLs starting with /sales, including subpaths
example.boldagent.ai/sales Allows only the exact /sales path

Add Trusted Domain for iframe Embed Source

When embedding the chat widget using an iframe, the iframe source domain must be explicitly added to the Trusted Domains list.
If the iframe source domain is not authorized, the widget will not load inside the iframe.

When is this required?

You must add the iframe source domain if:

  • The widget is embedded using an <iframe> instead of direct script injection.
  • The iframe src points to Bold Agent widget infrastructure.
  • The widget does not render due to unauthorized or blocked iframe embedding.

Example iframe code


<!-- Replace {WIDGET-ID} with your actual widget ID -->
<iframe
  src="https://yourdomain.com/widgetscript-api/v1/widgets/{WIDGET_ID}/iframe"
  allow="microphone"
  width="100%"
  style="height:100%; min-height:700px"
  frameborder="0">
</iframe>

In this example, the iframe source domain is:

https://yourdomain.com

This domain must be added to the Trusted Domains list.

How to add the iframe source domain

Follow these steps:

  • Open the required agent in Agent Builder.
  • In the left panel, select Widget.
  • Open the required Chat Widget.
  • Go to the Preference tab.
  • Under Trusted Domains, turn on the toggle.
  • Add the iframe source domain used in the src attribute.
  • Click Add domain.
  • Click Save.

Example entries

Notes

  • If trusted domains are enabled and no domain is added, the chat widget will not load on any website.
  • Ensure that domain entries are accurate and properly formatted.
  • Refresh the webpage after updating trusted domains for the changes to take effect.
  • Adding only the parent website domain where the iframe is embedded is not sufficient.
  • The iframe source domain itself must be trusted.
  • Use wildcard domains carefully to avoid allowing unauthorized embeds.
  • The widget will load inside the iframe only after the iframe source domain is authorized.
Access denied
Access denied