# Ensure SPF record exists with strict policy (-all)

- Source: https://support.icompaas.com/support/solutions/articles/a_1790787218290688-ensure-spf-record-exists-with-strict-policy-all
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Cloudflare](https://support.icompaas.com/support/solutions/c_1790786902273285) › [Checks](https://support.icompaas.com/support/solutions/folders/f_1790786912003423)
- Last updated: 2026-09-30
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Description**

Ensure the domain has a single SPF TXT record, starting with v=spf1, that lists your approved mail servers and ends with -all (hard fail). This tells receiving servers to reject mail from any server that is not listed.

**Rationale**

Without SPF, anyone can send email that appears to come from your domain. A soft fail (~all) or neutral (?all) policy only marks such mail as suspicious. A strict -all policy clearly tells receivers that unlisted senders are not allowed, which reduces spoofing and phishing using your domain.

**Impact**

-   Receivers can reject mail from unauthorized servers
    
-   Reduces email spoofing using your domain
    
-   Any legitimate sender not listed will fail SPF
    

**Default Value**

By default, no SPF record exists.

**Pre-Requisites**

-   Cloudflare account with Administrator or DNS permissions for the zone
    
-   A list of all services that send email for your domain
    

**Test Plan**

1.  Sign in to the Cloudflare dashboard at [https://dash.cloudflare.com](https://dash.cloudflare.com/).
    
2.  Select your account and the domain (zone) you want to review.
    
3.  Go to DNS > Records.
    
4.  Filter by Type TXT and find the record on the root domain that starts with v=spf1.
    
5.  Verify that there is only one SPF record and that it ends with -all.
    
6.  If there is no SPF record, more than one, or it does not end with -all, follow the implementation steps.
    

**Implementation Steps**

1.  Sign in to the Cloudflare dashboard at [https://dash.cloudflare.com](https://dash.cloudflare.com/).
    
2.  Select your account and the domain (zone) you want to review.
    
3.  Go to DNS > Records.
    
4.  Select Add record (or Edit the existing SPF record) with Type TXT and Name @.
    
5.  Enter the Content, for example: v=spf1 include:\_spf.google.com -all (use the include values for your own mail providers).
    
6.  Select Save.
    

**Backout Plan**

1.  Sign in to the Cloudflare dashboard at [https://dash.cloudflare.com](https://dash.cloudflare.com/).
    
2.  Select your account and the domain (zone) you want to review.
    
3.  Go to DNS > Records.
    
4.  Select Edit on the SPF record, restore its previous value (for example, ending with ~all), and select Save.
    

**Reference**

-   [https://developers.cloudflare.com/dns/manage-dns-records/how-to/email-records/](https://developers.cloudflare.com/dns/manage-dns-records/how-to/email-records/)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
