Clayo

Guides/Domains and hosting

Host docs at yoursite.com/docs

Docs at yoursite.com/docs keep your docs on the same domain as your product, which many teams prefer for SEO and for keeping one address in front of customers. Clayo supports this with a docs base URL plus a small rewrite on your site.

It takes two steps: tell Clayo the base URL, then add a reverse proxy rule where your site is hosted.

Step 1: set the base URL

Ask your agent:

Serve our docs at https://acme.com/docs

The agent sets the base URL and replies with the exact rewrite recipe for your host. Owners and admins can also set it in Settings, under General, in the Subpath hosting row.

The base URL must be https, on your own domain, with exactly one path segment: /docs and /help work, /help/docs does not.

Step 2: add the rewrite on your site

Your site needs to forward /docs traffic to your Clayo site, keeping the path intact. Replace acme with your own subdomain.

Add two rewrites to vercel.json (or the rewrites config in next.config.js):

{
  "rewrites": [
    { "source": "/docs", "destination": "https://acme.clayo.site/docs" },
    { "source": "/docs/:match*", "destination": "https://acme.clayo.site/docs/:match*" }
  ]
}

Do not strip the path prefix. Clayo serves your docs under /docs, so /docs/articles/quickstart on your domain must arrive at Clayo as /docs/articles/quickstart.

Verify

curl -sSI https://acme.com/docs

A 200 response means the proxy is working. Click through a few articles and confirm search opens too.

What changes

The base URL becomes the canonical address everywhere: internal links, the sitemap, llms.txt, and the URLs your agent reports after publishing. acme.clayo.site permanently redirects to the new base, so links you shared earlier keep working.

Subpath or custom domain?

  • A custom domain like help.acme.com is DNS only: no proxy to maintain, live in minutes
  • A subpath keeps docs on your primary domain, at the cost of one rewrite rule on your infrastructure

If you set both, the base URL is canonical.

Removing it

Ask your agent to remove the docs base URL, or clear the row in Settings. Your site returns to its previous canonical address with no downtime.