DNS Lookup
AI-generatedOverview
This node performs DNS lookups for a specified domain or zone name, fetching DNS records of a selected type. It allows querying DNS records such as A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT, or ANY using either the system's default DNS resolver or a custom DNS server. This is useful for network diagnostics, domain verification, or gathering DNS information programmatically.
Use Case Examples
- Checking the A record of 'google.com' to find its IP address.
- Querying MX records of a domain to verify email server configurations.
- Using a custom DNS resolver to troubleshoot DNS propagation issues.
Properties
| Name | Meaning |
|---|---|
| Domain/Zone Name | The domain or zone name to query for DNS records. |
| Record Type | The type of DNS record to fetch (e.g., A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT, ANY). |
| Options | Additional options for the DNS query, including specifying a custom DNS resolver server and query timeout. |
Output
JSON
domain- The domain or zone name queried.recordType- The type of DNS record requested.resolver- The DNS resolver used for the query (custom server IP or 'system_default').success- Boolean indicating if the DNS query was successful.records- The DNS records returned from the query, if successful.error- Error message if the DNS query failed.
Dependencies
- Node.js 'dns' module with promises API
Troubleshooting
- Timeout errors if the DNS query takes longer than the specified timeout. Increase the timeout or check network connectivity.
- Errors if the domain name is invalid or the DNS server is unreachable.
- If 'continueOnFail' is enabled, errors will be returned as part of the output instead of stopping execution.