Gmail Is Bouncing Your App's Email? Here's How to Fix SPF, DKIM, and DMARC
How to set up SPF, DKIM, and DMARC for your sending domain

If your automated emails land in spam or bounce with a 550 5.7.26 error, your sending domain probably lacks proper authentication. This guide walks through setting up SPF, DKIM, and DMARC DNS records, explaining how each check reads a different domain and why alignment with your visible From address matters. It includes concrete examples for a subdomain like mail.example.com, with verification steps and common pitfalls like duplicate SPF records.
This explains the otherwise confusing result where SPF and DKIM both say “pass,” but DMARC says “fail.” The checks can succeed for the wrong domains.