To update your SPF record, find where your domain's DNS is managed, locate the single TXT record starting with v=spf1, edit it to add or remove each sender before the final all mechanism, save it, and verify it with an SPF checker. Never create a second SPF record, and allow up to 48 hours for the change to spread.
Key takeaways
- You get exactly one SPF record per domain, published as a TXT record at the domain root.
- Add every service that sends mail for you to that one record, before the final ~all or -all.
- Verify the change from outside your network and send a test message to confirm SPF passes.
Your SPF record is the list of servers allowed to send email for your domain. When you add a new marketing tool, switch email providers, or start sending invoices from a new app, that list has to change too — and doing it wrong is one of the fastest ways to land in spam.
What is an SPF record?
An SPF record is a DNS TXT record that tells receiving mail servers which systems may send email on behalf of your domain. It starts with v=spf1, lists authorized senders, and ends with an all mechanism that says what to do with everyone else.
SPF stands for Sender Policy Framework, and it is defined in RFC 7208. When a message arrives, the receiving server looks up your domain's SPF record and checks whether the sending server is on the list. If it is, SPF passes. If it is not, the result depends on your all setting.
SPF on its own does not stop spoofing completely, because it checks the envelope sender, not the address people see in the From field. That is why it works best alongside DKIM and DMARC. Our guide to what DMARC is explains how the three fit together.
When do you need to update your SPF record?
Update your SPF record whenever anything that sends mail as your domain changes. The most common triggers are switching mailbox providers, adding a marketing or transactional email service, or removing a service you no longer use.
Typical triggers include moving from Google Workspace to Microsoft 365 (or the reverse), starting to send newsletters through Mailchimp or a similar platform, adding a CRM, helpdesk, invoicing app, or website contact form that sends mail as you, and cleaning up after a migration so old providers are no longer authorized.
It is also worth reviewing the record at least once a year. Old include entries for services you stopped using are a security risk: if that service is ever compromised, an attacker could send mail that passes your SPF check.
What do you need before you update SPF?
Before you touch DNS, gather two things: a complete list of every service that sends mail as your domain, and the SPF include or IP address each one publishes. Guessing either part is how updates break.
Start by listing your mailbox provider, then every other sender: marketing platforms, transactional email services, your CRM, helpdesk, accounting software, e-commerce platform, and any website forms. Ask each vendor for its SPF instructions — most publish a page telling you exactly which include to add.
Next, find where your DNS is managed. Look up your domain's name servers with a WHOIS or DNS lookup. The company running those name servers is where the record lives, even if you bought the domain somewhere else. You can check your current records with our free SPF checker before you change anything.
How do you update an SPF record step by step?
Updating an SPF record means editing one existing TXT record at your DNS host. The whole job usually takes under ten minutes, plus waiting time for the change to spread.
- Sign in to your DNS host and open the DNS records for your domain.
- Find the existing SPF record: a TXT record whose value starts with
v=spf1. If there is no SPF record yet, create a new TXT record at the root of the domain instead. - Edit the value in place. Add each new sender as an
include:mechanism before the finalallmechanism. Remove senders you no longer use. Do not touch thev=spf1at the start. - Set the host or name to
@(some providers want it blank, or want the domain name itself) and the TTL to at least 3600 seconds, as Microsoft recommends. - Save the record, then verify it as described below.
If your DNS host has a dedicated SPF setup screen, use it — but check the raw TXT value afterward. Some wizards add a second record instead of editing the first, which is exactly the mistake to avoid.
How do you update SPF for Google Workspace?
For Google Workspace only, the record is v=spf1 include:_spf.google.com ~all. You do not change anything in the Google Admin console; SPF lives only in DNS at your domain host.
To add another sender, insert its include before ~all. Google's own examples include v=spf1 include:_spf.google.com include:servers.mcsv.net ~all for Google Workspace plus Mailchimp, and v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all for Google Workspace plus Microsoft 365 during a migration. Full details are in Google's SPF setup guide.
Google recommends ~all (soft fail), which tells receivers to mark mail from unlisted servers as spam rather than rejecting it outright. That is the safer choice while you are still finding every sender.
How do you update SPF for Microsoft 365?
For Microsoft 365 only, the record is v=spf1 include:spf.protection.outlook.com -all. Microsoft recommends -all (hard fail) for its domains, combined with DKIM and DMARC.
There is nothing to switch on inside Microsoft 365 itself — SPF is published only in DNS. If an on-premises Exchange server also sends mail, add its public IP before the include, for example ip4:192.0.2.10. For Microsoft 365 GCC High or DoD tenants, the include is spf.protection.office365.us instead.
If you are moving between Google Workspace and Microsoft 365, list both includes during the move, then remove the old provider once every mailbox has migrated and you have confirmed mail flows correctly.
What do common SPF records look like?
Most small businesses need one of a handful of records. The table below shows the starting point for each setup; add your other senders before the final all mechanism.
| Setup | SPF record | Ending |
|---|---|---|
| Google Workspace only | v=spf1 include:_spf.google.com ~all | Soft fail |
| Microsoft 365 only | v=spf1 include:spf.protection.outlook.com -all | Hard fail |
| Google + Microsoft 365 | v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all | Soft fail |
| Google + Mailchimp | v=spf1 include:_spf.google.com include:servers.mcsv.net ~all | Soft fail |
| Google + Amazon SES | v=spf1 include:_spf.google.com include:amazonses.com ~all | Soft fail |
| Microsoft 365 + on-premises server | v=spf1 ip4:192.0.2.10 include:spf.protection.outlook.com -all | Hard fail |
Replace the example IP address with your own server's real public IP. Never copy an example IP into a live record — it would authorize someone else's server.
How does SPF syntax work?
Every SPF record starts with v=spf1, then a space-separated list of mechanisms, then one all mechanism at the end. The order matters: mechanisms are checked left to right, and the first match decides the result.
include:domain— authorize the servers listed in another domain's SPF record. This is how you add a provider.ip4:addressandip6:address— authorize a specific server by IP address.a:domainandmx:domain— authorize the servers in the domain's A or MX records.~all— soft fail: mail from anyone else is suspicious and should be treated as spam.-all— hard fail: mail from anyone else should be rejected.+all— never use this. It authorizes the entire internet to send as your domain.
Keep the record as short as you can. Every include, a, mx, exists, and redirect term costs a DNS lookup, and SPF stops after 10 of them.
What is the SPF 10 DNS lookup limit?
SPF evaluation stops after 10 DNS-querying terms. If your record needs more, the result is a permanent error under RFC 7208, and the message fails SPF even though every sender is legitimate.
This limit bites when you stack many includes, because each provider's include can itself trigger several lookups. Google's _spf.google.com and Microsoft's spf.protection.outlook.com each use several lookups behind the scenes.
To stay under the limit, remove includes for services you no longer use, replace an include with a direct ip4 entry where the sender has a stable IP, and move some senders to a subdomain — for example, send marketing mail from mail.example.com, which gets its own SPF record and its own lookup budget. Do not flatten Microsoft's include into IPs yourself, because the underlying addresses change often.
How do you verify an updated SPF record?
Verify from outside your own network, because your DNS host's dashboard shows what you saved, not what the rest of the internet sees. Check the record, then check a real message.
- Check the DNS record: run
dig +short TXT example.com(using your own domain) or use our SPF checker. You should see exactly one line starting withv=spf1. - Count the lookups: the checker should confirm the record stays within the 10-lookup limit and has no syntax errors.
- Send a test message from your mailbox to a personal Gmail address. Open it, choose Show original, and look for
SPF: PASS. - Test every sender: send a test from each service you added — marketing platform, CRM, invoicing app — not just your mailbox.
- Wait, then re-check: if a test fails in the first hour, wait for the old record's TTL to expire and test again before changing anything else.
Also check your DKIM setup and DMARC record after an SPF change. SPF and DKIM are independent, but DMARC relies on at least one of them passing, so a broken SPF update can affect DMARC alignment too.
What are the most common SPF update mistakes?
Most SPF breakage comes from a short list of avoidable mistakes. Check for these before you save, and again if mail starts landing in spam after an update.
- Two SPF records. Adding a new TXT record instead of editing the existing one. Merge them into one record.
- A forgotten sender. The new marketing tool or invoicing app was never added, so its mail fails SPF.
- Too many lookups. Stacking includes until the record exceeds the 10-lookup limit and returns a permanent error.
- Editing the wrong DNS host. The record was changed at the registrar while the name servers point to Cloudflare, or the reverse.
+allat the end. This authorizes everyone. It usually comes from a copied example and should never be in a live record.- Typos in an include. One wrong character in
include:_spf.google.comsilently breaks authorization for that provider. - Switching to
-alltoo early. Hard fail is correct once every sender is listed, but switching before you have found them all rejects legitimate mail.
If mail starts failing after an update, restore the backed-up record first, then diagnose. Reverting is faster than guessing at a fix while legitimate mail is being rejected.
The bottom line
Updating an SPF record is a small edit with outsized consequences: one record, edited in place, listing every service that sends mail as your domain. Get the list right, stay under the lookup limit, and verify with a real test message.
Once SPF is correct, finish the job with DKIM and DMARC so receivers can trust your mail and attackers cannot impersonate you. Start by checking your domain's current SPF record with the free SPF checker.
Frequently asked questions
Where do I update my SPF record?
At your DNS host, the company that runs your domain's name servers. That is often your domain registrar, your web host, or Cloudflare, not your email provider. Google Workspace and Microsoft 365 do not host your SPF record; they only tell you what value to publish.
Can I have two SPF records?
No. A domain must have exactly one SPF record. Two TXT records starting with v=spf1 cause a permanent error, and receiving servers may treat SPF as failed. If you find two, merge them into one record and delete the other.
How long does an SPF update take?
Google says changes can take up to 48 hours to spread, though most resolvers see the new record within minutes to a few hours. The delay depends on the record's TTL, which Microsoft recommends setting to at least 3600 seconds.
Should I use ~all or -all at the end of my SPF record?
Google recommends ~all, which tells receivers to treat mail from unlisted servers as suspicious. Microsoft recommends -all for Microsoft 365 domains, which tells receivers to reject it. Use -all only once you are sure every legitimate sender is listed.
What happens if I forget a sender in my SPF record?
Mail from that sender can fail SPF and land in spam or be rejected. This is the most common cause of broken SPF updates, so list every service before you save: your mailbox provider, marketing platform, CRM, helpdesk, and any app that sends mail as your domain.
What is the 10 DNS lookup limit in SPF?
SPF evaluation stops after 10 DNS-querying terms such as include, a, mx, and redirect. Exceeding the limit produces a permanent error under RFC 7208. If your record is too long, move some senders to a subdomain, which gets its own lookup budget.
Do I need to update SPF when I change email providers?
Yes. When you move mailboxes to a new provider, replace the old provider's include with the new one in the same record. During a move you can list both providers temporarily, then remove the old one once the migration is finished.
How do I check my SPF record after updating it?
Use an SPF checker or run dig +short TXT yourdomain.com and confirm you see exactly one record starting with v=spf1. Then send a test message to a personal Gmail account, open Show original, and look for SPF: PASS.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Google Workspace Admin Help, Microsoft Learn SPF guidance, and RFC 7208.
How we write and fact-check →