Cloudflare DNS
Cloudflare API token setup: create a scoped API token that can read (and, to apply, edit) DNS records for the zones you're moving.
On this page
Cloudflare API token permissions
- Credential type
- API token
- Preview access
- Zone · DNS · Read
- Apply access
- Zone · DNS · Edit
- API endpoint
- DNSMigrator uses the provider's fixed API endpoint.
Additional access
DNSControl id
{
"TYPE": "CLOUDFLAREAPI"
}Create credentials
Create a scoped API token that can read (and, to apply, edit) DNS records for the zones you're moving.
Access you'll grant
Zone · DNS · Read
Zone · DNS · Edit
Before you start
- A Cloudflare account with access to the zones. Any plan, including Free, works.
Setup steps
0 of 6 done
Open API Tokens
Sign in to the Cloudflare dashboard and go to My Profile → API Tokens, then select Create Token.
Start from the Edit zone DNS template
Next to Edit zone DNS, select Use template. It grants Zone · DNS · Edit, which covers the preview and the apply. For a preview only, choose Create Custom Token instead and add Zone · DNS · Read.
PreviewZone · DNS · ReadApplyZone · DNS · EditScreenshot: Cloudflare Docs, CC BY 4.0
Limit the token to your zones
Under Zone Resources, choose Include → Specific zone and pick each zone you're migrating, or All zones from an account. Leave Client IP Address Filtering empty: requests come from our servers.
Review and create
Select Continue to summary, check the zones and permissions, then select Create Token.
Screenshot: Cloudflare Docs, CC BY 4.0
Copy the token
Cloudflare shows the secret once. Copy it and paste it into API token here. New tokens start with
cfut_.Screenshot: Cloudflare Docs, CC BY 4.0
Add the Account ID (optional)
Only needed if we should create the zone at Cloudflare for you. It's on the zone's Overview page under API → Account ID, and in the account home URL:
dash.cloudflare.com/<account ID>.
Troubleshooting
“The API token is not active” or “Invalid API Token”
The token was rolled, expired (check its TTL) or copied incompletely. Create a new one and paste the whole value.
The zone list is empty
Zone Resources doesn't include the zone. Edit the token and add it under Zone Resources.
Connected with read access only
The token has DNS Read but not DNS Edit. Edit the token, change DNS to Edit, and check access again.
Official documentation
Guide checked against the official documentation on .
Credential fields
| Field | Requirement | Where to find it |
|---|---|---|
| API tokenapiToken | Required | Shown once, when you create the token. New tokens start with cfut_. |
| Account IDaccountId | Optional | 32 hex characters. Only needed to create zones: zone Overview → API → Account ID. |
Capabilities
- Create zones
- Yes
- List zones
- Yes
- DNSSEC
- Managed through the API
- Minimum TTL
- 60 seconds
- Apex CNAME
- Supported through flattening
- Read only
- No
Record types
- A
- AAAA
- CNAME
- MX
- TXT
- NS
- SRV
- CAA
- PTR
- DS
- HTTPS
- SVCB
- TLSA
- SSHFP
- NAPTR
- LOC
- CERT
- URI
Cloudflare-only types
- CF_REDIRECT
- CF_TEMP_REDIRECT
- CF_SINGLE_REDIRECT
- CF_WORKER_ROUTE
These records need translation or review when you move to another provider.
Caveats
- Proxied (orange-cloud) records hide the origin IP. Moving them to another provider sends traffic straight to the origin.
- Apex CNAMEs are flattened by Cloudflare. Other providers need an ALIAS record or static A/AAAA records instead.
- Cloudflare Registrar only allows Cloudflare nameservers, so domains registered there must be transferred out first.
Troubleshooting
- “The API token is not active” or “Invalid API Token”
- The token was rolled, expired (check its TTL) or copied incompletely. Create a new one and paste the whole value.
- The zone list is empty
- Zone Resources doesn't include the zone. Edit the token and add it under Zone Resources.
- Connected with read access only
- The token has DNS Read but not DNS Edit. Edit the token, change DNS to Edit, and check access again.