A TXT (Text) record is a type of DNS (Domain Name System) record used to store text information that can be associated with a domain. These records are used for various purposes, including domain verification, email security, and providing human-readable information about a domain.
Common Uses of TXT Records
- Domain Verification: TXT records are often used by services like Google, Microsoft, and others to verify domain ownership. The service will provide a specific text string that you need to add to your DNS records.
- Email Security:
- SPF (Sender Policy Framework): Helps prevent email spoofing by specifying which mail servers are allowed to send emails on behalf of your domain.
- DKIM (DomainKeys Identified Mail): Adds a digital signature to emails to verify that they haven’t been altered and confirm they are from the claimed sender.
- DMARC (Domain-based Message Authentication, Reporting, and Conformance): Works with SPF and DKIM to provide instructions on how to handle emails that fail authentication checks.
- General Information: TXT records can provide any textual information about the domain that may be useful for humans or applications.
Format of a TXT Record
A TXT record consists of several components:
- Name: The domain or subdomain to which the TXT record applies.
- TTL (Time to Live): The duration in seconds that the record should be cached by DNS resolvers.
- Class: The DNS class, which is typically
IN
for Internet. - Type: The type of DNS record, which is
TXT
in this case. - Value: The text information or data.
What Can I Do With TXT Records?
You can write anything you want in your TXT records, but remember that if you don’t use quotes, each word will be treated as a separate string. You should also consider the TTL (Time to Live) for the record, which determines how long it takes for the changes to take effect. In the TXT record, you can include various elements and standards, such as DKIM. DKIM (DomainKeys Identified Mail) can be added to your DNS records to create a domain key that encrypts your email headers. You can also include an SPF record in the TXT section to verify your email address and help prevent spam. Additionally, there are various encryption techniques that can be used in your TXT records to enhance the security of your domain and emails.