DNS Lookup
Query DNS records for a domain against the resolver of your choice. 47 record types, nine of them queried in parallel when you ask for all of them.
Overview
Every lookup runs dig from the server against either the system resolver or a nameserver you
name. Nothing is cached between requests, so what you get is what that resolver answers right now. That is the
point: comparing two resolvers side by side is how you catch a propagation problem.
Queries use +time=2 +retry=0. A resolver that does not answer within two seconds is reported
as having no records rather than retried, which keeps a slow nameserver from stalling the whole request.
Web interface
Enter a domain, pick a record type and pick a resolver. The type selector defaults to All Standard Types, which queries nine types in parallel: A, AAAA, CNAME, MX, NS, TXT, SRV, PTR and SOA.
The resolver selector offers the system resolver plus Cloudflare (1.1.1.1), Google (8.8.8.8), OpenDNS (208.67.222.222) and Quad9 (9.9.9.9). Choosing Custom DNS Server reveals a field that accepts any IP address or hostname.
URL parameters
Domain, record type and resolver can all be carried in the path, so a specific query is linkable.
| Pattern | Example |
|---|---|
/lookup/dns/{domain} | /lookup/dns/example.com |
/lookup/dns/{domain}/{type} | /lookup/dns/example.com/MX |
/lookup/dns/{domain}/{server} | /lookup/dns/example.com/1.1.1.1 |
/lookup/dns/{domain}/{type}/{server} | /lookup/dns/example.com/MX/1.1.1.1 |
The two three-segment forms overlap, and the type form is matched first. A single segment that could be read as either is treated as a record type. In practice this is unambiguous, because record types are short alphanumeric words and resolvers are addresses, but if you pass a resolver hostname with no dots it will be read as a type.
Record types
47 types are accepted: A, AAAA, AFSDB, APL, CAA, CDNSKEY, CDS, CERT, CNAME, CSYNC, DHCID, DLV, DNAME, DNSKEY, DS, EUI48, EUI64, HINFO, HIP, HTTPS, IPSECKEY, KEY, KX, LOC, MX, NAPTR, NS, NSEC, NSEC3, NSEC3PARAM, OPENPGPKEY, PTR, RP, RRSIG, SIG, SMIMEA, SOA, SRV, SSHFP, SVCB, TA, TKEY, TLSA, TSIG, TXT, URI and ZONEMD.
Passing ALL, or omitting the type entirely, queries the nine standard types in parallel.
Anything outside the list is rejected rather than passed through to dig.
Record types are case-insensitive on input and always uppercase in the response.
API
/lookup/dns/{domain}/{record_type}/{dns_server}
Record type and resolver are optional path segments. Any other method returns HTTP 405.
| Name | Type | Default | Description |
|---|---|---|---|
| domain | string | required | Fully qualified domain name, at most 253 characters, each label at most 63. Must not start with a hyphen and must end in a TLD of two or more letters. |
| record_type | enum | ALL |
One of the 47 supported types, or ALL for the nine standard types. |
| dns_server | string | system resolver | IP address or hostname of the resolver to query. |
$ curl -s "https://api.troubleshooting.tools/v1/lookup/dns/example.com/MX/1.1.1.1" | jq .
{
"domain": "example.com",
"dns_server": "1.1.1.1",
"results": {
"MX": [
{
"TTL": 3600,
"Preference": 0,
"Exchange": "."
}
]
}
}
Response shape
The envelope is always domain, dns_server and results.
dns_server echoes back the literal string localhost when you did not name one.
results is keyed by record type. Each value is either an array of record objects or the
string No records found for record type X., a string rather than an empty array, so check the type
before iterating.
| Type | Fields beyond TTL |
|---|---|
| A, AAAA | Address |
| CNAME | CNAME |
| MX | Preference, Exchange |
| NS | Nameserver |
| TXT | Text |
| SRV | Priority, Weight, Port, Target |
| SOA | MNAME, RNAME, Serial, Refresh, Retry, Expire, Minimum |
| PTR | PTRDNAME |
| CAA | Flags, Tag, Value |
| everything else | Data, the raw record text |
Errors
Unlike the IP lookup, this endpoint does use status codes.
| Status | Condition |
|---|---|
| 400 | Validation failed. Body is {"error": [...]}, an array of messages, since several can fail at once. |
| 405 | Any method other than GET. |
| 429 | Rate limit exceeded. |
The validation messages are Domain is required., Invalid domain name.,
Invalid record type specified. and
Invalid DNS server. Must be a valid IP address or hostname.
A domain that simply has no records of the requested type is not an error: you get HTTP 200 with the "No records found" string. So is a resolver that times out, which is worth remembering when a result looks empty.
Rate limits
50 requests per second per IP address, burst 100, at most 50 concurrent connections. Over the limit returns
HTTP 429.
Each ALL query costs nine dig invocations on the server even though it is one HTTP
request. If you are polling, name the single type you actually need.
Privacy
Queried domains appear in server logs for operational purposes. They are not sold, shared or used to build profiles. The lookup is performed by the server, so the resolver you pick sees the server's address, not yours. That is exactly why this tool can tell you what a third-party resolver returns.