How to Fix Gmail Rejections by Configuring SPF and DKIM
Question details
The user needs to configure SPF and DKIM DNS records to stop Gmail from rejecting emails sent from their custom domain.

- Product
- Domain DNS / Email Server
- Device & OS
- not provided
- Scenario
- Sending outbound emails to Gmail users and experiencing bounce backs or rejections due to strict sender security policies.
- Observed behavior
- Messages are rejected by Gmail servers because they fail authentication checks, usually due to missing or misconfigured SPF and DKIM records.
Ensure you have administrative access to your domain's DNS manager (such as Cloudflare, Route 53, or GoDaddy) and your email service provider's admin console.
Configure SPF and DKIM Records in Your DNS
Publishing the correct SPF and DKIM records proves to Gmail that your emails are authorized and untampered, resolving security rejections.
SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) are standard email authentication methods. SPF dictates which servers can send emails on your behalf, while DKIM securely signs outgoing messages.
For services like Microsoft 365, always use the specific records provided in their administrative portal (e.g., Microsoft Defender) rather than generating third-party keys.
Log in to your email provider's admin portal (e.g., Microsoft 365 Defender portal or Google Workspace Admin). Locate the email authentication settings to find the required SPF string and DKIM TXT or CNAME records.
Open your domain registrar's DNS management page. Add a new TXT record at the root level (@) and paste the SPF value provided by your email host (for example, 'v=spf1 include:spf.protection.outlook.com -all').
In the same DNS management page, create the new TXT or CNAME records for DKIM using the exact selectors and key values supplied by your email provider.
Return to your email provider's admin portal and toggle the setting to enable DKIM signing for outgoing messages on your domain.
Allow up to 48 hours for the DNS changes to fully propagate across the internet. Once propagated, verify the setup using your provider's built-in check tool, and send a test email to a Gmail address.

A Lightweight Alternative for Your Business Documents
While you optimize your domain's email deliverability, consider upgrading your document workflow. WPS Office provides a free, lightweight, and user-friendly alternative to expensive office suites, letting you focus on your business instead of complex software configurations.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer file and follow the simple on-screen instructions to complete the setup.
- 3. Start Creating: Open WPS Office to instantly begin editing Word, Excel, PowerPoint, and PDF files.

Frequently Asked Questions
What is the difference between SPF and DKIM?
SPF specifies which mail servers are authorized to send email on behalf of your domain. DKIM adds a digital signature to outgoing emails to prove to the receiving server that the message was not altered in transit.
Can I have multiple SPF records on one domain?
No, a single domain can only have one SPF TXT record. If you use multiple email sending services, you must merge their rules into one single SPF record using the 'include' mechanism.
Why are my emails still bouncing after adding the records?
DNS changes can take up to 48 hours to fully propagate worldwide. Additionally, ensure there are no typos in your DNS records and that you have actively enabled DKIM signing in your email provider's admin console.




