# How to configure Edge DNS main settings

import DocButton from '~/components/webkit/DocButton.vue';
import Tag from '~/components/webkit/Tag.vue'
import Tabs from '~/components/tabs/Tabs'
import Code from '~/components/Code/Code.astro'


In this guide, you'll learn to create an [Edge DNS](/en/documentation/products/secure/edge-dns/) zone with its main settings and edit them after you create the zone.

---

<Tabs client:visible>
    <Fragment slot="tab.console">Console</Fragment>
    <Fragment slot="tab.api">API</Fragment>

<Fragment slot="panel.console">
In this section, you'll create or edit the main settings of **Edge DNS** with a domain via [Azion Console](https://console.azion.com).

1. Access [Azion Console](/en/documentation/products/guides/how-to-access-azion-console/) > **Edge DNS**.
2. To create a new zone, click the **+ Zone** button. To edit an existing zone, select the zone you want to edit from the list.

### Creating a new zone

1. Give your zone a unique and easy-to-remember name.
2. In **Domain Name**, add the name of the domain you want to host in Edge DNS. For example: `mydomain.com`.
3. Click the **Save** button.

### Editing an existing zone

1. Optionally, edit the name of your zone.
2. In **Domain Name**, edit the name of the domain you want to host in Edge DNS.
3. Click the **Save** button.

Once you're done configuring your main settings, you can add records to your Edge DNS.

:::caution[warning]
Once you host your domain on Azion Edge DNS, you must change your domain's authoritative DNS servers to use Azion's nameservers:

- ns1.aziondns.net
- ns2.aziondns.com
- ns3.aziondns.org
:::

<DocButton href="/en/documentation/products/guides/secure/add-records/" label="go to add records guide" kind="secondary" size="medium" />

</Fragment>

<Fragment slot="panel.api">

1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/) to create a new zone:

<Code lang="bash" code={`
curl --request POST \
  --url https://api.azion.com/v4/edge_dns/zones \
  --header 'Accept: application/json' \
  --header 'Authorization: Token [TOKEN VALUE]' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "New Zone",
  "domain": "yourdomain.com",
  "active": true
}'
`} />

2. You'll receive a response similar to this:

<Code lang="json" code={`
{
  "results": [
    {
      "nx_ttl": 3600,
      "domain": "yourdomain.com",
      "retry": 7200,
      "name": "New zone",
      "nameservers": [
        "ns1.aziondns.net",
        "ns2.aziondns.com",
        "ns3.aziondns.org"
      ],
      "soa_ttl": 3600,
      "active": true,
      "refresh": 43200,
      "expiry": 1209600,
      "id": 1234
    }
  ],
  "schema_version": 3
}
`} />

:::caution[warning]
Once you host your domain on Azion Edge DNS, you must change your domain's authoritative DNS servers to use Azion's nameservers:

- ns1.aziondns.net
- ns2.aziondns.com
- ns3.aziondns.org
:::

Wait a few minutes for the changes to propagate and your zone will be created.

:::tip
Check the [Azion API documentation](https://api.azion.com/) to know more about what the Azion API can offer.
:::

Once you're done configuring your main settings, you can add records to your Edge DNS.

<DocButton href="/en/documentation/products/guides/secure/add-records/" label="go to add records guide" kind="secondary" size="medium" />
</Fragment>

</Tabs>

---