ImportDnsRecords
Import DNS records for a domain using Cloudflare’s DNS-over-HTTPS API. This resource allows you to fetch DNS records for a domain and store them in a structured format that’s compatible with DNS management functions.Properties
The domain to fetch DNS records for (e.g., “example.com”).
Specific record types to fetch. If not provided, defaults to all supported types.Supported types:
"A"- IPv4 address"AAAA"- IPv6 address"MX"- Mail exchange"TXT"- Text record"NS"- Nameserver"CNAME"- Canonical name"SOA"- Start of authority"SRV"- Service record"PTR"- Pointer record
Bump the resource to force a new import. Increment this value to re-fetch DNS records.
Returns
The DNS records as a flat array. Each record contains:
name: Record nametype: Record typeTTL: Time to livedata: Raw record datacontent: Record content (compatible with DNS management)ttl: Normalized TTL valuepriority: Priority for MX/SRV records (optional)
Timestamp when the records were imported.
Examples
Import all DNS records
Import specific record types
Import and transfer to Cloudflare
Force re-import with bump
DNS Record Types
The DNS utilities support the following record types:A Record
Maps a domain name to an IPv4 address.AAAA Record
Maps a domain name to an IPv6 address.MX Record
Specifies mail servers for the domain.CNAME Record
Creates an alias from one domain to another.TXT Record
Stores text information, often used for verification and policies.GoDaddy Utilities
Update nameservers for domains registered with GoDaddy.updateNameservers
Update the nameservers for a GoDaddy domain.domain: Domain name to updateapiKey: GoDaddy API keyapiSecret: GoDaddy API secretnameservers: Array of nameserver hostnames