Migrate an existing zone with DNSSEC enabled

Last updated May 5, 2026 Follow this tutorial to migrate an existing DNS zone to Cloudflare without having to disable DNSSEC.

Caution

This procedure involves cross-importing the zone signing keys (ZSKs) ↗︎ from one provider to the other. To learn more about this, consider this article about multi-signer DNSSEC or refer to RFC 8901 ↗︎.

This is an advanced procedure and assume some familiarity with DNS concepts, API operations, and basic setup steps. Assumed knowledge that is not detailed in this tutorial can be referenced through the linked content in each of the steps.

Requirement

The provider you are migrating from must allow you to add DNSKEY records on the zone apex and use these records in responses to DNS queries.

1. Set up Cloudflare

  1. Add your zone to Cloudflare.

To add your zone using the API, refer to the Create Zone endpoint. 2. Review the records found by the automatic scan or import your zone file.

To import the zone file using the API, refer to the Import DNS Records endpoint. 3. On the DNS Settings ↗︎ page, select Enable DNSSEC. Or use the following API request.

<details>

<summary>

Required API token permissions

</summary>

At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:

  • <code>DNS Write</code>

</details>

Edit DNSSEC Statusbash

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dnssec" \
    --request PATCH \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    --json '{
        "status": "active"
    }'
  1. On the DNS Settings ↗︎ page, enable Multi-signer DNSSEC. Or use the following API request.

<details>

<summary>

Required API token permissions

</summary>

At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:

  • <code>DNS Write</code>

</details>

Edit DNSSEC Statusbash

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dnssec" \
    --request PATCH \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    --json '{
        "dnssec_multi_signer": true
    }'

2. Cross-import ZSKs

  1. Add the ZSK ↗︎ of your previous provider to Cloudflare by creating a DNSKEY record on your zone.

You can do this on the dashboard or through the Create DNS Record endpoint, as in the following example.

<details>

<summary>

Required API token permissions

</summary>

At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:

  • <code>DNS Write</code>

</details>

Create DNS Recordbash

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records" \
    --request POST \
    --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    --json '{
        "type": "DNSKEY",
        "name": "<ZONE_NAME>",
        "data": {
                "flags": 256,
                "protocol": 3,
                "algorithm": 13,
                "public_key": "<PUBLIC_KEY>"
        },
        "ttl": 3600
    }'
  1. Get Cloudflare's ZSK using either the API or a query from one of the assigned Cloudflare nameservers.

API example:

curl https://api.cloudflare.com/client/v4/zones/{zone_id}/dnssec/zsk \
--header "X-Auth-Email: <EMAIL>" \
--header "X-Auth-Key: <API_KEY>"

Command line query example:

dig <ZONE_NAME> dnskey @<CLOUDFLARE_NAMESERVER> +noall +answer | grep 256
  1. Add Cloudflare's ZSK that you fetched in the last step to your previous provider.

Note

You can check if both providers are responding with both ZSKs by running one dig command for each, as in the following example. You can also use Dig Web Interface ↗︎.

dig <ZONE_NAME> dnskey @<PREVIOUS_PROVIDER_NAMESERVER> +noall +answer
dig <ZONE_NAME> dnskey @<CLOUDFLARE_NAMESERVER> +noall +answer

Both queries should return both ZSKs (identified with tag 256).

<details>

<summary>

Example

</summary>

dig multisigner.info dnskey @dns1.p01.nsone.net. +noall +answer
multisigner.info.    3600    IN    DNSKEY    257 3 13 t+4D<bla_bla_bla>JBmA==
multisigner.info.    3600    IN    DNSKEY    256 3 13 pxEU<bla_bla_bla>0xOg==
multisigner.info.    3600    IN    DNSKEY    256 3 13 oJM<bla_bla_bla>XhSA==
dig multisigner.info dnskey @ashley.ns.cloudflare.com +noall +answer
multisigner.info.    3600    IN    DNSKEY    257 3 13 mdss<bla_bla_bla>eKGQ==
multisigner.info.    3600    IN    DNSKEY    256 3 13 oJM<bla_bla_bla>XhSA==
multisigner.info.    3600    IN    DNSKEY    256 3 13 pxEU<bla_bla_bla>0xOg==

</details>

3. Set up registrar

  1. Add Cloudflare DS record to your registrar. You can see your Cloudflare DS record on the DNS Settings ↗︎ page, under DS Record.
  2. Add Cloudflare assigned nameservers to your registrar. You can see your Cloudflare nameservers on the DNS Records ↗︎ page

At this point your zone is in a multi-signer DNSSEC setup.

4. Remove previous provider

  1. Remove your previous provider's DS record from your registrar.
  2. Remove your previous provider's nameservers from your registrar.
  3. After waiting at least one and a half times the TTL ↗︎ of your previous provider DS record, you can remove the DNSKEY record (containing your previous provider ZSK) that you added to your Cloudflare zone in step 2.

Note

You can find out the TTL of your previous provider DS record by running a dig command, as in the following example, or by using this Dig Web Interface link ↗︎.

dig multisigner.info ds +noall +answer
multisigner.info. 3600 IN DS 2371 13 2 227B4C7FF3E1D49D59BAF39BDA54CA0839DE700DD9896076AA3E6AD7 19A0CF55
multisigner.info. 3600 IN DS 48553 13 2 893709B51A9C53D011A4054B15FC5454BEDF68E739BB3B3FA1E333DA 7B8DACFE

In this example, both DS records have a TTL of 3600 seconds. Cloudflare's DS record always has the key tag set to 2371, so the second line of the response is the DS record of the other provider.

Was this helpful?

YesNo

On this page

Migrate an existing zone with DNSSEC ena - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/dnssec/dnssec-active-migration/#page","headline":"Migrate an existing zone with DNSSEC enabled","description":"Follow this tutorial to migrate an existing DNS zone to Cloudflare without having to disable DNSSEC.","url":"https://developers.cloudflare.com/dns/dnssec/dnssec-active-migration/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/dnssec/dnssec-active-migration/og.png?v=76f74193c03e3420","dateModified":"2026-05-05","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Migration"]}


description: Possible DNSSEC states and their meanings. title: DNSSEC states image: https://developers.cloudflare.com/dns/dnssec/dnssec-states/og.png?v=c71024e6e2b4fdaf


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.