a — SPF Mechanism
The SPF a mechanism authorises the IP address(es) returned by a domain's A or AAAA record. Learn when to use it and common pitfalls.
Type
Mechanism
Mechanism
Syntax
a[:<domain>][/prefix-length][//ipv6-prefix]
DNS Lookup
Yes — counts toward 10-lookup limit
Yes — counts toward 10-lookup limit
Example
a:mail.example.com
💬 What This Mechanism Does
The "a" mechanism passes if the sending IP matches any A or AAAA record for the specified domain (defaulting to the sending domain if omitted). It's a convenient way to authorise a server you already use for your website or API without listing its IP directly.
When to Use This
- Authorising a dedicated mail server whose IP matches its A record
- Including a transactional server that shares your main domain's IP
⚠️ Watch Out For
- Counts as one DNS lookup. If the domain has many A records, all are evaluated.
- Avoid using bare "a" if your web server IP and mail server IP differ — it authorises the web IP too.
📚 RFC References
🔗 Related SPF Elements
🔧 Validate Your SPF Record
Check whether your current SPF record is valid and covers all your senders.