that the data is treated as binary inside the DNS. Later specifications (e.g., – DNS used for service discovery) may require the use of specific encodings for specific purposes. The RDATA section may contain multiple consecutive occurrences of (TXT Length + TXT). Data Length is the length of them all combined. This is the hex returned as part of the DNS response from example.com when queried for TXT records. 0000 34 48 81 a0 00 01 00 02 00 00 00 01 07 65 78 61 0010 6d 70 6c 65 03 63 6f 6d 00 00 10 00 01 c0 0c 00 0020 10 00 01 00 00 54 5f 00 0c 0b 76 3d 73 70 66 31 0030 20 2d 61 6c 6c c0 0c 00 10 00 01 00 00 54 5f 00 0040 21 20 38 6a 35 6e 66 71 6c 64 32 30 7a 70 63 79 0050 72 38 78 6a 77 30 79 64 63 66 71 39 72 6b 38 68 0060 67 6d 00 00 29 02 00 00 00 00 00 00 00 As part of this response, there are two text records, the first of which is shown below (beginning at byte 54). 0000 c0 0c 00 10 00 01 00 00 54 5f 00 0c 0b 76 3d 73 0010 70 66 31 20 2d 61 6c 6c This decodes as follows: 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" 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. Example usage The character string from a TXT record used for SPF: "v=spf1 ip4:192.0.2.0/24 ip4:198.51.100.123 ip6:2620:0:860::/46 a -all" An example of use for DMARC: "v=DMARC1;p=none;sp=quarantine;pct=100;rua=mailto:dmarcreports@example.com;" Use for site verification: "google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8" Use for custom email service: _amazonses.example.com. IN TXT "pmBGN/7MjnfhTKUZ06Enqq1PeGUaOkw8lGhcfwefcHU=" See also List of DNS record types DMARC DKIM E-mail authentication References Internet architecture Network addressing Internet governance Internet protocols Internet Standards DNS record types Email authentication Spam filtering