Convert partial setup to secondary setup

Last updated May 5, 2026 If you initially set up a partial zone (CNAME setup) on Cloudflare, you can later convert it to use a secondary setup.

Subdomain setup

If you also use subdomain setup<sup>1</sup>, consider the available combinations and whether your zone conversion could have any implications.

Footnotes

  1. Meaning you have one or more subdomains ( sub.example.com) added to Cloudflare as their own zone, separate from your apex domain ( example.com). ↩

This page will guide you through this conversion using export and import and API calls.

Before you begin

Make sure you consider the following:

1. Prepare a zone file

  1. Export a zone file from the authoritative DNS provider you were using with your CNAME setup (partial).
  2. Edit the zone file to remove any occurrences of the cdn.cloudflare.net suffix.

  3. If the CNAME target is only appending the Cloudflare suffix to the same hostname at which it is created, replace it by the records on the Cloudflare partial zone.

<details>

<summary>

Example

</summary>

Original record in authoritative DNS provider:

Type Name Content
<code>CNAME</code> <code>www.example.com</code> <code>www.example.com.cdn.cloudflare.net</code>

Records in the Cloudflare partial zone:

Type Name Content
<code>A</code> <code>www.example.com</code> <code><IPv4></code>
<code>A</code> <code>www.example.com</code> <code><IPv4></code>

Final records adjusted in the zone file:

Type Name Content
<code>A</code> <code>www.example.com</code> <code><IPv4></code>
<code>A</code> <code>www.example.com</code> <code><IPv4></code>

</details>

  • If the CNAME record points to a different hostname, keep this record but remove the cdn.cloudflare.net suffix, and also bring the records from the Cloudflare partial zone.

<details>

<summary>

Example

</summary>

Original record in authoritative DNS provider:

Type Name Content
<code>CNAME</code> <code>www.example.com</code> <code>other-hostname.example.com.cdn.cloudflare.net</code>

Records in the Cloudflare partial zone (CNAME setup):

Type Name Content
<code>A</code> <code>other-hostname.example.com</code> <code><IPv4></code>
<code>A</code> <code>other-hostname.example.com</code> <code><IPv4></code>

Final records adjusted in the zone file:

Type Name Content
<code>CNAME</code> <code>www.example.com</code> <code>other-hostname.example.com</code>
<code>A</code> <code>other-hostname.example.com</code> <code><IPv4></code>
<code>A</code> <code>other-hostname.example.com</code> <code><IPv4></code>

</details>

2. Configure the Cloudflare zone

  1. Use the Import DNS Records endpoint with a properly formatted zone file to import the records into your partial zone.

The zone file size limit is 256 KiB (262144 bytes). Existing and already proxied records will not be overwritten by the import. 2. Use the Update DNS Settings endpoint with secondary_overrides set to true, to enable Secondary DNS Override.

Caution

This step is essential so that Cloudflare can keep the proxy status of the records after the conversion.

  1. Use the Edit Zone endpoint with type set to secondary, to convert the zone type.

You can verify if it answers as expected by querying the new assigned secondary nameservers. You can find your nameservers on the DNS Records ↗︎ page, and they should follow a format like ns0123.secondary.cloudflare.com.

# Replace ns0123 with your actual Cloudflare nameservers
dig example.com @ns0123.secondary.cloudflare.com
  1. At your registrar, update your nameservers to point to the Cloudflare nameservers.

Once the time to live (TTL) of previous NS records is expired and this information is evicted from resolvers' cache, your zone will be properly delegated to Cloudflare. In order to update DNS records, you must configure zone transfers in the next steps.

3. Configure the zone transfers

  1. Remove all references to cdn.cloudflare.net from your primary DNS provider. You can do this by importing the same zone file you prepared in Step 1 onto your primary zone.

Caution

If you keep any DNS records that still refer cdn.cloudflare.net, HTTP traffic for the respective hostnames will break.

  1. Enable outgoing zone transfers at your primary provider and create a peer DNS server on your Cloudflare account.

To create a peer server using the dashboard:

  1. In the Cloudflare dashboard, go to the account Settings page. Go to Configurations ↗
  2. Go to DNS Settings.
  3. Under DNS Zone Transfers, for Peer DNS servers, select Create.
  4. Enter the following information, paying particular attention to:
  5. IP: Specifies where Cloudflare sends transfer requests to.
  6. Port: Specifies the IP Port for the transfer IP.
  7. Enable incremental (IXFR) zone transfers: Specifies if Cloudflare sends IXFR requests in addition to the default AXFR requests.
  8. Link an existing TSIG: If desired, link the TSIG you previously created.
  9. Select Create.

To create a peer DNS server using the API, send a POST request.

  1. Link your Cloudflare zone to the peer DNS server you just created.

  2. In the Cloudflare dashboard, go to the DNS Settings page. Go to Settings ↗

  3. Under DNS Zone Transfers, select Manage linked peers.
  4. Choose a value for Zone refresh, which controls the number of seconds between zone updates from your primary DNS server.

Caution

Cloudflare will not use the REFRESH value inside the SOA record that is served by your primary provider. Instead the value of zone refresh configured for your secondary zone on Cloudflare will be used to determine the interval after which the SOA serial of the primary zone will be checked for changes. 4. Select the peer server you previously created. If needed, you can link more than one peer server to a zone. 5. Select Save to confirm.

Use the Update Secondary Zone Configuration endpoint to link your Cloudflare zone to the peer DNS server.

  1. On the DNS Settings ↗︎ page, confirm the linked peer is listed under DNS Zone Transfers, and select Initiate zone transfer. Alternatively, you can use the Force AXFR endpoint.

Was this helpful?

YesNo

On this page

Convert partial setup to secondary setup - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/zone-setups/conversions/convert-partial-to-secondary/#page","headline":"Convert partial setup to secondary setup","description":"If you initially set up a partial zone on Cloudflare, you can later convert it to use a secondary setup.","url":"https://developers.cloudflare.com/dns/zone-setups/conversions/convert-partial-to-secondary/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/zone-setups/conversions/convert-partial-to-secondary/og.png?v=75f9bed0a2a145c2","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/"}}


description: If you initially set up incoming zone transfers (Cloudflare as secondary), you can later convert your zone to use a full setup. title: Convert secondary setup to full setup image: https://developers.cloudflare.com/dns/zone-setups/conversions/convert-secondary-to-full/og.png?v=591402e783d7e3be


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.