HomeBlog › How to Add an AI Chatbot to Your Website (Step-by-Step)

How to Add an AI Chatbot to Your Website (Step-by-Step)

20 July 2026 · 7 min read

Most small business websites are a brochure that cannot answer a question. Someone lands at nine in the evening, wonders whether you cover their area or what something costs, finds nothing, and leaves. Adding an AI chatbot is the cheapest way to close that gap — and it is far less technical than people expect.

This guide walks through the whole process: what to decide before you install anything, how the install actually works, and the mistakes that make visitors ignore a chat bubble entirely.

Step 1: Decide what the chatbot is actually for

This is the step most people skip, and it is the one that determines whether the bot earns its keep. A chatbot can do three broadly different jobs:

Pick one as the primary job. A bot that tries to do all three at once tends to feel pushy and converts worse than one with a clear purpose. If you are unsure, choose lead capture: an answered question with no contact details is a conversation you cannot follow up.

Step 2: Write down what it needs to know

An AI chatbot is only as good as what it knows about you. Before touching any settings, write a single page containing:

That last point matters more than it sounds. A bot that confidently invents an answer will cost you trust. It should be told, explicitly, to say it is not sure and to offer to pass the question to a human.

A useful test: if you handed this page to a new receptionist on their first morning, could they cover the phones? If not, the chatbot will have the same gaps.

Step 3: Choose a tool where your keys stay server-side

This is a genuinely important technical detail that most guides gloss over. Some chat widgets ask you to paste your AI provider key directly into the page or a browser setting. If a key sits in your page source, anyone can view-source, copy it, and run up charges on your account.

Look for a tool where the AI keys live on the server and the browser only ever talks to a proxy. You should be able to open your own page source and find no key at all.

Step 4: Paste one line before the closing body tag

The install itself is genuinely a single script tag placed just before </body>. Where you put it depends on your platform:

Add it to every page, not just the homepage. Most visitors land on an interior page from search, and that is exactly where questions come up.

Step 5: Test it like a customer, then check it weekly

Open your site on a phone, not just your desktop, and ask the five hardest questions you get in real life. Prices. Availability. Whether you cover a particular area. Something you do not offer. That last one is the important test: a good bot should say so plainly rather than inventing a service.

Then put a recurring fifteen minutes in your calendar each week to read the transcripts and captured leads. The transcripts are free market research — they tell you exactly what your website fails to explain.

Common mistakes that make visitors ignore the bubble

What it should cost

There are three cost models. Monthly SaaS subscriptions typically run from twenty to a few hundred dollars a month. One-time licences are cheaper over time but you handle setup. And separately, the underlying AI usage itself — which, if you run on your own provider keys, is usually a few cents per conversation rather than a marked-up per-seat fee.

The main thing to check is whether usage is marked up. Paying at cost for the AI and a fixed fee for the software is nearly always cheaper than a per-conversation plan once you get real traffic.

Related reading

Why Website Visitors Leave Without Contacting You

Most people who visit a small business website never make contact. Here are the real reasons why, and the practical fixes that recover the most enquiries.

AI Chatbot vs Live Chat: Which Does Your Business Need?

An honest comparison of AI chatbots and human live chat for small businesses — cost, coverage, quality of answers, and when each one is the wrong choice.

Put an AI front desk on your site

Hostly greets every visitor, answers out loud, and captures leads 24/7. One line of code, $97 once.

Get Hostly