What is DNS text record (TXT) and its purpose?

It’s like a public notepad for each domain on DNS. Public is because it’s publicly available what’s written in DNS for this domain. Different companies and services can use TXT record for their purposes. TXT record doesn’t affect the domain’s availability (A record) or email availability (MX record). TXT record is really like a public notepad. One of the purposes often TXT record used is to identify that a client owns the domain. For us, it’s easy we can access account and dns ourselves, but what if a 3rd party company wants to know if this domain is YOURS. They provide some code and ask you to create a TXT record on your domain and put this code (or any text) in there. Once you added the text, they can read it off because it’s public information. This proves you have access to the domain’s dns and most likely own or manage the domain. Second most popular use for TXT is SPF.