logo
search
Security Policy Errors

How to Fix Gmail Rejections by Configuring SPF and DKIM

Camila MilosovichCamila Milosovich Oct 15, 2026 869 views

Question details

The user needs to configure SPF and DKIM DNS records to stop Gmail from rejecting emails sent from their custom domain.

How to Fix Gmail Rejections by Configuring SPF and DKIM
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.
Before you start

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.

Solution 1Recommended

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.

1
Obtain Authentication Records

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.

2
Add the SPF Record to DNS

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').

3
Publish DKIM Keys

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.

4
Enable DKIM Signing

Return to your email provider's admin portal and toggle the setting to enable DKIM signing for outgoing messages on your domain.

5
Verify and Test

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.

Configure SPF and DKIM Records in Your DNS
DNS Propagation Time: DNS modifications are not always instant. If your test email still bounces immediately after setup, wait a few hours and try again.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install WPS Office: Run the downloaded installer file and follow the simple on-screen instructions to complete the setup.
  3. 3. Start Creating: Open WPS Office to instantly begin editing Word, Excel, PowerPoint, and PDF files.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for safe email attachments.Lightweight design ensures smooth performance without bogging down your computer.Built-in PDF tools to securely sign documents before emailing them.Familiar user interface makes transitioning away from heavy subscription suites completely seamless.
microsoft office alternative - wps office

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.