Custom site chatbot embed
Install the widget on custom HTML, server rendered, React, Next.js, Astro, Laravel, Rails, Drupal, Joomla, Duda, or similar sites.
Custom site
Before you start
Best for
Any website where your team controls the HTML layout, template, CMS theme, or tag insertion area.
Install location
Place the script once in the shared layout before the closing body tag, or in the CMS footer code field.
Install
Install steps
- 1Copy the widget snippetOpen the chatbot Embed page and copy the final script.
- 2Find the shared layoutUse the common footer, base template, app layout, CMS theme file, or tag manager that renders every public page.
- 3Paste before body closesAdd the script before the closing body tag. Keep the workspace id and chatbot id attributes unchanged.
- 4Deploy and verifyDeploy the site, open the live domain, and send a real test question through the widget.
Access
Domains
Add the production hostname.
Add www, staging, preview, and regional hostnames only if they load the widget.
For embedded apps inside another domain, allow the parent page hostname that runs the script.
Verify
Verify
Install the snippet only once. Duplicate scripts can create duplicate launchers or duplicate config requests.
Do not move the workspace id or chatbot id into public environment variables unless your build process preserves them in the script tag.
If a content security policy is enabled, allow the widget script domain and API requests from your app domain.
Troubleshoot
Custom HTML troubleshooting
If the launcher does not appear, confirm the chatbot is published, the plan and credits are active, and the exact live hostname is allowed.
If the widget loads in preview but not production, check whether the builder preview URL and the live custom domain are different hostnames.
If the page has a content security policy, allow the OrhanAI app URL and widget requests before retesting.
If the launcher appears twice, remove duplicate snippets from theme files, site settings, and tag managers.
If mobile layout feels crowded, adjust widget position and test the most important conversion pages first.
If these checks pass and the widget still does not load, compare the installed snippet with the current Embed page and review widget setup.
