DNS
Checks DNS records for a domain including A, MX, TXT, NS, and CNAME records. This node is essential for monitoring domain configuration, verifying DNS propagation, and ensuring your domain's DNS records are properly configured.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Input
- Domain - Domain name to check DNS resolution. The domain will be automatically cleaned (protocol, path, and port will be stripped).
Options
- Record Type - Type of DNS record to query:
- A - Returns IP addresses for the domain
- MX - Returns mail exchange records
- TXT - Returns text records (often used for verification, SPF, DKIM)
- NS - Returns name server records
- CNAME - Returns canonical name record
- ALL - Returns all available DNS records
- Timeout - Timeout in seconds for DNS lookup (default: 60 seconds)
Output
- Result - DNS lookup result object containing:
- resolvable (boolean) - Whether the domain could be resolved
- addresses (array) - IP addresses from A records
- mxRecords (array) - Mail exchange records with host and priority
- txtRecords (array) - Text records
- nsRecords (array) - Name server hostnames
- cname (string) - Canonical name if available
- errors (array) - Any errors encountered during lookup
How It Works
The DNS node performs domain name system lookups to retrieve various DNS records. When executed, the node:
- Cleans the input domain by removing protocol (http://, https://), path, and port
- Configures a DNS resolver with the specified timeout
- Queries the specified record type(s)
- Collects all results and any errors encountered
- Returns a comprehensive result object with all DNS information
Example Use Cases
Monitor Domain A Records
Check if your domain resolves to the correct IP addresses:
// Input
Domain: "example.com"
Record Type: "A"
// Output
{
"resolvable": true,
"addresses": ["93.184.216.34"],
"mxRecords": [],
"txtRecords": [],
"nsRecords": [],
"cname": "",
"errors": []
}
Verify Email Configuration
Check MX records to ensure email is properly configured:
// Input
Domain: "company.com"
Record Type: "MX"
// Output
{
"resolvable": true,
"addresses": [],
"mxRecords": [
{"host": "mail.company.com.", "priority": 10},
{"host": "mail2.company.com.", "priority": 20}
],
"txtRecords": [],
"nsRecords": [],
"cname": "",
"errors": []
}
Complete DNS Audit
Retrieve all DNS records for comprehensive monitoring:
// Input
Domain: "example.com"
Record Type: "ALL"
// Output - All DNS records will be populated
{
"resolvable": true,
"addresses": ["93.184.216.34"],
"mxRecords": [...],
"txtRecords": ["v=spf1 include:_spf.example.com ~all"],
"nsRecords": ["ns1.example.com.", "ns2.example.com."],
"cname": "",
"errors": []
}
DNS Propagation Monitoring
Monitor DNS changes after updating records:
// Check every 5 minutes until new IP appears
// Input
Domain: "newsite.example.com"
Record Type: "A"
// Use with a loop to check propagation status
// Stop when addresses array contains new IP
Tips for Effective Use
- Use ALL Record Type for initial domain audits or comprehensive monitoring
- Monitor MX Records regularly for email delivery reliability
- Check TXT Records for SPF, DKIM, and domain verification status
- Set Appropriate Timeout - DNS lookups usually complete within 5-10 seconds, but slower networks may require longer timeouts
- Strip Unnecessary Parts - The node automatically cleans URLs, but providing clean domain names is more efficient
- Monitor NS Records to detect unauthorized DNS server changes
- Combine with Website Node for complete service health checks
Common Errors and Solutions
Error: "Domain cannot be empty"
Cause: The Domain input is missing or empty.
Solution: Ensure the Domain input variable contains a valid domain name.
Error: Timeout during lookup
Cause: DNS lookup exceeded the specified timeout period.
Solution:
- Increase the Timeout value
- Check network connectivity
- Verify the domain name is correct
- Check if DNS servers are responding
Error: "no such host" in errors array
Cause: The domain does not exist or is not registered.
Solution:
- Verify the domain name spelling
- Check if the domain is registered
- Ensure the domain has DNS records configured
Resolvable: false with empty records
Cause: The specific record type was not found for the domain.
Solution:
- Try "ALL" record type to see what records are available
- Verify that the domain has the requested record type configured
- For new domains, wait for DNS propagation (can take up to 48 hours)
Integration Examples
Monitor Multiple Domains
// Create a loop with list of domains
const domains = ["site1.com", "site2.com", "site3.com"];
// For each domain, check DNS
// Store results in a data table
// Send alert if any domain is not resolvable
DNS Change Detection
// Store current DNS records
// Check periodically
// Compare with stored values
// Alert on any changes (potential security issue)
Email Deliverability Checker
// Check MX records exist
// Verify SPF record in TXT records
// Confirm DKIM record in TXT records
// Generate deliverability report