A TXT record (short for text record) is a type of resource record in the Domain Name System (DNS) used to provide the ability to associate arbitrary text with a host or other name, such as human readable information about a server, network, data center, or other accounting information.
It is also often used in a more structured fashion to record small amounts of machine-readable data into the DNS.
As unstructured text, organisations can use the TXT string in any way they define, for example:
example.com IN TXT "This domain name is reserved for use in documentation"
RFC 1464 defines a structured format that can be used to define attributes and their values in a single record, as in these examples:
host.widgets.com IN TXT "printer=lpr5" sam.widgets.com IN TXT "favorite drink=orange juice"
In practice, services using TXT records often do not follow this RFC, but instead have their own specific format.