---
title: "Set the default hostname"
method: PUT
path: "/app/{app_id}/custom-hostname/default/set"
tags: ["customHostnames"]
---

# Set the default hostname

`PUT /app/{app_id}/custom-hostname/default/set`

Set the default custom hostname for a specific app and service (registry, proxy, download portal, or replicated app).
The default hostname is used when no other custom hostname is specified for a channel.

Required RBAC Policy: kots/app/[:appid]/customhostname/default/set

## Path parameters

- `app_id` string, required

## Request body

- object
  - `downloadPortal` SetDefaultHostnameParams
    - `hostname` string
  - `proxy` SetDefaultHostnameParams
    - `hostname` string
  - `registry` SetDefaultHostnameParams
    - `hostname` string
  - `replicatedApp` SetDefaultHostnameParams
    - `hostname` string

## Response `200`

SetDefaultHostnameResponse contains whether or not the request was successful

- object
  - `success` boolean

## Other responses

- `400` — Returned on bad input
- `401` — Return if the caller is not authorized
- `403` — Returned if the caller does not have the needed permission
- `404` — Returned on resource not found

---

[API](https://skmtc.net/replicated/apis/vendor-api-v3-2.md) · [All operations](https://skmtc.net/replicated/apis/vendor-api-v3-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/replicated/vendor-api-v3-2/versions/6fcf9e54aba4/schema)
