DNS DNS records

​TXT record – What is it and why do you need it?

If you are searching for the TXT record, you are probably interested in email security and all the methods of authentication and validation of a domain. So, Let’s not waste any more time and see what the TXT record type is all about!

​What is the TXT record?

The TXT record is a type of DNS resource record and serves to associate data with the domain. The data could be a human-readable text, or it could be different information about servers and networks that could be read by machines only.

Usually, DNS administrators create various TXT records to ensure the proper functionality of the email servers. That way, the emails that are sent could be verified, and their origin could be authenticated.

The TXT records can be hosted as most of the other DNS records inside a Forward DNS zone. You can host multiple TXT records for different purposes, which won’t create problems between them.

You can see the TXT record first mentioned and read more about it in the RFC 1035 by the creator of the DNS – P Mockapetris.

​Why do you need a TXT record?

The current uses of TXT records are the following:

  • Ownership verification. It is one of the easiest ways to prove that you are the owner of a particular domain. Many services ask you to add a TXT record to the domain name. If you are the administrator, you could be able to do it. If you are not, this will be impossible.
  • Sender Policy Framework (SPF). This is a mechanism for verification of the sender and reporting. It could lower the SPAM.
  • DomainKeys Identified Mail (DKIM). This is an encryption method that prevents email spoofing. It uses public and private keys and keeps the keys inside TXT records.
  • Domain-based Message Authentication, Reporting, and Conformance (DMARC). It uses a combination of the previous two, the SPF and DKIM, and creates behavior policies. It boosts security.
  • Zero-configuration networking DNS-based service discovery. It is used for fast network configuration.

​How to check your TXT records?

You can see all the TXT records for a hostname/domain name by performing a DNS lookup.

​On Linux

Open the Terminal and use the dig command to perform a TXT DNS lookup:

dig hostname/domain name TXTs

You need to change “hostname/domain name” with the one you want to see.

​On Windows

Open the Command Prompt and type the following command:

nslookup -type=txt hostname/domain name

​On macOS

Open the Terminal, and use the nslookup command to see the TXT record:

nslookup -type=txt hostname/domain name

​Inside any browser

You can also use any browser, including your mobile phone’s one, and use an online utility for TXT lookup.

You can try Mxtoolbox.

Open it, write the hostname/domain name, and press TXT Lookup.

​Conclusion.

Now you know that the TXT records could hold different information about the domain name. It is mostly a tool for domain authentication, but also it can be used to show that somebody has access to a domain and the right to modify its DNS records. It is often the case that big cloud providers require you to put a TXT record for your domain so that you can use their services with that domain name.

Leave a Reply

Your email address will not be published. Required fields are marked *