What is a TXT Record Entry? Examples & Explanation
The Domain Name System is a system that assigns a unique, machine-readable decimal number (in Internet Protocol Version 4, IPv4) or hexadecimal number (in Internet Protocol Version 6, IPv6) to a web address (URL) on the internet. Official nameservers manage multiple records created by the domain owner. These include the A Record pointing to a server, the important MX Record for mail exchange, and the alias-serving CNAME Record, as well as an individual TXT Record. The abbreviation stands for TeXT, and unlike the other domain entries, its content serves no fixed purpose but follows a syntax similar to that of other information such as the A Record.
What is the purpose of the TXT Record?
The TXT Record is a freely definable text field that can be created along with other information for name resolution. However, unlike the essential A Record, there is no mandatory requirement to do so. Its creation is solely at the discretion of the administrator responsible for managing the domain and possessing the necessary authentication on the nameserver. The TXT Record can be used for various purposes, including:
- Information about the server
- Details about the used domain and its structure
- Identification of a person or organisation as the legitimate owner
- Combatting SPAM through an SPF entry
- Authentication of a domain's email through DKIM
- Additions to other entries such as the A Record
- Individual purposes like authentication by own clients
- Provision of additional contacts, for example in emergencies
When a client requests information from a nameserver, in addition to the A Record and other domain routing information, the TXT Record is also automatically transmitted. However, the practical use of this depends on the type of entry and the client being used. With a good domain provider, customers can make such entries themselves.
What syntax does the TXT Record use?
The command syntax of the TXT Record is based on the notation and structure designed for the A Record since its introduction. The TXT Record consists of the following parts:
- Domain name corresponding to the A Record
- Time To Live (TTL): Duration of storing the entry in the cache before a new retrieval
- IN for Internet as the domain zone
- TXT as a specification for a text entry
- Content of the text field enclosed in double quotation marks
An example of a valid TXT Record with additional information for the A Record is:
www.example.com. 7200 IN TXT "Technical Support A Record: Hans Mustermann"
However, the most common use is not in additional information for users or specifications with the A Record, but in authenticating the domain, especially in email communication. The TXT Record achieves this by containing keys for mail clients that are checked during forwarding and reception.
How does the TXT Record prevent SPAM through email?
For a long time, mail servers forwarded or accepted emails without authenticating the sender. This meant that there was no comparison between the sender's domain and the A Record to verify the server from which an email was originally sent. Spoofing the sender's address was easily achievable as mail servers accepted any formally valid combination of name@domain.tld.
With Domain-based Message Authentication, Reporting, and Conformance (DMARC), Sender Policy Framework (SPF), and DomainKeys Identified Mail (DKIM), technical methods are available to compare a domain's A Record with the alleged sender. The verification information, such as control numbers, is stored in a TXT Record that a mail client retrieves in addition to the MX and A Records. These methods ensure compatibility with a VPS hosting or Dedicated Server, while for web hosting, the Internet Service Provider (ISP) takes care of the management.
Photo: Shari Jo on Pixabay
Write a comment
- DNS
Tags for this article
More web hosts
More interesting articles
What is a CNAME record? We show examples & explain
The CNAME record simply explained. This is how you easily change it and add a new one.
What does FQDN stand for?
The following article explains what FQDN (Fully Qualified Domain Name) is and what it is used for.
What are Floating IPs and are they useful?
We take a look at what Floating IPs are used for and whether they are useful in daily use.
What is IPv6 and what advantages does it offer?
IPv6 is supposed to be the answer to the scarcity of IPv4 addresses. What exactly changes and what are the advantages?
What is a DNS entry and what types are there?
We explain what a DNS entry is and which records you must pay attention to.
What is HTTP/3 and when will the standard be released?
HTTP/2 has now become a standard. But when will HTTP/3 be released and what does the new standard bring?