Skip to main content

Custom domain

Hosting index.html file

To host a widget on a custom domain, you need to create an index.html file with the following content and upload it to your web hosting server:

<!DOCTYPE html>
<meta charset="utf-8">
<meta content="notranslate" name="google"/>
<meta content="#000000" name="theme-color"/>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover,minimal-ui">
<link href="" rel="preload" as="script">

<!-- Customize title -->

<!-- Optional: customize following metadata -->
<meta name="title" content="Custom Domain Example">
<meta name="description" content="">
<meta property="og:type" content="website">
<meta property="og:url" content="">
<meta property="og:title" content="">
<meta property="og:description" content="">
<meta property="og:image" content="">
<meta property="twitter:card" content="">
<meta property="twitter:url" content="">
<meta property="twitter:title" content="">
<meta property="twitter:description" content="">
<meta property="twitter:image" content="">

<!-- Optional: cookie consent -->
<link href="" rel="stylesheet">
<script src=""></script>
<script src=""></script>

<!-- Optional: specify custom fonts -->
<link href="" rel="stylesheet">
* { font-family: 'Work Sans', sans-serif; font-size: 14px; }
body, html { height: 100%; margin: 0; padding: 0; }
@media screen and (max-width: 48em) {
* { font-size: 13px; }
<!-- specific banner version -->
<!-- <scena-ai-banner key-id="aaaaabbbbb"></scena-ai-banner> -->

<!-- banner based on the URL e.g. /aaaaabbbb -> key-id=aaaaabbbb -->
const widgetId = (location && location.pathname && location.pathname.length > 1) ? location.pathname.substring(1) : "";
document.write('<scena-ai-banner key-id="' + widgetId + '"></scena-ai-banner>');
<script src=""></script>


Please note that if you use a banner based on the URL version, your hosting must be configured to always serve content from index.html, even if the path is different. For example, if someone tries to open /r/my-widget or /aaaaabbbb, server should serve content from index.html file instead of showing a 404 error. Sample nginx configuration:

location / {
try_files $uri $uri/ /index.html;

Using reverse proxy

Alternatively, you can use proxy to forward requests from your domain to Here is sample nginx configuration to do this:

location / {