SPF & DKIM Records
Email providers use SPF and DKIM to verify that messages are authorised to send from your domain. Setting these records correctly helps prevent your emails from being marked as spam or rejected by recipient mail servers.
Overview
SPF and DKIM are DNS records that establish trust between your email server and recipients. Without them, your outbound emails may appear spoofed and get filtered or bounced. An SPF record lists the servers authorised to send email on behalf of your domain, while DKIM adds a digital signature to each message so receiving servers can verify its integrity.
Why Add Records
If your emails are sent from a third‑party provider, the recipient’s spam filters may see a mismatch between the from address and the sending server. By publishing the provider’s SPF and DKIM records in your DNS, you show that the provider is authorised to send on your behalf. This alignment greatly improves deliverability and reduces the likelihood of messages ending up in junk folders.
SPF Setup
An SPF record is a TXT entry in your DNS that declares which mail servers are authorised to send email for your domain. A typical SPF record looks like this:
v=spf1 include:example.com ~all
Replace example.com with the domain of your email provider. Add the line using your domain registrar’s DNS management tools. If you already have an SPF record, add the provider using the include: directive to avoid multiple SPF records.
DKIM Setup
DKIM uses public/private key pairs to sign outgoing emails. Your provider will supply one or more CNAME records that you must add to your DNS. Each record typically looks like:
selector._domainkey IN CNAME selector.provider.com
Replace selector with the value provided by your email service and provider.com with the DKIM host they specify. After creating the CNAME records, allow up to 48 hours for DNS propagation. Your provider’s interface should show when the keys validate.
Additional Tips
- Only one SPF record should exist per domain. If you need multiple providers, combine them using the
include:directive. - DKIM selectors can rotate periodically. Add new CNAME records before removing old ones to avoid breaks in signature validation.
- After updating DNS, use an online SPF/DKIM checker to confirm the records are published correctly. Some email services provide a status page for verification.
