A single string in a DNS TXT record holds at most 255 characters, so a long SPF record has to be published as several strings in one record. Receivers join the strings back together without adding spaces. Split it in the wrong place, or publish the second half as a separate record, and SPF breaks. Check your domain below to see every string, how each split joins, and any stray fragments.
Last verified 1 October 2026.
You see it when you save the record: a DNS panel that says the TXT value is too long, or Amazon Route 53’s:
CharacterStringTooLong (Value is too long) encountered with {Value}
The limit comes from DNS itself, not from SPF. RFC 1035 §3.3 defines the strings a TXT record is made of: “<character-string> is a single length octet followed by that number of characters.” One length octet counts to 255, so one string holds 255 characters at most. A TXT record can hold several strings, and SPF is written for that. RFC 7208 §3.3:
So the fix for “too long” is to split the value into strings of 255 characters or fewer inside the same record. Route 53’s documentation puts it this way: “If you need to enter a value longer than 255 characters, break the value into strings of 255 characters or fewer, and enclose each string in double quotation marks ( " ).” Google Workspace’s SPF help says “SPF records can have up to 255 characters. The TXT record file size should be no larger than 512 bytes.” Read the 255 as per string: RFC 7208 §3.3 lets one record hold several strings (see the FAQ below). Splitting keeps the record within the standard; a record that also fits in fewer characters is easier to manage, so shorten it where you can (see below).
“SPF too long” sometimes means something else: more than 10 DNS lookups. That limit counts include, a, mx and similar terms, not characters, and splitting doesn’t change it. See fixing too many DNS lookups.
Sources: RFC 1035 §3.3 and §3.3.14; RFC 7208 §3.1, §3.3, §3.4, §4.5, §4.6, §4.7 and §5.2; Amazon Route 53 Developer Guide, Supported DNS record types (TXT); AWS re:Post Knowledge Center, Resolve the “CharacterStringTooLong” error from a DNS TXT record; Google Workspace Admin Help, About SPF records (checked 1 October 2026).
Enter the domain in your envelope sender (Return-Path), or your From: domain if you don’t know it. It checks exactly the name you enter: www. isn’t removed, and include targets such as _spf.example.com work too. The check runs in your browser against public DNS and reads the TXT records the way a receiver gets them: each string separately, with its exact length.
This reads what your DNS publishes right now through Cloudflare’s public resolver, or Google’s when Cloudflare’s fails, using the binary DNS answer so string boundaries and lengths are exact. If every lookup fails (server error or timeout), it says it couldn’t check and reports nothing about the record. It checks the record at the name you enter; included records are checked for lookups and void terms by the DMARC checker and the void lookup checker.
| Two terms glued together | The split falls between two terms and neither string has a space at that end. "v=spf1 include:_spf.google.com" "include:spf.protection.outlook.com ~all" is read as include:_spf.google.cominclude:spf.protection.outlook.com: one include of a name that doesn’t exist, and an include whose target has no SPF record returns permerror (§5.2). Gluing ip4:192.0.2.1 to the next term, or a to mx, is a syntax error, and RFC 7208 §4.6 makes any syntax error a permerror for the whole record. |
|---|---|
| The rest in a second TXT record | The overflow is saved as its own TXT record. Receivers keep only records that begin with v=spf1 (§4.5), so a second record without it is ignored and the senders in it aren’t authorized. If it also starts with v=spf1, the domain has two SPF records, a permerror. The same happens when a provider’s setup screen shows only an include: and it gets added as a new record instead of into the SPF record. |
| Quote marks stored as text | Some DNS panels add the quotes themselves; typing "v=spf1 … ~all" there stores the quote marks inside the text. A record that starts with " doesn’t begin with v=spf1 and is discarded; a stray " at the end turns ~all into a syntax error. |
A space before v=spf1 | A leading space, often from a split that put the space at the start of the first string. The record no longer begins with v=spf1, and §4.5 discards it. Some checkers trim the space and show the record as fine. |
| Curly quotes, non-breaking spaces | Copied from a document or a chat message. RFC 7208 §3.1: “The character content of the record is encoded as [US-ASCII].” A non-breaking space looks like a space but isn’t one, so the terms either side of it don’t separate. |
| Cut off at 255 | A panel that silently truncates the value at 255 characters. The end of the record, usually ~all or -all, is gone. With no all and no redirect=, unmatched mail gets neutral (§4.7). |
A split in the middle of a term is fine: "… ip4:198.51.10" "0.25 ~all" joins back to ip4:198.51.100.25. What matters is that the joined text is exactly the record you meant.
"first piece " "second piece". Some panels take the long value as is and split it for you; your DNS host’s TXT help says which. Never add a second TXT record for the rest.v=spf1. Move its terms into the SPF record first if they belong there.all.For example, this record is 275 characters:
v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.0/24 ip4:203.0.113.0/24 include:_spf.google.com include:spf.protection.outlook.com include:sendgrid.net include:mail.zendesk.com include:servers.mcsv.net include:_spf.salesforce.com include:amazonses.com include:spf.mandrillapp.com ~all
Published as two strings in one TXT record, with the space at the end of the first:
"v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.0/24 ip4:203.0.113.0/24 include:_spf.google.com include:spf.protection.outlook.com include:sendgrid.net include:mail.zendesk.com include:servers.mcsv.net " "include:_spf.salesforce.com include:amazonses.com include:spf.mandrillapp.com ~all"
That record has eight includes, and each included record adds lookups of its own, so check the 10 DNS lookup limit too: a record long enough to need splitting is often near it. From a terminal, dig +short TXT example.com prints each string in its own quotes, so you can see where the splits are.
RFC 7208 §3.4 says the record “SHOULD remain small enough that the results of a query for it will fit within 512 octets”, and gives a guideline: “If the size of the DNS message, the combined length of the DNS name and the text of all the records of a given type is under 450 octets, then DNS answers ought to fit in UDP packets.” That counts every TXT record at the name, including verification tokens. To shorten: remove includes for services that no longer send for you, merge adjacent ip4: addresses into one CIDR range where you own the whole range, delete verification TXT records whose services you’ve finished setting up, and move a high-volume service to its own subdomain with its own SPF record.
No. 255 is the limit for one string inside a TXT record (RFC 1035). One TXT record can hold several strings, and RFC 7208 says receivers join them into one SPF record. A 400-character SPF record is valid when it is published as two strings in one record.
Only if the split falls between two terms. Receivers join the strings without adding spaces, so the space has to be inside one of the strings: at the end of the first or the start of the next. A split in the middle of a term needs no space; the term is joined back whole. The checker on this page shows how each split joins.
No. Receivers read only TXT records that begin with v=spf1. A second record that also begins with v=spf1 makes two SPF records, which is a permerror. A second record without it is ignored, so the senders in it aren’t authorized. Put every term in one record, split into strings.
RFC 7208 sets no fixed maximum. It says the record SHOULD stay small enough that the answer fits in 512 octets, and gives 450 octets for the name plus all TXT records at it as a guideline. DNS hosts set their own caps; Amazon Route 53, for example, allows 4,000 characters per TXT value. The 10 DNS lookup limit and the void lookup limit apply whatever the length.
Yes. It asks a public resolver for the binary DNS answer, which keeps every string separate with its exact length, the same data a receiver gets. If both resolvers fail, it says it couldn’t check instead of guessing.
If you manage domains for clients or brands, Email Security Signals checks a whole list and returns one row per domain with SPF, DKIM, DMARC and an A–F grade, including SPF syntax errors, the lookup count and void lookups. $0.02 per graded domain ($20 per 1,000); invalid inputs, domains that don’t exist, DNS lookup failures and duplicates are free.
Check a list on the Apify Store →Related: fixing “multiple SPF records”, fixing SPF “too many DNS lookups”, fixing “too many void lookups” and the free DMARC, SPF and DKIM checker.