Configuring DKIM and SPF records
SPF and DKIM prevent your emails from going to spam and protect against spoofing.
SPF (Sender Policy Framework)
Add a TXT record at your domain root:
For Google: v=spf1 include:_spf.google.com ~all
For Microsoft: v=spf1 include:spf.protection.outlook.com ~all
DKIM (DomainKeys Identified Mail)
Your email provider generates a DKIM key. Add it as a TXT record at the selector they specify (e.g. google._domainkey).
DMARC
Add a TXT record at _dmarc.yourdomain.com:
v=DMARC1; p=quarantine; rua=mailto:you@yourdomain.com
Start with p=none to monitor, then tighten to quarantine or reject once you confirm everything works.