---
title: "Update DNS records"
method: PUT
path: "/api/dns/v1/zones/{domain}"
tags: ["DNS: Zone"]
---

# Update DNS records

`PUT /api/dns/v1/zones/{domain}`

Update DNS records for the selected domain.

Using `overwrite = true` will replace existing records with the provided ones. 
Otherwise existing records will be updated and new records will be added.

Use this endpoint to modify domain DNS configuration.

## Path parameters

- `domain` string, required

## Request body

- DNSV1ZoneUpdateRequest
  - `overwrite` boolean — If `true`, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.
  - `zone` object[], required
    - `name` string, required — Name of the record (use `@` for wildcard name)
    - `records` object[], required — Records assigned to the name
      - `content` string, required — Content of the name record
    - `ttl` integer — TTL (Time-To-Live) of the record
    - `type` 'A' | 'AAAA' | 'CNAME' | 'ALIAS' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA', required — Type of the record

## Response `200`

Success response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
