CNAME vs A Record Explained
Use an A record for static IPv4 servers. Use a CNAME or edge proxy for rotating PaaS hostnames.
Exact DNS wire fields: HOST identifies the label, TYPE picks the record format, TTL sets cache duration, TARGET holds the answer.
1. Engineering Breakdown
An A record maps a hostname to an IPv4 address like 203.0.113.10. A CNAME points one hostname to another hostname like myapp.fly.dev. Both A and CNAME records work cleanly on subdomains like myapp.makes.fyi.
Common Pitfalls
- DNS rules forbid a CNAME and TXT record on the same label. Put TXT on a sub-label or use
set_proxy. - Never include
https://or a trailing path in a CNAME target — DNS only resolves hostnames.
2. Interactive DNS Record Syntax Validator
Edit the record type, host label, or value below to validate syntax and build your CLI command.
3. Exact CLI, curl & MCP JSON-RPC Payloads
Pick your preferred interface below and copy the working payload.
agentdomains record myapp --type CNAME --content myapp.fly.dev
curl -X POST https://api.agentdomains.co/v1/subdomains/myapp/records \
-H "Authorization: Bearer $AGENTDOMAINS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"CNAME","content":"myapp.fly.dev"}'
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "add_dns_record",
"arguments": {
"label": "myapp",
"type": "CNAME",
"content": "myapp.fly.dev"
}
}
}
Frequently asked questions
What is CNAME vs A Record?
Use an A record for static IPv4 servers. Use a CNAME or edge proxy for rotating PaaS hostnames.
How do I automate CNAME vs A Record with AgentDomains?
Use the Go CLI snippet above, send a REST curl call, or invoke add_dns_record on https://mcp.agentdomains.co.
Related DNS & SSL Guides
TXT Record Domain Verification
Publish TXT records on your subdomain to verify ownership with Google, Bluesky, GitHub, and SaaS tools.
DNS FundamentalsTTL and DNS Propagation
Learn why new DNS records go live in seconds and how resolver TTL caches cause stale answers.
DNS FundamentalsZone Apex vs Subdomain DNS
See why myapp.makes.fyi accepts standard CNAME records while root domains need CNAME flattening.
AAAA (IPv6) DNS Records
Point your subdomain at IPv6-only VPS servers or run dual-stack routing next to an A record.
Claim your agent domain now
Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.