CAA, SPF and TXT lint — the mistakes that block certificates and email
In one line: CAA flags, tags and values, the SPF ten-lookup limit, the single-SPF rule, and splitting TXT strings at 255 bytes.
CAA and SPF look like one-line TXT records, but a small format error can block certificate issuance or send mail to the spam folder. These are the problems a zone linter catches.
1. CAA structure
example.com. 3600 IN CAA 0 issue "letsencrypt.org" example.com. 3600 IN CAA 0 issuewild ";" example.com. 3600 IN CAA 0 iodef "mailto:security@example.com"
| Part | Meaning |
|---|---|
| Flags | 0–255. 0 is standard; 128 marks a critical tag that an issuing CA must understand. |
| Tag | One of issue, issuewild, iodef. |
| Value | Permitted CA domain, ; for none, or a mailto/URL for iodef. |
Frequent errors:
- The value is not quoted and is cut at the first space.
- An undefined tag such as
issuer—L_CAA_TAG. - An iodef value without
mailto:—L_CAA_IODEF. - Flags outside 0–255 —
L_CAA_FLAGS.
CAA is inherited: a subdomain without its own CAA falls under the parent's policy.
2. SPF: one record, ten lookups
example.com. 3600 IN TXT "v=spf1 mx include:_spf.example.net -all"
- Only one SPF record: two
v=spf1TXT records at one name cause a permanent error —L_SPF_MULTI. - Ten-lookup limit:
include,a,mx,ptr,existsandredirect=count as DNS lookups; more than 10 fails —L_SPF_LOOKUP. Includes inside includes add up. - No SPF record type: the
IN SPFtype is obsolete; use TXT —L_SPF_TYPE. - All terminator: end with
-all,~allor?all—L_SPF_NO_ALL.
3. The 255-byte TXT rule
long._domainkey IN TXT ( "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A"
"MIIBCgKCAQEA..." )
A single string over 255 bytes is truncated or rejected on the wire — L_TXT_LONG, L_TXT_SPLIT. DKIM public keys hit this limit constantly.
4. DKIM and DMARC follow the same rules
DKIM p= values are long and must be split. DMARC allows exactly one TXT at _dmarc, and is usually staged from p=none to quarantine and reject.
5. Check order
- Read the TXT, CAA and SPF findings from the zone linter.
- Query the public DNS with
dig TXT example.comto confirm nothing was cut. - Follow SPF includes and count the lookups with a validator.
- Test CAA against a staging CA to confirm issuance really is blocked or allowed.
Computing a single DS record makes the relationship between the key tag and the digest concrete.
Open DNSSECLabFrequently asked questions
Why does a second SPF record break mail?
RFC 7208 says a name with more than one v=spf1 TXT record is a permanent error, because the receiver cannot know which policy to use.
What does an issuewild value of ; mean?
No CA may issue wildcard certificates for the domain. A bare ; in issue blocks ordinary certificates as well.
Does splitting TXT at 255 bytes change the value?
No. DNS concatenates the strings into one value; applications do not see the string boundaries.
References
- RFC 7208 — Sender Policy Framework (SPF) for Authorizing Use of Domains in Email
- RFC 8659 — DNS Certification Authority Authorization (CAA) Resource Record
- RFC 1035 — Domain Names: Implementation and Specification
Read next
- Turning a DNSKEY into a DS record — key tag and digest, step by stepHow to derive the key tag from a DNSKEY and build a SHA-256 DS record, with a worked example and the order in which parent and child zones are updated.
- DNSKEY flags and algorithms — telling KSK from ZSK and choosing oneWhat flags 256 and 257 mean together with the SEP and REVOKE bits, why protocol must be 3, and how to choose between algorithms 8, 13, 14, 15 and 16.
- BIND zone syntax — $ORIGIN, $TTL, @ and a correct SOAZone file structure and omission rules, what each SOA timer means, and the CNAME, MX and TXT details that are most often wrong.