# Zuplo CLI: Custom Domain Update

<CliCommand
  command="custom-domain update"
  description="Updates the deployment assignment for a custom domain"
  options={[
  {
    "name": "hostname",
    "type": "string",
    "description": "The hostname for the custom domain",
    "required": false,
    "deprecated": false,
    "hidden": false
  },
  {
    "name": "deployment-name",
    "type": "string",
    "description": "The deployment name to assign the custom domain to. Omit to detach the current assignment.",
    "required": false,
    "deprecated": false,
    "hidden": false
  },
  {
    "name": "account",
    "type": "string",
    "description": "The account name",
    "required": false,
    "deprecated": false,
    "hidden": false
  },
  {
    "name": "output",
    "type": "string",
    "description": "Output format",
    "default": "default",
    "required": false,
    "deprecated": false,
    "hidden": false,
    "alias": [
      "o"
    ],
    "choices": [
      "default",
      "json"
    ]
  }
]}
  examples={[
  [
    "$0 custom-domain update \\\n  --hostname api.example.com \\\n  --deployment-name production-deployment",
    "Reassign a custom domain to a deployment"
  ],
  [
    "$0 custom-domain update --hostname api.example.com --output json",
    "Update a custom domain and output the result as JSON"
  ],
  [
    "$0 custom-domain update --hostname api.example.com",
    "Detach the current deployment assignment while preserving the stage"
  ],
  [
    "$0 custom-domain update \\\n  --hostname docs.example.com \\\n  --deployment-name portal-deployment \\\n  --account my-account",
    "Update a custom domain on a specific account"
  ]
]}
  usage="$0 custom-domain update --hostname <hostname> [options]"
>

</CliCommand>

## Global options

The following global options are available for all commands:

- [`--help`](./global-options.mdx#help)
- [`--api-key`](./global-options.mdx#api-key)
