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:
- The crawler visits each page on your site and extracts the visible text content — headings, paragraphs, lists, and other readable elements.
- 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.
- 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.
- 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:
- Standard HTML sites: Paste it just before the closing
</body>tag in your base template or layout file. - WordPress: Use the Appearance → Theme Editor to add it to your
footer.php, or install the "Insert Headers and Footers" plugin and paste it in the footer section. - Shopify: Go to Online Store → Themes → Edit Code →
theme.liquidand paste before</body>. - Google Tag Manager: Create a new Custom HTML tag, paste the script, and set it to fire on All Pages. This avoids touching your site's code entirely.
- Webflow / Squarespace / Wix: Each has a "Custom Code" or "Footer Code" section in the site settings — paste it there.
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:
- Ask your top three most common support questions — the ones you get via email every week.
- Ask about your pricing in a few different ways: "How much does this cost?", "What's the cheapest plan?", "Is there a free trial?"
- Ask something the bot definitely won't know — "What's the weather like?" — and confirm it responds politely rather than making something up.
- Ask a question using different phrasing than your site uses, to test whether the semantic retrieval is working (it should match meaning, not just keywords).
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.