logo
search
Send & Receive Issues

How to Fix Gmail 550 5.7.26 SPF Hard Fail Errors

Anum MushtaqAnum Mushtaq Oct 22, 2026 868 views

Question details

The user needs to resolve an email delivery rejection issue where Gmail blocks messages sent from their domain with a 550 5.7.26 SPF error.

How to Fix Gmail 550 5.7.26 SPF Hard Fail Errors
Product
Microsoft 365 / Third-party mail server
Device & OS
not provided
Scenario
Sending emails to Gmail recipients using a domain that routes mail through both Microsoft 365 and a third-party mail gateway.
Observed behavior
Gmail rejects the sent messages with a 550 5.7.26 SPF Hard Fail error because the third-party sender's IP address is not authorized in the domain's SPF record.
Before you start

Ensure you have administrative access to your domain's DNS management portal and a complete list of all public IP addresses or include mechanisms for the third-party mail providers your organization uses.

Solution 1Recommended

Update the Domain's Single SPF TXT Record

Modify your existing SPF record to authorize all legitimate sending services, including both the third-party gateway and Microsoft 365, on a single line.

To prevent authentication failures, a domain must only have one SPF TXT record. If your organization uses multiple sending services like Microsoft 365 and another gateway, you must merge them into this single record.

Be mindful of the SPF DNS lookup limit (a maximum of 10 nested lookups). Exceeding this limit will cause email rejections even if the syntax is otherwise correct.

1
Access DNS Management

Log in to the control panel of your domain registrar or DNS hosting provider and navigate to the DNS records management section.

2
Locate the Existing SPF Record

Find the TXT record that begins with 'v=spf1'. Do not create a new TXT record if an SPF record already exists.

3
Add Microsoft 365 Authorization

If not already present, insert 'include:spf.protection.outlook.com' into the record to ensure Microsoft 365 emails pass authentication.

4
Add Third-Party Sender Authorization

Insert the required IP addresses or include statements for your third-party mail server (e.g., 'ip4:AUTHORIZED_IP' or 'include:AUTHORIZED_PROVIDER').

5
Format and Save

Ensure the entire record is written on one single line, ending with '~all' or '-all'. For example: 'v=spf1 ip4:192.0.2.1 include:spf.protection.outlook.com include:thirdparty.com ~all'. Save your changes.

Update the Domain's Single SPF TXT Record
DNS Propagation Time: After publishing the change in DNS, it may take several hours for the updated SPF record to propagate globally. You should test the updated record by sending an email to a Gmail address afterward.
Free Microsoft Office alternative

Enhance Your Daily Workflow with WPS Office

While troubleshooting domain DNS and Microsoft 365 delivery issues, streamline your document creation with WPS Office. It provides a free, fast, and highly compatible alternative to Microsoft Office for all your business needs.

Fully compatible with Microsoft Office formats (Word, Excel, PowerPoint) to attach perfectly in your outbound emailsLightweight application that uses fewer system resourcesCreate professional documents to send through your newly configured Microsoft 365 email serversFamiliar user interface ensuring zero learning curve and seamless migration
microsoft office alternative - wps office

Frequently Asked Questions

Can I have multiple SPF records for my domain?

No. Having more than one SPF TXT record for a single domain will cause SPF checks to fail permanently. You must consolidate all authorized IP addresses and 'include' mechanisms into one single line.

Does the order of items in an SPF record matter?

The order of mechanisms generally does not matter for the final authentication result, but processing stops at the first match. To optimize performance, it is recommended to place the most frequently used IP addresses or mechanisms closer to the beginning.

How do I know if my updated SPF record is working correctly?

After updating the record in your DNS settings, wait for the changes to propagate. Then, send a test email to a Gmail account, open the message options, and view the original message headers to verify that the SPF status says 'PASS'.