Serve the help page under your own path

Use a reverse proxy to serve the Askocto help page at a path of your main site, such as example.com/help, with a ready nginx recipe.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

A reverse proxy lets you serve the help page at a path of your own site, for example https://example.com/help, instead of on a separate subdomain. Use this when the help page should share your main domain, for search or brand reasons. If a subdomain is enough, Custom domains is simpler.

How it works

Your web server receives a request for /help/..., forwards it to the help page origin, and returns the response. The customer only sees your domain. For this to work, the help page must know it lives under /help, so it writes its links with that prefix.

Set up the help page

  1. Open the agent and go to Channels > Help page.
  2. Under Proxy, turn on Serve behind a reverse proxy.
  3. Enter the base path, for example /help.
  4. Copy the Origin host shown on the screen. You use it in the proxy configuration.
  5. Select Save.

Configure the proxy

This example uses nginx. Replace ORIGIN_HOST with the origin host from the dashboard.

location /help/ {
    proxy_pass https://ORIGIN_HOST;
    proxy_ssl_server_name on;
    proxy_set_header Host ORIGIN_HOST;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location = /help {
    return 301 /help/;
}

Reload nginx after you save the file. Other proxies, load balancers and edge functions work the same way: forward everything under the base path to the origin, set the Host header to the origin host, and pass X-Forwarded-Host with your public hostname.

Check the result

  1. Open https://example.com/help/.
  2. Select an article and confirm the address stays on your domain and keeps the /help prefix.
  3. Search for a question and confirm the results load.

You should see the same help page that the Askocto address shows, with no change in the address bar.

curl -I https://example.com/help/

The response should have status 200.

Troubleshooting

  • Links lose the prefix and return your site's 404 page. The base path in Channels > Help page does not match the proxy location. Make them identical.
  • A redirect loop. The proxy sends the wrong Host header, so the origin redirects back. Set Host to the origin host.
  • Old content after an update. Your proxy or a CDN in front of it is caching responses. Lower the cache time for /help/ or clear it after you publish.
  • Search or chat fails. Forward every method and path under the base path, not only GET requests for pages.

Warning: Do not forward cookies or authorization headers from your own site to the help page origin. Strip them in the proxy if your site sets them for the whole domain.

  • Channels lists where else you can offer the agent.

Something unclear or missing? Tell us and we will fix the page.