DNSprobe Wiki · TXT section
TXT records and generic DNS text data
TXT records are the Swiss-army knife of DNS: they carry verification codes, service metadata and many modern e-mail and security policies.
Originally, TXT records were designed to hold free-form human-readable text attached to a host. Over time, many standards and services started to use TXT for machine-readable key=value data.
Today, TXT records are used for domain ownership checks, external services integration, e-mail security, public keys and much more.
The TXT section of DNSprobe simply shows what TXT records your zone publishes and helps you reason about where they live, how they are formatted and how long they are cached.
How DNSprobe collects TXT records
DNSprobe queries your authoritative nameservers for TXT records at the domain apex and, when relevant, at other commonly used hostnames.
The report lists each TXT record with its host, type and value exactly as your DNS publishes it, without trying to rewrite or interpret the content.
Specialised checks such as SPF, DMARC or DKIM are documented in their own wiki pages. This page focuses on generic TXT behaviour that applies to all of them.
1. TXT Records
This row in your DNSprobe report prints the raw TXT records for the domain, usually as a simple table with host, type, value and TTL.
Why this matters
Seeing the exact TXT contents makes it easier to confirm that you entered verification tokens correctly, that there is only one copy of each policy and that nothing unexpected is still published.
How DNSprobe shows it
DNSprobe sends standard DNS queries for TXT records and displays the answers in the same way a resolver would see them, including quotes and any multiple strings returned by the server.
Typical issues you may notice here
- Old TXT entries left in place for services or providers you no longer use.
- Typos in verification tokens or policy strings compared to what the provider expects.
- Multiple unrelated TXT records squeezed on the same host, making troubleshooting harder.
Good practices for TXT records
- Regularly review TXT data at the apex and at well-known hosts to remove obsolete entries.
- Keep a short internal documentation of which service owns which TXT record.
- Avoid copying values by hand if the provider offers a copy-paste button or automatic DNS setup.
2. Common uses of TXT records
Many modern DNS-based features are implemented using TXT records that follow their own mini-syntax.
Examples of common TXT usages
- Domain verification for services such as search engines, analytics, cloud providers or SaaS platforms.
- E-mail-related policies and metadata (for example SPF, DMARC or reporting addresses).
- Service-specific configuration flags such as cloud storage ownership or code-hosting verification.
- Custom, internal-use text like notes or tracking identifiers used by your own tooling.
Each of these features defines its own syntax inside the TXT value. DNSprobe does not change the text; it simply surfaces what your zone currently advertises.
3. Where TXT records live: hosts and prefixes
TXT records can be attached to the root of the zone or to specific subdomains, often using a leading underscore to avoid collisions with real hostnames.
Typical TXT hostnames
- TXT at the zone apex (example.com) for global policies or site-wide verification.
- TXT on underscored names such as _acme-challenge.example.com or _service.example.com used by automated tools.
- TXT on dedicated subdomains such as mail.example.com or api.example.com for service-specific metadata.
Best practices for TXT hostnames
- Prefer the hostnames suggested by your provider; they are chosen to avoid conflicts with other records.
- Avoid piling many unrelated TXT uses onto the exact same host when you can separate them cleanly.
- Be consistent in naming conventions so that future administrators can recognise what each TXT record is for.
4. TXT value format and quoting
TXT values are stored as one or more quoted strings. DNS itself does not impose a key=value syntax, but many applications do.
Things to know about TXT formatting
- DNS servers may split a long TXT value into multiple quoted strings; resolvers join them back into a single logical value.
- Special characters such as spaces, semicolons or equals signs are allowed but must remain inside the quotes.
- Most modern policies use simple ASCII; if you paste Unicode characters, your DNS software may escape or reject them.
Best practices for TXT values
- Copy TXT values exactly as provided by the service, including quotes when your DNS interface expects them.
- Avoid hand-wrapping or reformatting values, as extra spaces or line breaks may change their meaning.
- When debugging, compare what DNSprobe shows with the provider’s documentation to spot subtle formatting errors.
5. TXT record size and multiple strings
TXT data is subject to size limits, both per string and per DNS response. Very long policies may be split across multiple segments.
Size limits in practice
Each TXT string is typically limited to 255 characters, but a TXT record may contain several strings that are concatenated by resolvers. The full DNS response must also fit within normal UDP or TCP limits.
Best practices for TXT length
- Keep TXT values as compact as possible while staying clear and standards-compliant.
- If a provider suggests reducing mechanisms or removing unused options to shrink a TXT value, follow their guidance.
- Be aware that very long TXT records can be harder to maintain and more fragile across different DNS control panels.
6. TTL choices for TXT records
The TTL of a TXT record controls how long resolvers cache its value before asking your nameservers again.
Why TTL matters for TXT
Short TTLs let you change verification tokens or service configuration quickly, but they generate more DNS traffic. Long TTLs reduce load but make changes slower to propagate.
Best practices for TXT TTLs
- Use shorter TTLs temporarily while you are deploying or debugging a new TXT-based feature.
- Once stable, increase TTLs to a reasonable value (for example one hour or more) to reduce unnecessary queries.
- When rotating keys or policies, plan ahead to avoid long periods where caches still hold the previous TXT value.
7. Test TXT records manually from your own terminal
DNSprobe lists all TXT records it finds for your domain (such as SPF policies, verification tokens and service-specific keys). You can reproduce the same checks yourself from a terminal by querying TXT records directly.
Linux: using dig (BIND utilities)
On most Linux distributions, the dig command is provided by the BIND utilities package. The following commands query all TXT records at the root of your domain. You can then optionally narrow the output to your SPF policy only:
dig example.com TXT
dig example.com TXT +short
# Optional: filter the output to show only the SPF record
dig example.com TXT | grep "v=spf1"
macOS: using dig from the built-in tools
macOS ships with dig as part of its standard command-line tools. Open Terminal and run the same commands as on Linux to list all TXT records for your domain, then optionally filter the SPF record:
dig example.com TXT
dig example.com TXT +short
# Optional: filter the output to show only the SPF record
dig example.com TXT | grep "v=spf1"
Windows: using nslookup
On Windows, the legacy nslookup tool can query TXT records for your domain. Run the following commands from a Command Prompt or PowerShell window to list TXT records for the root, or for a specific host if needed:
nslookup -type=TXT example.com
REM Optional: query TXT records for a specific host name instead of the root
nslookup -type=TXT sub.example.com
Important: only query DNS records for domains that you own or are authorised to analyse. Repeated automated lookups against third-party domains may be treated as abusive traffic by some providers.
Summary: treat TXT as structured metadata
TXT records are simple at the DNS level but power many critical features of modern domains. Keeping them tidy and well-documented reduces surprises when you change providers or add new services.
DNSprobe’s TXT section gives you a faithful view of what your zone currently publishes so you can keep verification tokens, policies and other text data under control.
Unsure what a TXT record in your report is for?
If you see a TXT value you do not recognise, search in your internal documentation and at your major providers first. When in doubt, keep the record in place until you are certain it is no longer needed.