Launch offer: 75% off your first payment.
All articles

How to Add an AI Chatbot to Your Website (No Code)

Setting up an AI chatbot used to mean months of engineering work. Today you can embed one in 10 minutes. Here's exactly how to do it with Sitepilot.

What you'll need before you start

New to Sitepilot? See what the free plan includes before you sign up.

Want the overview and prices instead of the steps? See AI chatbot for your website.

Before you begin, make sure you have two things: a Sitepilot account (the free tier is fine for getting started) and access to your website's HTML or CMS admin panel. You don't need FTP access, a developer on call, or any technical knowledge beyond the ability to paste a snippet of text.

If you're running WordPress, you can paste the script into your theme's footer area or use a plugin like Insert Headers and Footers. Shopify users can add it through the theme editor. Webflow, Squarespace, Wix, and virtually every other website builder have a "custom code" area in their settings — that's where the embed goes.

One thing to check: make sure the pages you want the bot to learn from are publicly accessible. If your pricing page is behind a login or your docs site requires authentication, the crawler won't be able to read them. We'll cover workarounds for that in a later step.

Step 1: Create your bot and paste your URL

After signing into Sitepilot, click New chatbot. You'll be asked for a name, a welcome message and, optionally, system instructions. Then open the Sources tab and paste the URL of your website into Train on a URL.

The URL you provide is the starting point for the crawler. Sitepilot will follow links from that page outward, discovering your pricing page, feature pages, blog posts, FAQ pages, and documentation automatically. You don't need to manually list every URL you want it to read.

Sitepilot reads the page you give it, then up to 10 other pages on the same site that it links to. It does not read your sitemap and does not crawl the whole site, so start from a page that links to your most important content, such as a help centre or docs index. It reads the HTML your server sends, so text that only appears after JavaScript runs may be missed.

Step 2: Wait for the crawl to complete

Once you submit your URL, Sitepilot kicks off a crawling process in the background. Here's what actually happens during those few minutes:

  1. The crawler visits each page on your site and extracts the visible text content — headings, paragraphs, lists, and other readable elements.
  2. Each page's content is split into overlapping chunks of roughly 300–400 tokens. This chunking is important because it lets the bot retrieve specific sections of your content rather than dumping an entire page into every response.
  3. Each chunk is converted into a vector embedding using Azure OpenAI's text embedding model. A vector embedding is a list of numbers that represents the meaning of the text — semantically similar chunks end up with similar numbers.
  4. Those vectors are stored in a database alongside the original chunk text. When a user asks a question, their query is also converted to a vector, and the database finds the chunks with the most similar meaning.

When training finishes, the source shows as "ready" in the Sources tab and you can start testing it in the Playground tab.

Step 3: Set the name and welcome message

When you create the bot you choose its name, a welcome message and optional system instructions (for example, "You are a friendly support agent for Acme. Keep answers short."). The chat widget itself has a fixed look and appears in the bottom-right corner of your page. Use the Playground tab to ask your own questions before going live.

Step 4: Copy and paste the embed script

Once your bot is configured, navigate to the Embed tab on your bot page. You'll see a single script tag that looks like this:

<script src="https://sitepilot.shop/widget.js" data-bot="YOUR_BOT_ID"></script>

The data-bot attribute uniquely identifies your bot — that's the only thing that varies between accounts. Everything else is handled by Sitepilot's CDN-hosted widget script.

Where to put it:

Script tag vs iframe: which should you use?

Some chatbot platforms offer an iframe embed as an alternative. Here's why the script tag is almost always the better choice:

The widget is a small script that adds a chat bubble to your page. An iframe, by contrast, would be a separate document embedded inside it.

A script tag lets the widget share your page's context and keeps the setup to one line. Iframes can be awkward on mobile, with fixed heights and scroll-within-scroll, which is one reason Sitepilot uses a script tag.

Place the tag just before the closing </body> tag, because the widget attaches itself to the page body when it loads.

Step 5: Test the live widget

After pasting the embed script, open your site in a private/incognito window. This ensures you're seeing exactly what a first-time visitor sees, without any cached assets or logged-in state interfering.

You should see the chat bubble appear in the corner within a second or two of the page loading. Click it and run through these test questions:

If a question gets a wrong or incomplete answer, the fix is almost always adding more specific content to your website and running a re-crawl. The bot's quality is a direct reflection of your content's quality.

Keeping your chatbot up to date

Your chatbot's knowledge is a snapshot of your website at the time you trained it. When you add a feature, change your pricing or update your FAQ, open the Sources tab and train on the updated URL again. This adds a new source to your bot.

Check the Sources tab after training and make sure the new source shows as "ready" before you rely on the updated answers.

There is no automatic re-crawl, so put a reminder in your content publishing routine to train again after meaningful changes.

Next: see AI chatbot for your website for what it can and cannot do and what the plans cost, or turn your FAQ page into a chatbot.

Frequently asked questions

Do I need to know how to code?

No. Sitepilot generates a one-line script tag you paste into your site's HTML, just like adding Google Analytics. If you can add a tracking pixel, you can add a chatbot.

How long does crawling take?

Sitepilot reads the page you give it plus up to 10 other pages on the same site that it links to. That usually takes under a minute or two, but it depends on how fast your server responds.

Can I customise the chatbot colours and name?

Not yet. You can set the bot name, a welcome message and optional system instructions when you create it. The chat widget has a fixed look and sits in the bottom-right corner.

Will it slow down my website?

No. The embed script loads asynchronously after your page content, so it has zero impact on your Core Web Vitals or initial page load time.

Add an AI chatbot to your website today

Train it on your content in minutes — no code, no engineering team needed.

Start free →