Skip to content
SiteOS

Documentation

Website connection

Connect the right index and adapt search to your website’s framework and design.

Last updated

Installation checks and installs search for the selected index and environment. Settings lists everything that connects the index — Website search (the publishable key and allowed websites), Server queries, Content sync, Visitor analytics and the Website crawler — each with its current state and a link to change it. Publishing documents does not install a search interface on your website.

Choose how results reach the browser

Use the current details generated by SiteOS:

  • Published Search Edge delivery: the browser uses a publishable key restricted to allowed website origins. Use it only for public content: the key identifies your website; it does not protect private documents.
  • Server proxy: your server sends queries with a private query credential and returns the response to your interface. The private credential stays server-side.

Manage keys

Settings → Website search shows the Publishable key and its query endpoint, ready to copy. Your website's browser search needs only these two values. Choose Turn on website search to select the allowed websites the first time, and Edit websites to change them later; save before testing the website again. A publishable key created before October 2026 shows only its beginning until you rotate it once.

Rotate key… stops the current publishable key right away. Put the new key into your website's configuration and rebuild it, because browser bundles embed the key at build time.

Settings → Server queries and Content sync open Secret keys, which lists query keys for a server and indexing keys for a CMS, CI or script that sends documents, with their type and last use. A new secret key is shown once with an example .env line, and its dialog closes only after you confirm I’ve saved this key somewhere safe. To replace one key, create a new key, update its server, then revoke the old one. Replace all query keys… or Replace all indexing keys… revokes every active key of that type at once. Indexing credentials change content and must never enter a browser bundle.

The collapsed For CLI and agents section holds the SiteOS URL, the environment, the Index ID when the CLI selects this index by ID, and example server variable names. Keep the variable names your website already uses; the CLI reports the names it installs. For a second search on the same website, add --env-prefix SITEOS_SEARCH_BLOG when you issue its key so its variables stay separate. Installing a key locally does not set your hosting environment variables.

Keep development, preview and Production connections separate. With multiple indices, give each interface the matching index connection rather than reusing the default connection.

Adapt the interface with your agent

The SiteOS plugin and Search skills help your agent add a native search bar and dialog to the existing site. Copy prompt for your agent in Installation copies a task with the selected Project, environment and index, without private keys. To write it yourself, Installation also shows the editable client prefilled with this index's endpoint and publishable key, or the server proxy setup. The supplied starting interface can be adapted to React or Next.js; other stacks, such as Vue, Nuxt, Svelte, Astro or plain HTML, can use the same search contract in their own components.

Your repository owns the interface and its styling. Match typography, colors, spacing, result layout and interaction states to the website’s design system. Keep keyboard navigation, Escape-to-close, focus restoration, accessible result links and a scrollable result list.

Result titles, sections, snippets and match highlights come from indexed content and query responses. Render highlight segments as text, not arbitrary HTML from a source. Include loading, no-result and unavailable states, and show published article suggestions when the query is empty.

Publishing an index changes data, not your installed components. Updating the plugin does not automatically overwrite the interface in your repository.

Install event recording separately

Search results can work even when visitor reporting is disabled or not installed. To record searches and result clicks, install the event integration with the interface. The client reads the index’s collection policy from suggestion and query responses: call prepareAnalytics() before a visitor starts searching, then record the settled search and any result click. A missing or unreadable policy turns event recording off, never search. A server proxy must return the policy and the response information used to associate a click with its search, from both its query and suggestions routes.

The policy belongs to the index, so a changed Collection settings choice applies to updated clients without code changes. For consent-required collection, the website also supplies the visitor’s analytics choice: the supplied Next.js client reads SiteOS Cookie, and another consent manager needs an adapter for the initial choice and later changes. Independent collection still respects site opt-out, GPC and DNT. See Search analytics.

Update integrations written before 12 October 2026. Remove the analyticsMode option and call prepareAnalytics() before an interaction starts. SiteOS now rejects events from older clients because their receipts carry no collection mode, so such a website still shows results but records no searches or clicks.

Verify the actual website

  1. Open the installed search interface on the intended website origin.
  2. Search for a known title and a phrase from a document’s body.
  3. Open a result and check its destination and section anchor.
  4. Test keyboard navigation, an empty query, no results and a failed request.
  5. If collection is enabled, perform an eligible website interaction and check the report.

Installation walks through numbered steps: Publish your content, Allow your website, Add the search box and Verify on your website. A passed installation check or a recorded visitor search confirms the connection, and the status changes from Connection not verified to Search connected on your website’s host. Playground and direct CLI queries do not count. Verify with AI copies a prompt for your agent to run the installation check against your website’s search endpoint.

Search analytics shows its own status: Receiving events, Waiting for events, Off or Unavailable. It does not affect the connection: a verified website that has not sent an event yet is still connected. Installation diagnostics and verification help identify configuration errors, but a recorded verification timestamp is not continuous monitoring.

See AI & MCP for agent setup or Troubleshooting when website results differ from Playground.