---
title: "Remove a subdomain"
method: GET
path: "/SubDomain/delsubdomain"
tags: ["SubDomain"]
---

# Remove a subdomain

`GET /SubDomain/delsubdomain`

This function removes a subdomain from the cPanel account.

**Important:**

- If any addon domain is parked on the subdomain, the system refuses to
  remove it and names the addon domains in the `errors` field. Remove
  those addon domains first with the
  `AddonDomain::deladdondomain` function.
- This function does **not** remove the subdomain's document root or the
  files in it.

When you disable the [Web Server role](https://go.cpanel.net/serverroles#roles),
the system **disables** this function.

## Query parameters

- `domain` string, required
- `disallowdot` 0 | 1

## Response `200`

HTTP Request was successful.

- object
  - `data` unknown
  - `errors` string[], nullable
  - `messages` string[], nullable
  - `metadata` object
    - `transformed` integer
  - `status` 0 | 1 — * `1` — Success. * `0` — Failed. Check the `errors` field for more details.
  - `warnings` string[], nullable

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/revisions/632e2f8e6d04/schema)
