Import and export records
When you add a new domain to Cloudflare, Cloudflare automatically scans for common records and adds them to your account’s DNS page. This scan is not guaranteed to find all existing DNS records, so make sure that all DNS records are added in the Cloudflare DNS page before changing your nameservers to Cloudflare nameservers.
If you want more control over which DNS records are imported and how, use the bulk import functionality.
Import records
Format your zone file
Create a BIND zone file for your domain. If you need help, use a third-party tool.
Make sure to remove all comments from your import file that start with a semicolon (;).
If you are using certain record types — for example, CNAME
, DNAME
, MX
, NS
, PTR
, or SRV
records — make sure that the content of those records contains fully qualified domain names (which end in a trailing period like example.com.
). For more details, refer to RFC 1035 or this post on Stack Exchange.
Import zone file to Cloudflare
Using the dashboard
To import a zone file using the dashboard:
- Log in to the Cloudflare dashboard and select your account and domain.
- Go to DNS.
- Click Advanced.
- For Import DNS records, select your formatted file.
- If you do not want applicable records proxied, unselect Proxy imported DNS records.
Using the API
To import records using the API, send a POST request with a properly formatted file.
Export records
You can also bulk export records from Cloudflare.
Using the dashboard
To export records using the dashboard:
- Log in to the Cloudflare dashboard and select your account and domain.
- Go to DNS.
- Click Advanced.
- Click Export.
Using the API
To export records using the API, send a GET request.