Platforms
How to add an AI chatbot to a plain HTML website
For static HTML sites, adding an AI chatbot is one script tag before </head> on every page. Steps, includes, and how to avoid missing pages.
In short
On a plain HTML site you add an AI chatbot by pasting one script tag before the closing </head> tag of every page you want it on.
If your pages share a header include or template, add it once there instead of editing every file.
Key facts
Key facts
- The script tag belongs inside <head>, before </head>.
- Static sites without includes need the line on each HTML file.
- An async script does not block page rendering.
- The same snippet works on GitHub Pages, Netlify and any static host.
The snippet
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Your site</title>
<script src="https://defaltam.com/api/public/bot/widget?k=YOUR_PUBLIC_KEY" async></script>
</head>
<body>...</body>
</html>Avoid the half-installed site
The common mistake on static sites is adding the script to index.html and forgetting the other twenty pages, so the bot vanishes exactly where visitors have questions. If you build with includes, a static site generator or a template, put the line in the shared head partial once.
Indexing a static site
Static sites index cleanly because everything is plain HTML text. Make sure your prices and policies are in the markup rather than inside images, and the bot will answer them accurately.
The product behind this guide
A chatbot trained on your own website, live today
Defaltam builds AI chatbots that read your public pages and answer with your real prices, services and policies. Support is €79/month, Sales is €149/month, both start with a 5-day free trial, and installation is one script tag.
FAQ
Questions people ask about this
How do I add a chatbot to a static HTML website?
Paste the chatbot script tag inside the <head> element, before the closing </head>, on every page. If your pages share a header include or template, add it there once.
Does it work on GitHub Pages or Netlify?
Yes. The widget is a hosted script, so any static host serves it without extra configuration.
Do I need a build step?
No. It is a single HTML line with no dependencies.
Can I put it before </body> instead?
It will still work, but <head> is recommended so the widget is ready as soon as the page is interactive.
Related
Keep reading.
How to add an AI chatbot to a Wix site →
Add an AI chatbot to Wix without an app: paste one script into Settings → Custom Code, point it at your pages, and it answers with your real content.
How to add an AI chatbot to Squarespace →
Squarespace Code Injection takes one line and your AI chatbot is live site-wide. Steps, plan requirements and what the bot can answer.
Adding an AI chatbot to a React or Next.js app →
How to load a chatbot widget script in React, Next.js and other SPA frameworks without breaking hydration or loading it twice.
AI chatbot for WooCommerce stores →
What a WooCommerce chatbot should answer, how to install it without a plugin, and how it reduces 'where is my order' emails.
Adding an AI chatbot to a Ghost site →
Ghost has a Code Injection setting for site-wide header code. Paste the chatbot script there and it runs across posts and pages.
Putting an AI chatbot on a landing page →
A chatbot on a paid-traffic landing page can rescue visitors who would otherwise bounce. Setup, auto-open timing and what the bot should ask.
AI chatbot plans and pricing →
Support €79/mo, Sales €149/mo, 5-day free trial.
How to add an AI chatbot to your website →
The ten-minute install guide, platform by platform.