What is the typical DNS record length limit and what should I do if my provider has a smaller limit?
Summary
What email marketers say11Marketer opinions
Email marketer from Email Geeks shares that when they moved DKIM to 2048, they ran into this issue with a few providers.
Email marketer from Reddit advises that if a DNS provider restricts record lengths significantly, one should consider moving to a more capable DNS host. They also suggest verifying that the stated limits are indeed the issue, and not a misconfiguration.
Email marketer from DigitalOcean shares a trick for dealing with TXT records that are too long by splitting them into multiple records. The application using the DNS record needs to be designed to concatenate these fragments.
Email marketer from cPanel forum states that the DNS length limit is 255, however, some providers, such as cPanel have had bugs when using underscores in the CNAME records.
Email marketer from Namecheap answers that if you're facing DNS record length limitations with your current provider, consider utilizing their free DNS service. Namecheap's service offers robust DNS management capabilities, including support for longer records, which can help overcome the limitations you're experiencing.
Email marketer from Email Geeks suggests that if a host limits the DNS record length to 87 characters, it might be time to find another place for DNS hosting.
Email marketer from StackOverflow suggests that if a DNS provider imposes a small size limit, the best course of action is to switch to a provider with more reasonable limits. They point out that modern DNS setups often rely on records exceeding older, stricter limits.
Email marketer from Hetzner answers that the issue with DNS record limitations is most likely due to using the wrong DNS server or zone settings. Hetzner recommends contacting their support for guidance or moving DNS to a more capable provider
Email marketer from HostGator says that their DNS servers support records up to 4000 characters in length, so if you are hitting that limit, you need to move providers.
Email marketer from SuperUser says that If a DNS provider has a lower limit, consider moving your DNS to a specialized provider like Cloudflare or AWS Route 53 which typically support larger record sizes and offer more advanced DNS management features.
Email marketer from GoDaddy answers that it is to split the record into multiple smaller TXT records if the data exceeds the DNS provider's limit. Concatenation of the data is then required in the application that is reading the data.
What the experts say3Expert opinions
Expert from Spam Resource, Steve Jones, discusses SPF record character limits, which implicitly relates to DNS record limits, and suggests that if you are up against the character limits, the best option is to use include: statements referencing other records. This reduces the overall impact of large records.
Expert from Word to the Wise, Laura Atkins, shares information about avoiding common SPF record mistakes, which can lead to DNS lookup issues if records are misconfigured or become too complex. Laura doesn't specify record limits but provides information about structuring SPF records to ensure valid DNS queries and avoid issues, which implicitly affects how DNS limitations manifest.
Expert from Email Geeks shares that the issue of long entries has been resolved by modern DNS hosting providers for years and 87 characters isn't even close to the default/standard 253 characters allowed.
What the documentation says4Technical articles
Documentation from DNSimple outlines that many systems adhere to a 512-byte limit for UDP responses, but larger TCP responses are possible. They suggest monitoring DNS response sizes and considering DNS record compression techniques for large DNS zones.
Documentation from RFC Editor specifies that domain names are limited to 255 characters in total, and each label (part separated by dots) can be at most 63 characters long. It also indicates the maximum DNS message size over UDP is 512 bytes, impacting practical limits when considering other record types.
Documentation from Google Domains explains the common DNS record types and their limitations. For TXT records, often used for verification, they emphasize that while the maximum size can be up to 255 characters per string, it's best practice to keep them shorter for broader compatibility.
Documentation from Cloudflare explains that while the theoretical limit for DNS record size is much larger, practical considerations, like UDP packet size limits, often impose a smaller effective limit. They recommend using DNSSEC wisely and avoiding excessively large records to prevent fragmentation issues.