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
- 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:
- Proxying traffic with secondary zones requires a setting that is not turned on by default. Refer to Secondary DNS override to learn more. The steps below include enabling this setting.
- There are a few options for DNSSEC with incoming zone transfers. If you want to use DNSSEC, plan for which option you will configure and confirm that your other DNS provider(s) support the setup.
- You can prepare SSL/TLS in advance by either ordering an advanced certificate or uploading a custom certificate. You should confirm that the certificate covers all your proxied hostnames and that the status of your SSL certificate ↗︎ is Active.
1. Prepare a zone file
- Export a zone file from the authoritative DNS provider you were using with your CNAME setup (partial).
-
Edit the zone file to remove any occurrences of the
cdn.cloudflare.netsuffix. -
If the
CNAMEtarget 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
CNAMErecord points to a different hostname, keep this record but remove thecdn.cloudflare.netsuffix, 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
- 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.
- Use the Edit Zone endpoint with
typeset tosecondary, 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
- 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
- Remove all references to
cdn.cloudflare.netfrom 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.
- 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:
- In the Cloudflare dashboard, go to the account Settings page. Go to Configurations ↗
- Go to DNS Settings.
- Under DNS Zone Transfers, for Peer DNS servers, select Create.
- Enter the following information, paying particular attention to:
- IP: Specifies where Cloudflare sends transfer requests to.
- Port: Specifies the IP Port for the transfer IP.
- Enable incremental (IXFR) zone transfers: Specifies if Cloudflare sends IXFR requests in addition to the default AXFR requests.
- Link an existing TSIG: If desired, link the TSIG you previously created.
- Select Create.
To create a peer DNS server using the API, send a POST request.
-
Link your Cloudflare zone to the peer DNS server you just created.
-
In the Cloudflare dashboard, go to the DNS Settings page. Go to Settings ↗
- Under DNS Zone Transfers, select Manage linked peers.
- 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.
- 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
{"@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
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.
Docs