Adding a TXT record in AWS Route 53 takes about 3 minutes via the console. CLI users can automate.
Prerequisites
- AWS account with Route 53 access
- Your domain configured as a Hosted Zone in Route 53
- Your domain’s nameservers pointing to Route 53’s (verify with the DNS query tool)
Step 1 — Open Route 53
- AWS Console → Route 53 → Hosted zones
- Click your zone’s domain name
Step 2 — Create Record
Blue Create record button at the top.
Step 3 — Fill in the Fields
- Record name — the subdomain (leave blank for the root domain):
- SPF → blank (root)
- DMARC →
_dmarc - DKIM →
{selector}._domainkey
- Record type — TXT
- Value — the TXT value, wrapped in double quotes:
"v=spf1 include:_spf.google.com ~all"- Route 53 requires the quotes; other DNS providers may not
- TTL — 300 seconds is a good default
- Routing policy — Simple routing (default)
Step 4 — Save
Click Create records. Route 53 propagates within 60 seconds.
Step 5 — Verify
Verify with the DNS query tool — enter your domain and the record name.
Long Records — Multi-String Format
For DKIM public keys or long SPF records over 255 characters, Route 53 requires splitting into multiple quoted strings on one record:
"first-half-of-the-record..." "second-half-of-the-record..."
Each string must be ≤ 255 characters. Route 53 concatenates them at query time.
CLI Alternative
aws route53 change-resource-record-sets \
--hosted-zone-id ZXXXXXXXXX \
--change-batch file://change.json
change.json:
{
"Changes": [{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "yourdomain.com.",
"Type": "TXT",
"TTL": 300,
"ResourceRecords": [{ "Value": "\"v=spf1 include:_spf.google.com ~all\"" }]
}
}]
}
Common Miss
- Forgetting the surrounding double quotes — Route 53 rejects the record
- Long DKIM record not split into multiple strings — the record over 255 chars fails validation
- Wrong record name (using the full FQDN when Route 53 only wants the subdomain part)
Verify with the DNS query tool.
Related
Browse every major DNS record type, check the TXT record glossary entry, and read how to add a TXT record in Cloudflare.