Suped

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

11 marketer 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.

27 Mar 2022 - 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.

3 Jan 2022 - Reddit

What the experts say

3 expert 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.

12 Nov 2022 - 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.

28 Jan 2024 - Word to the Wise

What the documentation says

4 technical 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.

26 Mar 2023 - 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.

8 Sep 2021 - RFC Editor

Start improving your email deliverability today

Sign up
    What is the typical DNS record length limit and what should I do if my provider has a smaller limit? - Knowledge Base - Suped