Connect custom domain
set_domainConnects a custom hostname to one BrewPage HTML page or site and returns exact DNS records to create, so the domain can go live with automatic HTTPS.
Instructions
Connect a custom domain (a hostname the user owns) to one HTML page of format html or one site, without a password. Free with a BrewPage profile, up to 5 custom domains: a profile token works at once, an owner token after it is added to a profile (sign-in at https://account.brewpage.app/tokens, "Add existing token"). Returns the DNS records for the domain owner to create at their DNS provider exactly as returned: MX/mail records stay, an A, AAAA or CNAME record at the same name is replaced, at Cloudflare Proxy status is DNS only. One DNS check after the records exist is enough: BrewPage keeps checking on its own (first full check about 15 minutes after adding); usually live within 30 minutes, HTTPS is automatic. Status: pending_dns -> verifying -> active (lost when the DNS records break later); problem names the fix. A hostname already in the profile moves to this publication; the BrewPage link keeps working. Any registrar or DNS host works; if the user is buying a domain, Cloudflare and Porkbun are the quickest to set up. Steps and fixes: guide topic custom-domain.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"namespace": "<namespace>",
"id": "<id>",
"hostname": "<hostname>"
},
"name": "set_domain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Publication ID | |
| type | Yes | Publication type | |
| hostname | Yes | Bare hostname the user owns: www.example.com or example.com, no scheme or path | |
| namespace | Yes | Publication namespace | |
| ownerToken | No | A profile token, or the publication's owner token added to a BrewPage profile. Default: env BREWPAGE_OWNER_TOKEN (local server only). |