# Add an AI chatbot to your website, safely

Free checklist from Honu Services. Full guide: add-a-chatbot-to-your-website.html

- [ ] Facts and rules page written
- [ ] API key stored only as a server secret
- [ ] Server function working
- [ ] Fixed instructions, length cap and rate limit on
- [ ] Requests only accepted from your site
- [ ] Chat box labeled as AI
- [ ] Tested against misuse

## Steps

1. **Write what the bot should know.** One page of facts: services, hours, prices if you have them, contact details, and what the bot must not do (give legal advice, promise refunds, and so on).
2. **Get an API key and keep it secret.** Create a key with an AI provider such as Google Gemini, Anthropic or OpenAI. Store it only as a secret environment variable on your host, never in the website's code.
3. **Add a small server function.** On Vercel, Netlify or Cloudflare, add one serverless function that receives the visitor's message, adds your fixed instructions and facts, calls the AI with the secret key, and returns the reply.
4. **Lock it down.** Ignore any instructions sent from the browser, cap message length, limit how many messages each visitor can send per minute, and only accept requests from your own site.
5. **Add the chat box.** A small script on your pages shows a chat bubble and sends messages to your function. Label it clearly as an AI assistant.
6. **Test like a stranger.** Try to make it go off topic, reveal its instructions, or spam it. Fix whatever gets through before you announce it.

Need a hand? Email info@chathonu.com
