SPF record check: stop email spoofing from your domain
SPF (Sender Policy Framework) is a DNS TXT record that lists the servers allowed to send email for your domain. A domain needs exactly one record starting v=spf1 and ending in -all or ~all. SiteShield fails a missing record, more than one record, or +all; warns on ?all or a record with no -all/~all; and passes everything else (8 of 100 points).
What is SPF record?
A receiving mail server takes the domain in the message's envelope sender, looks up its SPF record and checks whether the sending server's IP is listed. Mechanisms like include:, ip4: and mx list the senders; the closing all says what to do with everyone else: -all fail, ~all soft-fail, ?all neutral, +all allow.
v=spf1 +all
v=spf1 include:_spf.google.com ?all
(two separate v=spf1 records on the same domain)v=spf1 include:_spf.google.com ~all
v=spf1 include:spf.protection.outlook.com -all
v=spf1 -all (domain that never sends email)Why it matters
SPF lists the servers allowed to send email for your domain. Without it, anyone can send email that looks like it came from you.
Without SPF, anyone can send email that claims to come from your domain, and receivers have no way to tell. That's the starting point of business email compromise (BEC): a fake invoice or "urgent transfer" email that appears to come from your finance team or CEO. SPF on its own isn't enough (see DMARC), but DMARC needs SPF or DKIM to work.
SiteShield maps this check to:
See how these standards fit together in the UAE website security checklist.
How SiteShield grades it
This check, "SPF record", can cost up to 8 points: a fail loses all 8, a warning loses 4. Every scan starts at 100.
| Result | When | Points lost |
|---|---|---|
| Fail | No SPF record (including on domains with no mail servers, because they can still be spoofed). | 8 |
| Fail | More than one v=spf1 record. Only one is allowed, so receivers treat SPF as broken. | 8 |
| Fail | The record ends in +all (or a bare all), which allows every server on the internet. | 8 |
| Warning | The record ends in ?all (neutral), which gives almost no protection. | 4 |
| Warning | The record has no closing -all or ~all and no redirect= modifier. | 4 |
| Pass | Exactly one record ending in -all or ~all (or using redirect=). | 0 |
| Not checked | The DNS lookup failed, so the check couldn't run. | 0 |
How to check it yourself
SPF lives in a TXT record on the domain itself:
dig +short TXT example.com | grep -i spf
# "v=spf1 include:_spf.google.com ~all"
Or run a free SiteShield scan, which checks this and 16 other settings in one go.
How to fix it
The quick version: Publish one TXT record on your domain, e.g. v=spf1 include:_spf.google.com ~all (use your email provider's value). If you never send email from this domain: v=spf1 -all
Find your senders first
- List everything that sends email as your domain: your mailbox provider, website contact forms, newsletter and CRM tools, invoicing software. Each provider documents its include value, for example
include:_spf.google.com(Google Workspace) orinclude:spf.protection.outlook.com(Microsoft 365). - Combine them into one record. Keep it under 10 DNS lookups (each include: counts), the limit in RFC 7208.
Cloudflare DNS
DNS → Records → Add record: Type TXT, Name @, Content your record. If an SPF record already exists, edit it instead of adding a second one.
v=spf1 include:_spf.google.com include:sendgrid.net ~allOther DNS hosts
GoDaddy, Network Solutions, AWS Route 53 and others all have a TXT record form; the name is @ (or blank) and the value is the same. DNS changes can take up to the record's TTL to be visible.
Domains that never send email
Publish a record that allows nobody, and a DMARC reject policy:
v=spf1 -allWordPress
WordPress sends mail through the web server by default, which is usually not in your SPF record, so contact-form emails land in spam or fail DMARC. Install an SMTP plugin and send through your real mail provider, whose include: is already in the record.
Nginx / Apache
Not applicable: SPF is a DNS record, not a web server setting.
FAQ
Should SPF end in -all or ~all?
Both pass in SiteShield. ~all (soft fail) is the safer starting point while you confirm every sender is listed; DMARC then decides what happens to failures. Move to -all once you're confident.
Can I have two SPF records?
No. RFC 7208 allows one v=spf1 record per domain; with two, receivers return a permanent error and SPF stops protecting you. Merge them into one.
Does SiteShield check DKIM?
No. DKIM keys live under selector names (like google._domainkey) that can't be discovered passively, so SiteShield checks SPF and DMARC only. Set up DKIM in your mail provider's admin console as well.
What is the 10-lookup limit?
SPF evaluation may trigger at most 10 DNS lookups (include, a, mx, ptr, exists, redirect). Exceeding it makes SPF fail. Remove unused services or ask providers for flattened IP ranges.
Test your SPF record now
Run all 17 checks on your website and email domain in about 30 seconds. Free, no signup, passive checks only.
Rather not do it yourself? Fix it for me starts at AED 750 (about USD 205 by PayPal), quote agreed first. Monitoring re-scans weekly for AED 99/month or AED 990/year.