create_dns_record
Add DNS records to Cloudflare zones to direct traffic and manage domain routing. Supports A, AAAA, CNAME, TXT, MX records with configurable TTL and proxy settings.
Instructions
Create a new DNS record in a zone. Supports all DNS record types.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| type | Yes | DNS record type (A, AAAA, CNAME, TXT, MX, etc.) | |
| name | Yes | DNS record name (e.g., 'www' or '@' for root) | |
| content | Yes | DNS record content (e.g., IP address, hostname) | |
| ttl | No | Time to live (1 = automatic, or 120-86400 seconds) | |
| proxied | No | Whether the record is proxied through Cloudflare (only for A, AAAA, CNAME) | |
| priority | No | Priority (for MX, SRV records) | |
| comment | No | Comment for the DNS record |
Input Schema (JSON Schema)
{
"properties": {
"comment": {
"description": "Comment for the DNS record",
"type": "string"
},
"content": {
"description": "DNS record content (e.g., IP address, hostname)",
"type": "string"
},
"name": {
"description": "DNS record name (e.g., 'www' or '@' for root)",
"type": "string"
},
"priority": {
"description": "Priority (for MX, SRV records)",
"type": "number"
},
"proxied": {
"default": false,
"description": "Whether the record is proxied through Cloudflare (only for A, AAAA, CNAME)",
"type": "boolean"
},
"ttl": {
"default": 1,
"description": "Time to live (1 = automatic, or 120-86400 seconds)",
"type": "number"
},
"type": {
"description": "DNS record type (A, AAAA, CNAME, TXT, MX, etc.)",
"type": "string"
},
"zone_id": {
"description": "The zone ID",
"type": "string"
}
},
"required": [
"zone_id",
"type",
"name",
"content"
],
"type": "object"
}