CloudSpex

Domain health guide

How to fix a missing SPF record

A missing SPF record means receivers cannot use an SPF policy from your domain when evaluating mail. Find every legitimate sender before publishing a single record.

Use the SPF Record Checker

Türkçe

What a missing SPF record means

SPF is a public DNS policy that identifies which mail systems may send mail for a domain. Without a record, receivers have no SPF policy from that domain to evaluate.

A missing SPF record does not identify every deliverability problem by itself. It is one email-authentication signal and should be reviewed with DKIM and DMARC.

Start with the sender inventory

Before creating an SPF record, list every service that sends mail using the domain. Typical sources include a business mailbox provider, a website form, an invoicing system, a support platform, marketing software, and application notifications.

Ask the owner of each sender for its documented SPF requirement. Do not guess by copying a record from a different domain or by adding broad mechanisms that you cannot explain.

Publish one record, not several

SPF allows one policy record for a domain. Multiple SPF records make evaluation invalid, so combine approved senders into a single policy using the instructions provided by those senders.

Choose the terminal policy only after the sender list is complete. A restrictive policy can be appropriate, but it can also affect legitimate mail if the inventory is incomplete.

  1. Check whether an SPF record is missing or whether multiple records already exist.
  2. Document every legitimate sending system.
  3. Use each provider's official SPF instructions to build one policy.
  4. Publish one TXT record at the sending domain.
  5. Recheck the public policy and investigate delivery issues before tightening it further.

What this public check does not do

The CloudSpex SPF checker reports whether an SPF record is present, whether multiple records are published, and the terminal qualifier when it can be determined.

It does not resolve every include or redirect target or calculate the full SPF DNS-lookup limit. Use provider documentation and a controlled change process for the complete policy.

What a correct record looks like

An SPF record is a TXT record published at the domain itself, not at a subdomain such as _spf. It starts with v=spf1, lists the mechanisms that describe authorised senders, and ends with an all mechanism that says what to do with everything else.

The examples below cover the three situations most domains are in. Each is a complete record: a domain publishes exactly one of them, never two side by side.

Three complete SPF records
; One mailbox provider
example.com.  TXT  "v=spf1 include:_spf.google.com ~all"

; Mailbox provider, a transactional service and one fixed server
example.com.  TXT  "v=spf1 include:spf.protection.outlook.com include:sendgrid.net ip4:203.0.113.10 ~all"

; A domain that sends no mail
example.com.  TXT  "v=spf1 -all"

What each part means

The include mechanism points at another domain's SPF record and authorises whatever that record authorises. It is how you delegate to a provider without copying its address list. The ip4 and ip6 mechanisms authorise specific addresses or ranges. The a and mx mechanisms authorise the addresses behind the domain's own A and MX records, which is only useful when those same servers send mail.

The final mechanism matters as much as the list. With -all, mail from any other source fails SPF. With ~all, it soft-fails, which most receivers accept but may score down. With ?all, the record expresses no opinion, and with +all it authorises the entire internet, which is never correct.

Order matters only in that evaluation stops at the first match. Put the all mechanism last; anything written after it is ignored.

Building the sender inventory

The record is only as good as the list behind it. The usual mistake is to list the mailbox provider and forget everything else that sends as the domain.

  1. The mailbox provider used by staff: Google Workspace, Microsoft 365 or similar.
  2. Transactional mail from the website or application: password resets, order confirmations, contact forms.
  3. Marketing and newsletter platforms.
  4. Help desk and CRM systems that reply to customers from your address.
  5. Invoicing, accounting and payroll tools that email documents.
  6. Devices and servers that send alerts: printers, monitoring systems, backup jobs.

Which domain SPF actually checks

SPF does not look at the From address a person sees. It checks the envelope sender, also called the return path or bounce address, which is set by the sending system and is usually invisible. Many services use their own domain there by default.

This has two consequences. First, a service that uses its own return path does not need to be in your SPF record at all, because receivers check that service's record, not yours. Adding it wastes a DNS lookup. Second, in that situation SPF passes but is not aligned with your domain, so it does not help DMARC. If you want SPF to count for DMARC, configure a custom return path at the service, which is typically a subdomain of yours with its own SPF record.

Each provider's setup guide says which case applies. When the guide asks you to add an include to your root domain, the service sends with your domain in the return path. When it asks for a CNAME on a subdomain, it is using a custom return path.

Publishing the record

Create the record at your DNS provider, which is wherever the domain's nameservers point, not necessarily where the domain was registered.

  1. Check whether a TXT record starting with v=spf1 already exists. If it does, edit that record; do not add a second one.
  2. Set the host or name field to the domain itself. Most panels use @ or leave the field blank for this.
  3. Set the type to TXT and paste the value. Do not add quotation marks if the panel adds them for you.
  4. Save, then read the record back from public DNS. Panels sometimes append the domain name to the host field or split the value unexpectedly.
  5. Send a test message to a mailbox you control and read the Authentication-Results header to confirm spf=pass.
What a passing result looks like in a received message
Authentication-Results: mx.example.net;
  spf=pass smtp.mailfrom=example.com;
  dkim=pass header.d=example.com;
  dmarc=pass header.from=example.com

Limits that break a valid-looking record

Two limits cause records that look correct to fail. An SPF evaluation may trigger at most ten DNS lookups. Each include, a, mx, exists and redirect counts, and so do the lookups inside every included record. Past ten, receivers return a permanent error and treat SPF as failed for every message. A record with four or five includes is often already over.

The other limit is length. A single string inside a TXT record cannot exceed 255 characters. Longer records must be published as several quoted strings in one TXT record, which receivers join together. Many DNS panels do this automatically; some reject the record or truncate it.

The ptr mechanism should not be used at all. It is slow, unreliable and discouraged by the SPF specification, and some receivers ignore it.

Subdomains need their own record

SPF is not inherited. A record on example.com says nothing about mail.example.com or news.example.com. Each subdomain that appears in a return path needs its own record, and each subdomain that never sends mail is best given v=spf1 -all so that it cannot be used for spoofing. This is also an advantage: a subdomain used by one service has its own ten-lookup budget and can list only that service.

After the record is published

SPF records drift. A provider changes the records behind its include, someone adds a tool and a new include pushes the total past ten lookups, or a migration leaves an old provider authorised for years. Check the record again whenever a sending service is added or removed, and move from ~all to -all once DMARC aggregate reports show that no legitimate source is failing. The CloudSpex SPF Record Checker reads the published record, follows the include chain and reports the real lookup count; the SPF Record Generator builds a record from the senders you select.

Mistakes that make a record invalid

A few errors turn a well-meant record into one that fails for every message. They are easy to make in a DNS panel and easy to check for afterwards.

  1. Two TXT records that both start with v=spf1, usually one from the mailbox provider's setup wizard and one added later by hand.
  2. A typing error in the version tag, such as v=spf or v=spf1; with a stray semicolon, so that receivers do not recognise the record as SPF at all.
  3. Mechanisms separated by commas instead of spaces.
  4. An include that names a domain with no SPF record of its own, which produces a permanent error.
  5. Smart quotation marks pasted from a document, which become part of the value.

Frequently asked questions

Can I have two SPF records?

No. A domain should publish one SPF policy record. Multiple records make SPF evaluation invalid.

Should I use -all immediately?

Only after you have identified legitimate senders. A restrictive policy can affect valid mail when the inventory is incomplete.

Does CloudSpex publish SPF records?

No. The checker is read-only and does not change DNS.

Where exactly is the SPF record published?

As a TXT record at the domain itself, for example example.com. It is not published at _spf.example.com or any other subdomain, although providers use such names for the records you include.

How long does a new SPF record take to work?

It is visible as soon as your DNS provider serves it. If an older record existed, resolvers may keep the old answer until its TTL expires, usually minutes to a few hours.

Is the old SPF record type still needed?

No. A dedicated SPF DNS record type once existed and was withdrawn. SPF is published only as a TXT record.

Use public checks as a starting point

CloudSpex reads limited public-facing signals. It does not change DNS, website, certificate, or email settings. Confirm the responsible provider and test relevant changes before applying a remediation.

Editorial details

Author and reviewer: CloudSpex. Sources: public technical standards and provider documentation relevant to the topic. Last reviewed: November 10, 2026. We update guides when the product behavior or the underlying guidance changes.