Suped

Does SPF record syntax use spaces or semicolons?

Matthew Whittaker profile picture
Matthew Whittaker
Co-founder & CTO, Suped
Published 12 Jan 2025
Updated 21 Oct 2025
6 min read
An email envelope with data flow lines, illustrating email deliverability
When setting up an SPF (Sender Policy Framework) record, one of the most common questions I hear revolves around how to properly separate the various mechanisms and qualifiers. It's a critical detail because even a small syntax error can render your entire SPF record ineffective, leading to email deliverability problems and potential spoofing attacks. Understanding the correct delimiters, whether they are spaces or semicolons, is fundamental to ensuring your emails reach their intended inboxes.
Email authentication protocols like SPF are designed to protect your domain's reputation and prevent unauthorized use. However, these benefits only materialize if your DNS records are correctly configured. A single misplaced character can mean the difference between your legitimate emails landing in the inbox or being flagged as spam. Let's clarify this common confusion about SPF record syntax.

The anatomy of an SPF record

The anatomy of an SPF record

An SPF record is published as a TXT record in your domain's DNS. It essentially lists all authorized mail servers that can send emails on behalf of your domain. Each SPF record must start with a version indicator, v=spf1, followed by various mechanisms and qualifiers that specify which hosts are permitted to send email for the domain. For more details on the record type, you can refer to our article, What DNS record type is used for SPF?.
These mechanisms can include a, mx, ip4, include, and the crucial all mechanism at the end, which defines the handling policy for unauthorized senders. Each part of this record needs to be correctly formatted and separated for the receiving mail server to interpret it accurately. For information on how to format SPF TXT records, consult our guide.
Example of a correct SPF recorddns
v=spf1 ip4:192.0.2.1 include:_spf.example.com ~all

Spaces are the correct delimiters

Spaces are the correct delimiters

To answer the core question: SPF record syntax uses spaces to separate each mechanism and qualifier. This is a fundamental rule in the Sender Policy Framework specification. When a receiving mail server processes your SPF record, it expects these spaces as explicit separators, allowing it to parse each component correctly. Using any other character, like a semicolon, will result in a syntax error and SPF validation failure.

Correct SPF syntax example

Each mechanism must be separated by a single space.
Correct SPF record with spacesdns
v=spf1 a mx include:mail.example.net -all
This standard is consistently applied across all email service providers and DNS resolvers. If you have multiple include mechanisms, ip4 entries, or mx records, they all require a single space between them. For a good resource on common SPF errors, check out this Mailforge article about SPF record errors.

Correct syntax

  1. Delimiter: Uses single spaces to separate mechanisms.
  2. Validity: Properly parsed by receiving mail servers, ensuring SPF passes.
  3. Example: v=spf1 mx a:mail.domain.com -all

Incorrect syntax

  1. Delimiter: Uses semicolons, commas, or multiple spaces.
  2. Validity: Causes SPF validation to fail, impacting deliverability.
  3. Example: v=spf1;mx;a:mail.domain.com;-all

Why semicolons are incorrect for SPF

Why semicolons are incorrect for SPF

A broken chain link, representing a failure in email authentication
Semicolons are not part of the official SPF syntax. While they might be used in other contexts for separating values, SPF explicitly uses spaces. If you use semicolons, the entire record will likely be misinterpreted or ignored by mail servers. Instead of processing each mechanism individually, the server might read the record as a single, malformed string, leading to an SPF failure.
This can cause your legitimate emails to be marked as spam or rejected outright. Many email providers perform strict checks on SPF records, and any deviation from the correct syntax, such as using semicolons, will negatively impact your sender reputation. For further clarification on common errors, the SPF Lookup site has a useful article.
Example of an incorrect SPF record using semicolonsdns
v=spf1;ip4:192.0.2.1;include:_spf.example.com;~all

Impact of incorrect syntax on email deliverability

Impact of incorrect syntax on email deliverability

When your SPF record has syntax errors, such as using semicolons instead of spaces, it essentially becomes invalid. Receiving mail servers cannot properly authenticate your sending domains, which means they can't verify that the email originated from an authorized source. This lack of proper authentication significantly increases the likelihood of your emails being sent to the spam folder or rejected entirely, harming your email deliverability and sender reputation.
  1. Email rejection: Mail servers may outright reject emails from domains with invalid SPF records.
  2. Spam folder placement: Even if not rejected, emails are often routed to the recipient's spam or junk folder.
  3. Spoofing vulnerability: An invalid SPF record leaves your domain vulnerable to impersonation by spammers and phishers.
  4. Reputation damage: Consistent SPF failures can degrade your domain's sending reputation over time. If your SPF records are failing, our article on why SPF is failing might help.

Best practices for accurate SPF records

Best practices for accurate SPF records

To avoid syntax errors and ensure your SPF records are always valid, careful creation and ongoing monitoring are essential. Always double-check your record for correct spacing between mechanisms. Remember that there can only be one SPF record per domain, and order matters for certain mechanisms. Additionally, implementing DMARC in conjunction with SPF and DKIM provides comprehensive email authentication, giving you greater visibility and control over your email ecosystem.

Monitor your SPF and DMARC with Suped

Suped offers comprehensive DMARC monitoring that includes SPF validation checks. Our platform provides AI-powered recommendations to help you fix any syntax errors, ensure proper SPF flattening, and strengthen your email authentication policy. With real-time alerts and a unified dashboard, managing your email security becomes straightforward and effective.

Key takeaways

Key takeaways

The correct SPF record syntax relies exclusively on spaces to separate mechanisms. Semicolons are not part of the standard and will cause your record to fail validation. Ensuring accurate SPF configuration is a vital step in maintaining good email deliverability and protecting your domain from spoofing. Consistent monitoring and adherence to best practices will safeguard your email communications.
Implementing strong email authentication, including correctly configured SPF, DKIM, and DMARC, is no longer optional in today's email landscape. It is a necessity for all businesses to ensure their messages are trusted and delivered successfully. Regularly review your DNS records and leverage tools that provide clear insights and actionable advice for maintaining optimal email security.

Frequently asked questions

DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard

What you'll get with Suped

Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing
    Does SPF record syntax use spaces or semicolons? - SPF - Email authentication - Knowledge base - Suped