The record format does not limit how it can be used, but the most common purposes are the following:
- Proving ownership — to use services that require confirmation that you own the domain, such as requesting SSL certificates or verification with Yandex, Google, Microsoft and others, you may be asked to add a TXT record containing a unique code or token. This lets those services confirm your ownership of the domain.
- Setting up SPF — Sender Policy Framework defines a mechanism that authorizes specific mail servers to send email. SPF records help prevent email address forgery (spoofing) and reduce the chance of your messages ending up in spam.
- Setting up DKIM — an implementation of DomainKeys Identified Mail, a method of authenticating email. DKIM lets a cryptographic signature be attached to outgoing messages, confirming that a message was indeed sent by this domain and was not altered in transit.
- Setting up DMARC — defining a Domain-based Message Authentication, Reporting & Conformance policy. It governs how mail servers should handle messages that fail SPF and DKIM checks, and provides mechanisms for reporting.
- Setting up NS — specifies the addresses of the DNS servers that serve the given zone
- Attribution — you can store arbitrary information about the domain or server, using it as a note or label.
Working with TXT records is usually tied to a request from a third-party service that requires proof of domain ownership or the configuration of one internet-service mechanism or another.