# Add, edit and delete DNS records

> Create, change and delete a zone's DNS records on a website's DNS tab or through the API.

Source: https://docs.coritan.com/websites/dns/manage-dns-records/

In the dashboard:

- /dashboard/websites/…/dns: https://www.coritan.com/dashboard/websites

A zone's records say where each name under the domain points: its website, its mail servers, the values other services ask you to publish. Manage them on the domain's **DNS** tab. Coritan's nameservers answer with a change as soon as you save it.

## Before you begin

The domain's DNS must be hosted on Coritan. If the **DNS** tab says **No DNS zone for this domain**, [add the domain as an existing domain](/websites/add-an-existing-domain/) first.

## Add a record

1. In the dashboard, go to [Websites](https://www.coritan.com/dashboard/websites), open the domain and select the **DNS** tab.
2. Select **Add record…**.
3. Choose the record's **Type**: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `NS`, `CAA` or `DS`.
4. Enter the **Name** relative to the zone: `www` for `www.example.com`, or `@` for the domain itself.
5. Enter the **Content**, such as `203.0.113.10` for an `A` record. [DNS record types](/websites/dns/record-types/) gives the format for each type.
6. For an `MX` or `SRV` record, enter its **Priority**. An `SRV` record also takes a **Weight** and a **Port**.
7. Choose the **TTL**, from **1 min** to **1 day**.
8. For an `A` or `AAAA` record, turn **Proxied** on to send the name's traffic through Coritan's edge ([Proxied records](/websites/dns/#proxied-records)).
9. Optionally, add a **Comment** to remind you what the record is for. It shows under the name in the table.
10. Select **Add record**.

## Edit a record

1. On the **DNS** tab, open the record's actions menu and select **Edit record…**.
2. Change the **Content**, the **Priority**, the **TTL**, **Proxied** or the **Comment**. A record's type and name stay as they are; to change either, add a new record and delete the old one.

   While a record is proxied, a new **Content** also becomes the origin host of the name's web proxy. Turning **Proxied** off deletes that web proxy, as [deleting the record](#delete-a-record) does.
3. Select **Save record**.

## Delete a record

> [!WARNING]
> Deleting a proxied record, or turning **Proxied** off, also deletes the web proxy for its name, with its origin, switches, redirect rules and error page. This happens to a web proxy you created in Edge Proxy too ([Web proxies and DNS records](/proxies/web-proxies/#web-proxies-and-dns-records)).

1. On the **DNS** tab, open the record's actions menu and select **Delete record…**.
2. Select **Delete record** to confirm.

## Find a record

Select a type above the table, such as `MX`, to show only records of that type, and select it again to show them all. The search box matches names, types and content. **Reset filters** clears both.

## Result

The dashboard confirms each change, such as `A record for www added.`, and the table shows the zone's records with their TTL and whether each one is **Proxied** or **DNS only**. Check a record from a terminal, straight from a Coritan nameserver:

```bash
dig @ns1.coritan.com www.example.com A +short
```

## Troubleshooting

`TTL must be between 60 and 86400 seconds`
: The TTL list also offers **Auto**, which the API refuses. Choose a time from **1 min** to **1 day**.

`Invalid IPv4 address: …`, `Invalid IPv6 address: …` or `Invalid hostname: …`
: The content does not fit the type. An `A` record takes an IPv4 address, an `AAAA` record an IPv6 address, and a `CNAME`, `MX`, `NS` or `SRV` record a hostname.

`CNAME records cannot exist at zone apex`
: A `CNAME` cannot sit at `@`. Use `A` and `AAAA` records for the domain itself.

`CNAME cannot coexist with other records at the same name` or `Cannot add records that coexist with a CNAME at the same name`
: A name with a `CNAME` has no other records. Delete the other records, or use a different name.

`Hostname is owned by a load balancer; manage it under load balancers`
: A load balancer answers for that name. Change its pools on the **Load balancing** tab ([Create a load balancer](/websites/load-balancing/create-a-load-balancer/)).

`Proxied origin targets a private or reserved network`
: A proxied record must point at a public address. Turn **Proxied** off, or use your server's public address.

`MX records require priority 0-65535`
: Enter a **Priority** for the `MX` record. `SRV` records need a priority, a weight and a port in the same range.

`Cannot delete this NS record. A zone needs at least 2 NS records.`
: The zone keeps at least two `NS` records at `@`.

`Record limit reached (1000)`
: The zone holds as many records as it may. Delete records it no longer needs.

## Related

- [How DNS hosting works](/websites/dns/)
- [DNS record types](/websites/dns/record-types/)
- [Import and export a zone file](/websites/dns/import-and-export-a-zone-file/)

## With the API

Add a record. The body takes `name`, `record_type`, `content` and `ttl` (300 when you leave it out), and, where the type needs them, `priority`, `weight` and `port`. `proxied` (for `A` and `AAAA` only) and `comment` are optional.

```bash
curl -X POST https://api.coritan.com/api/v1/dns/zones/42/records \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "@", "record_type": "MX", "content": "mail.example.com", "priority": 10, "ttl": 3600}'
```

The answer is `201` with the record:

```json
{
  "id": 311,
  "zone_id": 42,
  "name": "@",
  "record_type": "MX",
  "content": "mail.example.com",
  "ttl": 3600,
  "priority": 10,
  "weight": null,
  "port": null,
  "proxied": false,
  "comment": null,
  "created_at": "2026-09-25T09:30:00Z",
  "updated_at": "2026-09-25T09:30:00Z"
}
```

List records with `GET /api/v1/dns/zones/42/records`, sorted by name and type. Filter with `record_type` and `name` (exact, such as `name=www`), and page with `page` and `per_page` (100 by default, up to 1,000). Read one record with `GET /api/v1/dns/zones/42/records/311`.

Change a record with `PUT`, sending only the fields to change: `content`, `ttl`, `priority`, `weight`, `port`, `proxied` or `comment`. The type and the name cannot change.

```bash
curl -X PUT https://api.coritan.com/api/v1/dns/zones/42/records/311 \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ttl": 300}'
```

Delete a record with `DELETE /api/v1/dns/zones/42/records/311`, which answers `204`.

## API

- `GET /api/v1/dns/zones/{zone_id}/records`: List records (https://docs.coritan.com/api/reference/client/dns/#op-get-api-v1-dns-zones-zone-id-records)
- `POST /api/v1/dns/zones/{zone_id}/records`: Create record (https://docs.coritan.com/api/reference/client/dns/#op-post-api-v1-dns-zones-zone-id-records)
- `GET /api/v1/dns/zones/{zone_id}/records/{record_id}`: Get record (https://docs.coritan.com/api/reference/client/dns/#op-get-api-v1-dns-zones-zone-id-records-record-id)
- `PUT /api/v1/dns/zones/{zone_id}/records/{record_id}`: Update record (https://docs.coritan.com/api/reference/client/dns/#op-put-api-v1-dns-zones-zone-id-records-record-id)
- `DELETE /api/v1/dns/zones/{zone_id}/records/{record_id}`: Delete record (https://docs.coritan.com/api/reference/client/dns/#op-delete-api-v1-dns-zones-zone-id-records-record-id)
