---
title: "MCP Tools Reference — PageWeave"
---

> For the full documentation index, see [PageWeave Documentation](https://pageweave.dev/docs) or fetch [llms.txt](https://pageweave.dev/llms.txt).

# list_hostnames, add_hostname, update_hostname, remove_hostname

Attach custom hostnames to a website and control how they resolve.

Hostnames are **resolution rules** — they decide which domains serve or redirect to a website. Domains whose DNS PageWeave manages (or domains PageWeave purchased) are separate account-level resources; see [Domains](/docs/mcp-tools/domains).

## Actions

### list

List all hostnames attached to a website (name, response_type, redirect_url, verified).

**Parameters:**
- `website` — Website subdomain, domain, or UUID

### add

Attach a custom hostname to a website.

**Parameters:**
- `website` — Website subdomain, domain, or UUID
- `name` — Hostname to attach (e.g. `example.com`, `www.example.com`, `blog.example.com`)
- `response_type` — How the hostname resolves (default `serve`):
  - `serve` — Serves the website. **Pro-only at runtime**: free sites auto-redirect to the platform subdomain.
  - `redirect` — Forwards to `redirect_url` (e.g. `https://example.com`).
  - `redirect_to_subdomain` — Forwards to the site's platform subdomain.
  - `disabled` — Hostname attached but not resolving.
- `redirect_url` — Target URL when `response_type` is `redirect` (required for that mode)

Adding an **apex** in `serve` mode auto-creates a `www.<apex>` companion hostname that 301-redirects to the apex.

### update

Change a hostname's `response_type` and optional `redirect_url`. `serve` on a free site auto-redirects to the platform subdomain. Requires confirmation (disabling takes the hostname offline).

**Parameters:**
- `website` — Website subdomain, domain, or UUID
- `name` — Hostname to update (exact match)
- `response_type` — `serve` | `redirect` | `redirect_to_subdomain` | `disabled`
- `redirect_url` — Target URL when `response_type` is `redirect`

### remove

Remove a hostname from a website — it stops serving/redirecting. Requires confirmation. Also removes an auto-created `www.<apex>` companion. Does **not** delete any Domain record (DNS-managed zones are owner resources — use the domain tools for those).

**Parameters:**
- `website` — Website subdomain, domain, or UUID
- `name` — Hostname to remove (exact match)

## SSL

SSL is provisioned automatically via on-demand TLS once DNS resolves to PageWeave's servers. For DNS setup instructions (which records to point at PageWeave), see [Domains](/docs/mcp-tools/domains).

## OAuth Scopes

| Action | Scope |
|--------|-------|
| list | `website:read` |
| add, update, remove | `website:write` |

