Add Worker Domain
add_worker_domainAttach a custom domain to a Cloudflare Worker. Requires an active zone in the account; DNS record and certificate are created automatically.
Instructions
Attach a custom domain to a Worker. The domain's zone must be active in this Cloudflare account (external zones are not supported); Cloudflare creates the DNS record and certificate automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | The Worker (script name) to route the hostname to | |
| zone_id | No | Zone ID (the zone must be active in this account) | |
| hostname | Yes | Hostname to attach, e.g. app.example.com (zone apex or subdomain) | |
| zone_name | No | Zone name, e.g. example.com | |
| environment | No | Worker environment (default: production) |