Master email authentication protocols to protect your domain, improve deliverability, and prevent email spoofing. Learn how to implement and maintain SPF, DKIM, and DMARC records effectively.
Email authentication is a set of protocols that help verify the legitimacy of email messages and protect against spoofing and phishing attacks.
SPF allows domain owners to specify which mail servers are authorized to send email on behalf of their domain.
v=spf1 include:_spf.yourdomain.com include:sendgrid.net include:amazonses.com ~all
v=spf1
- Version identifierinclude:
- Authorized sending domains~all
- Soft fail for unauthorized sendersip4:
- IPv4 addressesip6:
- IPv6 addressesa:
- Domain's A recordmx:
- Domain's MX recordsSPF has a 10 DNS lookup limit. Plan your includes carefully to avoid exceeding this limit.
DKIM adds a digital signature to your emails, allowing recipients to verify the message hasn't been altered in transit.
openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key
selector._domainkey.yourdomain.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
DMARC builds upon SPF and DKIM to provide domain-level email authentication, policy enforcement, and reporting.
v=DMARC1; p=reject; rua=mailto:[email protected]; ruf=mailto:[email protected]; pct=100; aspf=s; adkim=s;
p=none
- Monitor onlyp=quarantine
- Mark as suspiciousp=reject
- Reject unauthorized emailsrua=
- Aggregate reportsruf=
- Forensic reportspct=
- Percentage of messages to filterAlways start with a monitoring policy (p=none) before moving to quarantine or reject. Monitor reports carefully to avoid legitimate email disruption.
Regular testing ensures your authentication setup remains effective and properly configured.