Skip to Content
WidgetSetupsEmbed on multiple sites

Embed on multiple sites

One Knoku project can power the widget on multiple hosts. Common examples are production and staging, docs and marketing, or several locale domains.

Add every host

Open Project -> Settings -> Domains and add every host where the widget should mount.

Examples:

example.com docs.example.com https://docs.example.com http://localhost:3000

Bare hosts and full origins are both accepted. Use a full origin when scheme or port matters. Wildcards are not supported.

The widget config request is rejected when the browser origin does not match an allowed entry.

Most sources already carry absolute URLs. Website crawls use the live page URL; GitHub repo sync uses the file permalink.

When a source only has a relative path, Knoku prefixes it with the first allowed domain in Domains. If the widget runs on example.com but docs live on docs.example.com, list docs.example.com first so a path like /installation resolves to https://docs.example.com/installation.

For npm embeds, pass primaryDomain in initKnokuWidget() when you need an explicit override.

How source URLs resolve

SourceCitation behavior
Website crawlUses the crawled page URL
GitHub repo syncUses the GitHub file URL
GitHub Discussions / Issues / PRsUses the GitHub permalink
Uploaded filesNo public URL is generated

Local development

Add your local origin when testing:

http://localhost:3000

Localhost ports are treated leniently by the backend once localhost is configured, but adding the exact origin keeps the setup clear for your team.

Last updated on