Should Exchange Hybrid Add Its Public IP to SPF?
Question details
Determine whether an Exchange hybrid organization needs to include its on-premises public IP address in its SPF record.

- Product
- Microsoft Exchange hybrid and Microsoft 365
- Device & OS
- not provided
- Scenario
- An organization wants to authenticate outbound email sent from its hybrid Exchange environment.
- Observed behavior
- The organization needs an SPF record that authorizes the services and IP addresses that send mail directly to recipients for the relevant domain.
Identify the public IP addresses and services that deliver outbound mail directly to recipients, including any third-party senders. Check the existing DNS TXT records for the domain used in the email envelope sender.
Authorize only the outbound senders used by your Exchange hybrid domain
Use the actual outbound mail route to decide whether the on-premises public IP belongs in the domain's SPF record.
Add the on-premises public IP if mail for the domain is delivered directly to recipient servers from that IP. If all mail goes through Microsoft 365 or another authorized relay, the local IP is not needed for SPF, even if the mail originated on an on-premises server.
SPF checks the connecting sender IP against the envelope sender domain's policy. Omitting an IP that sends directly can cause SPF to fail, potentially affecting message acceptance or delivery.
In the Exchange admin center, review mail flow and connectors, then inspect message headers or message traces to determine which service or public IP delivers mail to external recipients.
Open your DNS host's management panel and look for a TXT record beginning with v=spf1 for the relevant domain. Alternatively, run nslookup -type=txt example.com and inspect the results.
Edit the existing SPF TXT record at your DNS host. For example, a domain using Microsoft 365 and a direct on-premises sender might use "v=spf1 ip4:203.0.113.10 include:spf.protection.outlook.com ~all". Replace the example IP and include any other authorized senders; omit the ip4 mechanism if the local IP does not send directly.
Save the DNS change, then query the domain's TXT records again with nslookup -type=txt example.com. Confirm that only one TXT record for that domain starts with v=spf1, and send a test message to check its authentication results.

Work with Exchange Planning Documents in WPS Office
WPS Office is a free, lightweight alternative for working with office documents. Its familiar interface and Microsoft Office format compatibility help teams migrate existing files, though it does not configure Exchange or DNS records.

Frequently Asked Questions
Is the on-premises public IP mandatory in an Exchange hybrid SPF record?
No. Add it only if it sends mail directly to recipient servers for the domain. If outbound mail is delivered through Microsoft 365 or another authorized relay, authorize that service instead.
What happens if I leave out an IP that sends mail directly?
Messages sent from the omitted IP may fail SPF. Depending on the recipient's filtering and the domain's DMARC policy and alignment, those messages could be marked as spam or rejected.
Can I publish separate SPF records for Microsoft 365 and my local server?
No. Multiple v=spf1 records for the same domain can cause an SPF permanent error. Edit the existing TXT record to combine the authorized Microsoft 365 include, local IP, and any other senders.
How can I check which SPF record is published?
Run nslookup -type=txt example.com, replacing example.com with the relevant envelope sender domain. Look for the TXT record beginning with v=spf1 and confirm that it lists the intended senders.
Does passing SPF guarantee that email will be delivered?
No. Recipients may also evaluate DKIM, DMARC alignment, sender reputation, and message content. Check the Authentication-Results header on a test message for SPF and other authentication results.




