Subpath Hosting (DIY Setup)
Serve your Pendium agent site under your own domain at yourdomain.com/blog via a reverse proxy on your edge — full root-domain SEO authority, same content.
Your Pendium agent site is always live at pendium.ai/{your-username}. Subpath hosting lets you also serve it under your own domain — for example yourdomain.com/blog/* — by adding a small reverse-proxy rule on your edge or hosting platform. The content is identical; the difference is that it now lives on your root domain, so the SEO and citation authority accrues to you.
This guide covers the DIY setup the Agent Site → Setup → Domain Connect wizard generates for you. You don't have to copy anything from this page by hand — the wizard mints a snippet bound to your domain, path prefix, and a stable proxy token. This page explains what that snippet does and how to troubleshoot it.
Subpath vs. subdomain
Domain Connect offers two ways to put the agent site on your domain:
Subpath (yourdomain.com/blog) | Subdomain (agents.yourdomain.com) | |
|---|---|---|
| SEO authority | Full root-domain authority | Partial (treated as a separate host) |
| Setup | Reverse-proxy rule on your edge | One CNAME record |
| Risk to main site | Proxy only touches the path prefix | Zero — isolated host |
| Recommended for | Most brands who want maximum authority | Teams who can't add a proxy rule |
Subpath is the recommended option because search engines and AI crawlers treat yourdomain.com/blog as part of your main site. This guide is about the subpath path; for the subdomain path, see subdomain hosting.
How it works
Your edge receives requests for yourdomain.com/blog and anything beneath it, and forwards them to Pendium, which serves your agent site content:
Only traffic on the prefix is proxied. Sibling paths like /blogger or /blogroll pass through to your own origin untouched.
The contract
Whatever platform you're on, your proxy needs to forward two URL shapes to Pendium:
- The bare prefix —
yourdomain.com/blog→https://pendium.ai/_proxy/{YOUR_PROXY_TOKEN} - Anything under it —
yourdomain.com/blog/<tail>→https://pendium.ai/_proxy/{YOUR_PROXY_TOKEN}/<tail>
Requirements:
- Preserve the HTTP method, headers, and query string verbatim.
- Do not rewrite the response body — Pendium emits absolute URLs already in your customer-facing shape.
- Recommended: set
X-Pendium-Forwarded-Host: yourdomain.comso canonical tags andog:urlrender with your host instead ofpendium.ai.
The {YOUR_PROXY_TOKEN} is minted once when you generate your first snippet and stays stable across regenerations — switching platform tabs or re-generating just refreshes the display, it doesn't rotate the token.
Prerequisites
- A domain you control, with access to its edge/hosting configuration.
- The ability to add one of: a Cloudflare Worker, a Vercel
vercel.jsonrewrite, a Netlify_redirectsrule, or a custom reverse-proxy rule (nginx, Apache, Caddy, etc.). - If you run a WAF or bot filter, allow Pendium's verification probe (user-agent
PendiumVerifier/1.0) and normal crawler traffic to the prefix.
Per-platform setup
Open Agent Site → Setup → Domain Connect, enter your domain and path prefix (defaults to /blog), pick your platform, and click Generate snippet. Paste the generated snippet into your platform, then click "I've added it, verify." The snippets below are templates — the wizard fills in your real token.
Cloudflare Workers
- In the Cloudflare dashboard, open your domain → DNS and confirm the apex record (and
wwwif you use it) shows an orange-cloud Proxied icon. Worker routes only fire on proxied traffic. - Open Workers & Pages → Create, pick the "Hello World" template, and name the Worker
pendium-subpath. - Replace the editor contents with the generated Worker script and click Save & Deploy.
- On your zone, open Workers Routes and add
*yourdomain.com/blog*→pendium-subpath. The leading*matches bothyourdomain.comandwww.yourdomain.com— important if your site redirects between them. - Click "I've added it, verify" in the wizard.
Vercel
Vercel rewrites preserve method, headers, and query string automatically.
- Open (or create)
vercel.jsonat the root of your project. - Add the
rewritesblock below, merging with any rewrites you already have. - Commit and push — Vercel deploys the rewrite automatically (usually under 60 seconds).
- Once the deploy lands, click "I've added it, verify."
Netlify
Netlify uses status 200 to proxy transparently (vs. 301, which would redirect). Order matters — the exact match must come before the wildcard.
- Open the
_redirectsfile in your publish directory (commonlypublic/_redirectsorstatic/_redirects). Create it if it doesn't exist. - Add the two lines below, keeping the order.
- Commit and push — Netlify deploys in under 60 seconds.
- Once the deploy lands, click "I've added it, verify."
Other (nginx, Apache, Caddy, custom)
Translate the contract above into your edge's reverse-proxy syntax. Example nginx fragment:
Deploy/reload your edge config, then click "I've added it, verify."
Verification
When you click "I've added it, verify," Pendium round-trips a health check to confirm your proxy is wired correctly:
- Pendium fetches
https://yourdomain.com/blog/_pendium/health?nonce=<random>— a request that flows through your proxy. - Your proxy forwards it to Pendium, which signs the response using a hash of your proxy token and the nonce.
- Pendium verifies the returned signature matches. A match proves the request reached Pendium through your domain using your token.
The probe times out after ~8 seconds per attempt and the wizard polls every few seconds for up to ~90 seconds. Once verification succeeds, the wizard records it and unlocks "Make this my primary destination."
Troubleshooting
| Symptom | Likely cause |
|---|---|
| Verification times out | Proxy rule not deployed yet (Vercel/Netlify still building), or the route pattern doesn't match your prefix. |
| 404 from your domain | The prefix in your snippet doesn't match the path you entered in the wizard, or the Cloudflare Worker route isn't attached. |
Works on www but not apex (or vice-versa) | Your route pattern only covers one host. Use a leading * (Cloudflare) or add both hosts. |
| WAF / bot filter blocks the check | Allow-list the PendiumVerifier/1.0 user-agent and normal crawler traffic on the prefix. |
Verifies, but pages link back to pendium.ai | Add the X-Pendium-Forwarded-Host header so canonical/og:url tags render your host. |
Making it your primary destination
After verification passes, click "Make this my primary destination" to tell Pendium your domain is the canonical home for the agent site. Pendium then renders canonical tags and internal links against your domain. Your pendium.ai/{username} URL keeps working as a fallback.
Disconnecting
To stop subpath hosting, clear the proxy configuration in the wizard. Pendium drops the proxy token and verification, and (if the proxy was your primary destination) reverts the canonical home to your pendium.ai agent-site URL. Remove the proxy rule from your edge afterward so the prefix returns to your own origin.