Docs navigation

Use your server

Custom domains

Serve your MCP server on a domain you own - mcp.yourcompany.com - instead of the https://<slug>.foro.sh URL every project starts with. The custom domain is an additional hostname for the same server, so the original URL keeps working. Find it under Project → Settings → Custom domain.

Add and verify your domain

  1. 1In Settings → Custom domain, enter your hostname and save. The status becomes Pending verification and foro shows a DNS TXT record - a name like _foro-challenge.mcp.yourcompany.com and a one-time token value - to prove you control the domain.
  2. 2Add that TXT record at your DNS provider, exactly as shown. Verification looks for this record, so publish it before continuing. DNS changes can take a few minutes to propagate.
  3. 3Point the domain at the platform. For a subdomain, add a CNAME to your project's <slug>.foro.sh - preferred, since it keeps working if the platform's IP changes. For an apex domain, use an A record to the platform's IP (or your provider's ALIAS / CNAME-flattening). The domain must resolve to the platform before a certificate can be issued.
  4. 4Back in Settings, click Verify. foro looks up the TXT record and flips the status to Verified. If it isn't found yet, the status shows failed and the record stays on screen - fix it and click Verify again, no need to re-enter the domain.
  5. 5Redeploy the project. Routing and TLS are applied on the next deploy, not the moment you verify - so a verified domain won't serve until you redeploy. On that deploy foro requests a Let's Encrypt certificate for your domain and starts routing it. After it finishes, https://mcp.yourcompany.com serves your server with a valid certificate.

Authentication is unchanged: callers still send the project's bearer token unless the project is public.

What's accepted

Only a plain hostname is allowed. Wildcards (*.yourcompany.com), ports, paths, IP addresses, and *.foro.sh names are rejected. Each domain can be attached to one project only - to move it, remove it from the first project first. To expose several subdomains, attach each one to its own project (mcp.yourcompany.com on one, mcp2.yourcompany.com on another); each gets its own TXT challenge, certificate, and routing.

Removing a domain

Remove domain in Settings clears the domain and its verification state. Routing for it is torn down on the next deploy; your <slug>.foro.sh URL is unaffected.

Troubleshooting

  • Verify keeps failing. Confirm the TXT record is live and matches exactly: dig TXT _foro-challenge.mcp.yourcompany.com should return the token foro shows. Wait for propagation, then retry.
  • Verified, but the domain doesn't load. You still need to redeploy - routing only updates on deploy.
  • Certificate errors after the first deploy. The domain must already resolve to the platform for the certificate to be issued. Recheck the CNAME/A record, then redeploy.
  • "Domain is already in use." That hostname is attached to another project; remove it there first.