What is a DNS TXT Record? | Definition, Function & Example
A DNS TXT Record (Text Record) is a type of DNS record used to store human-readable or machine-readable text information related to a domain. Common uses include email authentication, domain ownership verification, and SEO-related configurations.
Key Functions of a DNS TXT Record:
- Email security: Supports SPF, DKIM, and DMARC records to prevent email spoofing.
- Domain verification: Used by services like Google Search Console and Microsoft 365 to verify domain ownership.
- Custom metadata: Allows administrators to store arbitrary text for various application-specific uses.
Example of a DNS TXT Record:
example.com. IN TXT "v=spf1 include:_spf.example.net ~all"
This is a typical SPF (Sender Policy Framework) record used for email authentication.
Best Practices for DNS TXT Records:
- Keep TXT records concise and well-structured.
- Use only one SPF record per domain to avoid conflicts.
- Regularly audit your DNS TXT records to remove outdated entries.