Skip to content
QwryAI
Documentation
Pages

Advanced Integration

Help Page Proxy

Show your QwryAI Help Page on your own domain, like your-domain.com/help, using rewrites (proxies)

This guide shows how to use rewrites, also called proxies, to show your QwryAI Help Page on your own domain. Visitors read your help content and chat with your agent without leaving your site.

Your Help Page normally lives at https://www.qwryai.com/YOUR_AGENT_ID/help. With a rewrite, it appears at a path such as https://your-domain.com/help.

The Core Concept: Rewrites

A rewrite works as a proxy. When a visitor opens the source path on your domain, your server fetches the page from the destination URL and serves it. The address in the visitor's browser doesn't change.

  • Source: the path on your website you want to use.
  • Destination: the full address of your QwryAI Help Page.
  1. Open the Help Page deploy sheet

    In your agent, open Channels, select Manage on the Help page card, then select Deploy in the top-right corner. The Deploy Help Page sheet lists a guide for each host.

    Deploy Help Page: open your page and pick your host.
  1. Copy your Help Page address

    Next to Visit page, select the open icon. Your Help Page opens in a new tab; copy its address. The part before /help is your agent's ID. Use it wherever the examples below show YOUR_AGENT_ID.

Implementation Examples

Choose the tab for your framework or hosting platform.

For Next.js projects, add rewrites to your next.config.js file.

  1. Open or create next.config.js at the root of your project.
  2. Add the rewrites function to the config. Place the rules before any catch-all route.
JavaScript
// next.config.js

/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: "/help",
        destination: "https://www.qwryai.com/YOUR_AGENT_ID/help",
      },
      // Static files (JavaScript, CSS, images)
      {
        source: "/__qw/:path*",
        destination: "https://www.qwryai.com/__qw/:path*",
      },
      // Your agent's chat
      {
        source: "/api/chat/YOUR_AGENT_ID/:path*",
        destination: "https://www.qwryai.com/api/chat/YOUR_AGENT_ID/:path*",
      },
    ];
  },
};

module.exports = nextConfig;

Restart your Next.js server to apply the changes, then redeploy.

Check it works

  • Open your-domain.com/help and check that the Help Page loads with your logo and colors.
  • Send a few messages and wait for each full reply.
  • Reload the page and check that the conversation is still there.

Explore the documentation