What is the typical DNS record length limit and what should I do if my provider has a smaller limit?

Summary

Modern DNS systems typically support record lengths of 253 characters or more, but older systems and specific configurations may impose lower limits. The RFC standard defines limits for domain names and labels. When facing restrictions, switching to a provider with better support (like Cloudflare, AWS Route 53, or Namecheap's free DNS) is often recommended. If switching isn't immediately feasible, consider splitting long TXT records, structuring SPF records with 'include:' statements to manage complexity, and verifying that the limitation isn't due to misconfiguration. Monitor DNS response sizes and ensure proper SPF configuration to avoid DNS lookup issues. Some providers may also have bugs or configuration issues that lead to these limit issues.

Key findings

  • Modern Support: Modern DNS providers generally support record lengths exceeding older limits (e.g., 253 characters).
  • Switch Providers: Switching to a provider like Cloudflare or Namecheap is a common recommendation.
  • TXT Splitting: Splitting long TXT records into multiple smaller records is a workaround, requiring application support.
  • SPF Structuring: Structuring SPF records with 'include:' statements helps manage record size and DNS lookups.
  • UDP Limits: DNS message sizes are influenced by UDP (typically 512 bytes) so that practical record limits arise.

Key considerations

  • Provider Bugs: Some providers have known bugs (e.g., cPanel) affecting DNS record handling (underscores in CNAME).
  • Misconfiguration: Verify that record length limits are genuine and not due to misconfiguration.
  • SPF Configuration: Proper SPF configuration is crucial to prevent DNS lookup issues.
  • Application Support: Ensure applications can handle concatenation if splitting TXT records.
  • Record Compression: Consider DNS record compression techniques for large DNS zones.

What email marketers say
11Marketer opinions

The typical DNS record length limit varies, but modern systems generally support 253 characters or more. However, practical considerations, like UDP packet size, can impose smaller effective limits. When a provider has a lower limit, the primary recommendation is to switch to a provider with better support or utilize alternative DNS services. If switching isn't immediately feasible, consider splitting records into smaller parts (particularly for TXT records) and adjusting your application to concatenate them. Also, verify the stated limits are accurate and not due to misconfiguration.

Key opinions

  • Provider Limits: DNS providers often have different record length limits; some may be restrictive.
  • Modern Support: Modern DNS setups typically support records exceeding older limits (e.g., 253 characters).
  • TXT Splitting: TXT records can sometimes be split into multiple records if supported by the application.
  • Alternative DNS: Namecheap, Cloudflare and AWS are good alternatives to consider.

Key considerations

  • Misconfiguration: Ensure the stated limit is accurate and not due to a misconfiguration issue.
  • Switching Providers: Consider switching DNS providers if the current provider's limitations are too restrictive.
  • Application Compatibility: If splitting records, ensure the application using the DNS records can handle concatenation.
  • Zone Settings: Check if there are DNS server zone settings causing the error.
Marketer view

Email marketer from Email Geeks shares that when they moved DKIM to 2048, they ran into this issue with a few providers.

June 2024 - Email Geeks
Marketer view

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.

October 2022 - Reddit
Marketer view

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.

August 2022 - DigitalOcean
Marketer view

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.

April 2024 - cPanel Forums
Marketer view

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.

January 2023 - Namecheap
Marketer view

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.

November 2022 - Email Geeks
Marketer view

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.

March 2024 - StackOverflow
Marketer view

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

April 2021 - Hetzner
Marketer view

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.

February 2025 - HostGator
Marketer view

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.

July 2023 - SuperUser
Marketer view

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.

May 2023 - GoDaddy

What the experts say
3Expert opinions

Modern DNS hosting providers generally support record lengths well beyond 87 characters, with default standards around 253 characters. When facing limitations, structuring SPF records effectively using include statements helps manage complexity and avoid DNS lookup issues arising from oversized or misconfigured records.

Key opinions

  • Modern Support: Modern DNS providers support lengths well beyond older limits.
  • SPF Includes: Using 'include:' statements in SPF records can help manage record size and complexity.
  • Record Structuring: Properly structuring SPF records is crucial to avoid DNS lookup issues.

Key considerations

  • SPF Configuration: Avoid SPF record mistakes to ensure valid DNS queries and prevent issues.
  • DNS Lookups: Ensure proper SPF configuration for valid DNS queries.
  • Modern Providers: Ensure you are using a modern DNS provider, if not you may need to switch providers.
Expert view

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.

March 2024 - Spam Resource
Expert view

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.

March 2023 - Word to the Wise
Expert view

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.

March 2024 - Email Geeks

What the documentation says
4Technical articles

DNS record length limits are governed by several factors. While domain names have a 255-character limit and labels within them a 63-character limit (RFC 1035), practical limits arise due to UDP packet size (typically 512 bytes). Although larger TCP responses are possible, it's best to use DNSSEC wisely, avoid excessively large records to prevent fragmentation, monitor response sizes, and consider DNS record compression. For TXT records, it's advisable to keep them shorter than the 255-character limit for better compatibility.

Key findings

  • RFC Limits: RFC 1035 sets a 255-character limit for domain names and 63 characters for labels.
  • UDP Size: The maximum DNS message size over UDP is 512 bytes, impacting practical record limits.
  • TXT Records: While TXT records can be up to 255 characters, shorter lengths are recommended for compatibility.
  • TCP Support: TCP responses can be larger than UDP, allowing for larger record sizes.

Key considerations

  • DNSSEC Usage: Use DNSSEC wisely to avoid excessively large records and fragmentation issues.
  • Response Monitoring: Monitor DNS response sizes to ensure they are within acceptable limits.
  • Record Compression: Consider using DNS record compression techniques for large DNS zones.
  • Fragmentation: Excessively large records can cause fragmentation issues.
Technical article

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.

August 2024 - DNSimple
Technical article

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.

May 2024 - RFC Editor
Technical article

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.

August 2021 - Google Domains
Technical article

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.

July 2024 - Cloudflare