Manage DNS records
When you add a new site to Cloudflare, Cloudflare automatically scans for common records and adds them to the DNS zone. The records show up under the respective zone DNS > Records page.
When the quick scan is not automatically invoked
The DNS records quick scan is not automatically invoked in the following cases:
- If you choose Enterprise plan and, instead of the Quick Scan, choose to upload a DNS zone file or add records manually.
- If you add a zone via the API.
You can manually invoke the quick scan via API with the Scan DNS Records endpoint.
Note that the quick scan is a best effort attempt based on a predefined list of commonly used record names and types. You can read more about this in the reference page.
Since this scan is not guaranteed to find all existing DNS records, you need to review your records, paying special attention to the following record types:
- Zone apex records (
example.com
) - Subdomain records (
www.example.com
orblog.example.com
) - Email records
If you want more control over which DNS records are imported and how, import a zone file.
Create DNS records
To create a DNS record in the dashboard:
- Log in to the Cloudflare dashboard ↗ and select an account and domain.
- Go to DNS > Records.
- Select Add record.
- Choose a record Type.
- Complete the required fields, which vary per record. Particularly important fields (for some records) include:
- Proxy status: For
A
,AAAA
, andCNAME
records, decide whether hostname traffic is proxied through Cloudflare. - TTL: Short for Time to Live, this field controls how long each record is valid and — as a result — how long it takes for record updates to reach your end users.
- Comment and Tag: Record attributes meant for your reference.
- Proxy status: For
- Select Save.
To create records with the API, use a POST request. For field definitions, select a record type under the request body specification.
For specific API examples, refer to DNS record types.
Edit DNS records
To edit DNS records in the dashboard:
- Log in to the Cloudflare dashboard ↗ and select an account and domain.
- Go to DNS > Records.
- On a specific record, select Edit.
- Make any necessary changes.
- Select Save.
To update part of a record with the API, use a PATCH request. If you want to overwrite the entire existing record, use a PUT request.
Delete DNS records
To delete DNS records in the dashboard:
- Log in to the Cloudflare dashboard ↗ and select an account and domain.
- Go to DNS > Records.
- On a specific record, select Edit.
- Select Delete.
- Select Delete again to confirm.
To delete records with the API, use a DELETE request.
Batch record changes
For guidance on how to apply several changes to your zone records in just one action, refer to Batch record changes.