Remove a custom domain from a Cloudflare Pages project
cloudflare_pages_domain_removeRemove a custom hostname from a Cloudflare Pages project after confirmation, stopping visitors from reaching the site at that domain. This does not delete associated DNS records.
Instructions
Remove a custom domain, a hostname, from a Cloudflare Pages project; the tool always asks first in attended runs, since visitors to the hostname stop getting the site at once. The hostname must be one of the project's domains, as cloudflare_pages_read domains lists them; the result returns it as it was. Removing deletes no DNS record, and DNS changes stay with the cloudflare_dns_* tools. dns holds the records left at that name in the account's zone: a CNAME to the project's pages.dev address now answers with an error page, so offer to delete it with cloudflare_dns_record_delete, asking the person first, since the record may be wanted for something else. A step after the removal that fails is listed under errors and the domain stays removed. Adding a domain is cloudflare_pages_domain_add.
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": {
"project": "<project>",
"name": "<name>"
},
"name": "cloudflare_pages_domain_remove"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The custom domain's hostname, as in www.example.com: lowercased, with an internationalized name turned into punycode and a trailing dot dropped. No wildcard. | |
| account | No | The label of the credential pair to use, or "default" for the unlabeled one; left out, the unlabeled pair, else the only label. | |
| project | Yes | The Pages project's name, as `list` shows it: 1–58 lowercase letters, digits and `-`, starting with a letter or digit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dns | Yes | The records left at that name in the account's zone, or null when the account has no such zone. A CNAME to the project's pages.dev address now answers with an error page: offer to delete it with cloudflare_dns_record_delete, asking the person first, since the record may be wanted for something else. | |
| label | Yes | The account label. | |
| errors | No | The steps that failed after the write was done, keyed by step, as `code: message`; absent when none did. | |
| project | Yes | The Pages project's name. | |
| removed | Yes | The domain as it was before it was removed. |