Add an AI chatbot to any HTML website
Hand-coded site, static site generator or custom CMS: if you can edit the HTML, you can add WebsiteChatbot in a minute.
How to add a chatbot to HTML websites
- In WebsiteChatbot, create your chatbot and enter your website address.
- Copy your embed code (a single
<script>tag). - Paste it just before the closing
</body>tag in your site template or layout file, so it loads on every page. - Deploy or upload your site. The chat bubble appears on every page.
Good to know
The script loads asynchronously, so it doesn't block your page from rendering. It works with static site generators like Hugo, Jekyll, Eleventy and Astro: add it to your base layout once.
Prefer not to touch code? Choose done-for-you setup and we'll install it for you. New to chatbots? Read how to add a chatbot to your website.
HTML websites tips
Shared layout
Paste the script into the shared template or include file (header/footer partial), not into every page.
Content Security Policy
If your site sends a CSP header, allow https://websitechatbot.com in script-src and connect-src.
Static site generators
In Hugo, Jekyll, Eleventy or Astro, add it to the base layout once and rebuild.
Troubleshooting
Blocked by CSP
Your browser console will show a Content Security Policy error. Add websitechatbot.com to the directives above.
Only on the home page
The code is in index.html only. Move it to your shared layout.
Frequently asked questions
Do I need jQuery or any library?
No. The widget is standalone JavaScript.
Can I open the chat from my own button?
The widget is a standard bubble today. Contact us if you need a custom trigger.
Can you install it for me?
Yes. Our $299 done-for-you setup includes training, testing and installing the chatbot on your HTML websites site.
Create your free AI chatbot
Enter your email and we'll send you a secure sign-in link. Your chatbot can be live on your website in minutes.
- Free plan, no credit card
- Trained on your website in minutes
- One line of code to install