Page Domain Setup
Configure where your Doupple chat page is hosted. You can use the default Doupple domain or deploy it on your own custom domain.
Domain Setup Tab
The Domain Setup tab in your agent settings lets you configure the hosting location for your help/chat page.
You have two options:
https://app.doupple.com/chat/[agentId]/chat or /support on your websiteHow to implement
Choose the implementation method that matches your website's framework or hosting platform:
Next.js
Configure rewrites in your next.config.js file.
// next.config.js
const nextConfig = {
async rewrites() {
return [
{
source: "/chat",
destination: "https://app.doupple.com/chat/[agentId]",
},
{
source: "/chat/:path*",
destination: "https://app.doupple.com/chat/[agentId]/:path*",
},
];
},
};
module.exports = nextConfig;Replace [agentId] with your actual agent ID and restart your dev server.
Vercel
If you host on Vercel, create or update your vercel.json file.
{
"rewrites": [
{
"source": "/chat",
"destination": "https://app.doupple.com/chat/[agentId]"
},
{
"source": "/chat/:path*",
"destination": "https://app.doupple.com/chat/[agentId]/:path*"
}
]
}Commit and push to deploy. Vercel automatically applies the rules on the next build.
Express.js (Node.js)
Use http-proxy-middleware to create a rewrite.
const express = require("express");
const { createProxyMiddleware } = require("http-proxy-middleware");
const app = express();
const AGENT_ID = process.env.DOUPPLE_AGENT_ID || "[agentId]";
const chatProxy = createProxyMiddleware({
target: "https://app.doupple.com",
changeOrigin: true,
pathRewrite: {
"^/chat": `/chat/${AGENT_ID}`,
},
});
app.use("/chat", chatProxy);
app.listen(3000, () => console.log("Server running on port 3000"));Other Platforms
For other hosting platforms (Netlify, Firebase, AWS, etc.), consult your platform's documentation on how to set up rewrites or proxies. The core concept is the same:
Source: /chat and /chat/:path*
Destination: https://app.doupple.com/chat/[agentId]
Best practices
On this page