SiteGround Domain Starter Guide: Adding SPF Records
Setting up an SPF record on SiteGround involves adding a specific TXT record to your domain's DNS zone to authorize your email senders and protect your domain from spoofing. If your emails are landing in spam folders or failing DMARC checks, a misconfigured or missing Sender Policy Framework record is usually the culprit. In this guide, you will learn the exact syntax, step-by-step configuration instructions for the SiteGround interface, and practical verification techniques to ensure your mail flow is secure.
Understanding SPF and How It Works
Sender Policy Framework (SPF) is an email authentication standard that specifies which mail servers are permitted to send email on behalf of your domain. When a receiving mail server gets an email from you@example.com, it looks up the DNS records for example.com to check if the sending server's IP address matches the authorized list defined in your SPF record.
If the IP matches, the check passes. If it does not match, the email is either marked as spam or rejected outright, depending on your domain's DMARC policy. SPF records are published as DNS TXT records. Because a domain can only have one active SPF record, you must combine all authorized sending services—such as your web hosting, Google Workspace, or Microsoft 365—into a single string.
Preparing Your SiteGround SPF Record String
Before you log into your hosting account, you need to know what your SPF string should contain. SiteGround handles your website hosting and often your default professional email, but you might also use third-party transactional mailers or office suites.
Here are common components found in an SPF string:
v=spf1: The version tag, which must always be at the very beginning.include:: Authorizes an external service provider (e.g.,include:_spf.google.com).ip4:orip6:: Directly authorizes a specific IP address or CIDR range (e.g.,ip4:192.0.2.1).~allor-all: The mechanism at the end of the string. SoftFail (~all) allows unlisted servers but flags them, while HardFail (-all) strictly rejects mail from unlisted servers.
A typical SiteGround hosting setup combined with Google Workspace uses a combined record like this:
v=spf1 include:mail.example.com include:_spf.google.com ~all
If you are using SiteGround exclusively for your website and email hosting, your default record might simply look like:
v=spf1 +mx ~all
Step-by-Step SiteGround SPF Record Setup
SiteGround manages DNS through its proprietary Site Tools dashboard. If your domain's nameservers point to SiteGround, you must add or edit your DNS records directly within your account. If you use external nameservers (like Cloudflare), you will need to apply these changes there instead.
Step 1: Log in and Navigate to DNS Zone Editor
- Log into your SiteGround account and go to the Websites tab.
- Locate the website you want to manage and click the Site Tools button next to it.
- In the left-hand sidebar menu, click on Domain and then select DNS Zone Editor.
Step 2: Check for Existing SPF Records
Before adding a new record, inspect your existing DNS entries to avoid creating duplicates, which invalidates SPF evaluation.
- In the DNS Zone Editor, click on the TXT tab to filter existing text records.
- Look for any record starting with
v=spf1. - If an old or default record exists, note it down. You will either edit this record directly or delete it before adding your updated string.
Step 3: Add or Edit the TXT Record
If you found an existing SPF record, click the three-dot menu next to it and select Edit. If no SPF record exists, follow these steps to create one:
- Click on the Create Record tab or select the TXT option at the top of the DNS Zone Editor.
- In the Name or Hostname field, enter your root domain (e.g.,
example.com) or leave it blank/use@depending on how the panel formats root entries. SiteGround typically autofills the root domain when left blank. - In the TXT Value field, paste your complete, validated SPF string (e.g.,
v=spf1 +mx include:_spf.google.com ~all). - Click Create or Confirm to save the record.
| Field Name | Typical Input Value | Purpose |
|---|---|---|
| Record Type | TXT | Specifies the DNS record category |
| Name / Host | @ or example.com |
Applies the record to your root domain |
| TTL | 3600 (or default) | Time-to-live caching duration in seconds |
| Value | v=spf1 +mx ~all |
The authorization policy string |
Verifying Your Configuration
Once you have updated your DNS records, global propagation can take anywhere from a few minutes up to 24 hours, though SiteGround updates usually propagate worldwide within 10 to 30 minutes. To confirm your setup is working correctly and free of syntax errors, use the SPF Checker tool to instantly analyze your domain, validate your syntax against RFC standards, and catch common formatting mistakes before they cause delivery failures.
You can also verify your setup locally via command line tools. Open your terminal or PowerShell and run a DNS query:
nslookup -type=txt example.com
Or use dig on Linux and macOS:
dig example.com TXT +short
Expected output sample:
"v=spf1 +mx include:_spf.google.com ~all"
Common Mistakes and How to Fix Them
Even experienced administrators occasionally run into issues during configuration. Watch out for these pitfalls:
- Multiple SPF Records: Having two or more TXT records starting with
v=spf1causes receiving servers to return a permanent error (permerror), dropping your emails. Combine all rules into a single TXT record. - Exceeding the DNS Lookup Limit: SPF specifications limit DNS lookups to a maximum of 10. If you include too many third-party services (like newsletters, CRM tools, and support desks), your lookup count will exceed 10. Fix this by flattening your records or removing unused service includes.
- Typographical Errors: A simple typo like
incude:instead ofinclude:will silently break the rule. Always double-check your syntax. - Trailing Spaces: Ensure there are no accidental trailing white spaces or line breaks inside the DNS value field on SiteGround.
Quick Checklist for Successful Setup
- Inventory all services that send email on behalf of your domain.
- Combine all rules into a single
v=spf1string. - Log into SiteTools and navigate to the DNS Zone Editor.
- Remove any conflicting or duplicate SPF records.
- Add or update the TXT record with your root domain and string.
- Verify propagation and syntax using an online checker.