Solution:
Root Cause: Missing or Misdirected MX (Mail Exchange) DNS Records When third-party servers transmit email to a custom Google Workspace domain (
@yourdomain.com), they execute a DNS lookup for the domain's MX records. If domain MX records point to old web hosting servers (e.g., cPanel, Namecheap, Bluehost) or were erased during a DNS manager migration (e.g., moving to Cloudflare), sending servers cannot locate Google's inbound mail gateways, resulting in immediate delivery failures (
550 5.1.1 Host or domain name not found).
Step-by-Step Fix: 1 Inspect Current MX Records via Terminal:
Run dig to list active Mail Exchange servers: Copy
bash
dig +short MX example.com
2 Purge Legacy Host MX Records:
Log into your DNS provider (Cloudflare, GoDaddy, Namecheap) and delete any existing MX records pointing to local hosting servers (e.g., mail.example.com or smtp.secureserver.net). 3 Add Google Workspace MX Records:
Add the single simplified Google Workspace record (recommended for modern setups): Type: MX | Name: @ | Target: SMTP.GOOGLE.COM. | Priority: 1*Or add legacy Google Workspace records if required:* ASPMX.L.GOOGLE.COM. (Priority 1)ALT1.ASPMX.L.GOOGLE.COM. (Priority 5)ALT2.ASPMX.L.GOOGLE.COM. (Priority 5)4 Verify TTL and Propagation:
Confirm resolution via Google Public DNS: Copy
bash
nslookup -type=MX example.com 8.8.8.8