All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Understanding DNS TXT Record Size Limits: UDP vs TCP Protocol Differences

By

dgl

8mo ago· 4 min readenInsight

Summary

This technical article explores the practical limits of DNS TXT records, explaining that while many sources incorrectly state a 255-byte limit, the actual constraint depends on the DNS protocol used. With UDP, the limit is around 1232 bytes due to DNS payload size, but using TCP allows for up to 64KB of data in TXT records. The author appears to be investigating how to leverage these extended limits for practical applications like serving images over DNS.

Key quotes

· 3 pulled
Within a TXT record there are multiple character-strings and those are limited in length (because a single byte is used for their length), however there can be many of them.
The actual limit is limited by the size of the DNS payload, which for UDP is these days around 1232 bytes.
However if we use TCP, which doesn't require anything special, other than the normal fallback to TCP that DNS does, then we can serve up to 64KB.
Snippet from the RSS feed
What's the limit of what can be in a TXT record?

You might also wanna read