Pick the canonical URL for a custom domain
set_primary_subdomainMark a hostname as the primary (canonical) URL for its site. Sibling hostnames (apex + www both pointed at the same site) start 301-redirecting to it, preserving path + query. The host-side fix for the duplicate-content SEO problem. The first subdomain you add for a site is primary by default; call this only when you need to switch.
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": {
"domain": "<domain>",
"hostname": "<hostname>"
},
"name": "set_primary_subdomain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | registered custom domain, e.g. example.com | |
| hostname | Yes | full hostname to make primary, e.g. www.example.com |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |