DNS Record Limits: TXT Length, CNAME Rules and Other Constraints

Published: 2026-03-15  |  Author: Editorial Team  |  Domain Rules

Editing DNS records looks simple until a record is rejected or silently ignored. Many problems come from limits and rules built into the DNS standards or into protocols that use DNS, plus limits set by individual DNS providers. Knowing them saves time when configuring email, verification records and aliases.

TXT records and the 255-byte string limit

A TXT record holds one or more character strings, and each string can be at most 255 bytes. Longer values, such as DKIM public keys, must be split into several strings within the same record. Applications reading the record usually concatenate the strings. Many DNS control panels split long values automatically; others require you to enter them in quoted segments. If a DKIM check fails after you paste a long key, incorrect splitting is a common cause.

CNAME rules

A CNAME record makes one name an alias of another. Two rules cause frequent confusion:

Also avoid pointing MX or NS records at a name that is a CNAME; the standards require these to point directly at host names with address records.

SPF: the ten-lookup limit

The Sender Policy Framework uses TXT records to list servers allowed to send email for a domain. To evaluate SPF, a receiving server may need extra DNS lookups for mechanisms such as include, a, mx, exists and redirect. The SPF specification limits these to ten per check; exceeding it causes a permanent error, which can lead to mail being rejected or marked as failing. Each include can contain further lookups, so the total grows quickly when several email services are added. A domain should also publish only one SPF record.

TTL basics

The time to live (TTL) tells resolvers how long they may cache a record, in seconds. Long TTLs reduce query load and improve resilience; short TTLs let changes take effect faster. Before a planned change, such as moving to a new host, lower the TTL well in advance, at least as long as the old TTL, so caches expire quickly when you make the switch. Raise it again afterwards. Some resolvers apply their own minimum or maximum caching times.

Response size

Traditional DNS over UDP limited messages to 512 bytes. The EDNS extension allows larger responses, but very large answers can still be truncated, forcing a retry over TCP, or dropped by some networks. Many TXT records at one name, large DNSSEC signatures or long lists of addresses increase response size. Keeping records at commonly queried names tidy helps reliability.

Other standard limits

Provider-specific limits

DNS hosting providers often set their own limits on the number of records per zone, the minimum TTL, supported record types and the length of values entered in the interface. If a valid record is rejected, check the provider's documentation before assuming the record is wrong.

Key takeaways

Related Articles:

← Back to Home