---
title: "Reset a DNS zone to the server defaults"
method: GET
path: "/ZoneEdit/resetzone"
tags: ["ZoneEdit"]
---

# Reset a DNS zone to the server defaults

`GET /ZoneEdit/resetzone`

This function resets a domain's [DNS](https://go.cpanel.net/dnsrecords)
zone to the server's default zone template.

**Important:**

- This action **destroys** every custom record in the zone. Records that
  the zone template does not recreate, for example `MX`, `TXT` and
  `CNAME` records added by hand, are lost.
- The reset outcome is reported in the `data` field rather than in the
  `status` field. A call can succeed at the API level while the zone
  rebuild itself fails, so check the `result.status` field in the
  returned data.

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

## Query parameters

- `domain` string, domain, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object[] — A single entry holding the zone rebuild's own reply. The rebuild outcome is reported here rather than in the response's `status` field.
    - `result` object — The reply from the zone rebuild.
      - `checkmx` object, nullable — The outcome of the mail exchanger check that the system runs after it rebuilds the zone. The system omits this field when the rebuild fails.
      - `status` 0 | 1 — Whether the system rebuilt the zone. * `1` - The system rebuilt the zone. * `0` - The rebuild failed. Check the `statusmsg` field for more details.
      - `statusmsg` string — A message that describes the rebuild's outcome.
  - `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)
