Actions28
- Domain Actions
- DNS Record Actions
- SSL Actions
- User Actions
Overview
The node integrates with the Namecheap API to manage DNS records for domains. Specifically, the "Set Hosts" operation under the "DNS Record" resource allows users to create or update multiple DNS host records for a specified domain. This is useful for automating DNS management tasks such as pointing subdomains to IP addresses, setting mail exchange servers, or adding text records for verification purposes.
Practical examples include:
- Setting an A record for
@(root domain) to point to a web server's IPv4 address. - Adding MX records to configure email routing priorities.
- Creating CNAME records to alias one domain to another.
- Adding TXT records for domain ownership verification or SPF settings.
Properties
| Name | Meaning |
|---|---|
| Domain Name | The domain for which DNS records will be managed (e.g., example.com). |
| Host Records | A collection of DNS records to set, each including: |
| - Host Name | The hostname part of the DNS record (use "@" for root domain). |
| - Record Type | The type of DNS record to create or update. Options: A, AAAA, CNAME, MX, TXT. |
| - Address | The value of the DNS record, such as an IP address, domain name, or text string. |
| - MX Priority | For MX records only, the priority number (lower means higher priority). Defaults to 10. |
| - TTL | Time to live in seconds for the DNS record, controlling caching duration (range 60-86400). |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. Each output object has the structure:
{
"success": true,
"data": { /* response data from the API for the setHosts operation */ }
}
success: Boolean indicating if the operation succeeded for that item.data: Contains the API response data related to setting the DNS host records.
If an error occurs and the node is configured to continue on failure, the output for that item will be:
{
"success": false,
"error": "Error message describing what went wrong"
}
No binary data is produced by this node.
Dependencies
- Requires an active connection to the Namecheap API via an API key credential configured in n8n.
- The node depends on the Namecheap API being accessible and the credentials having permissions to modify DNS records.
- No additional external services are required beyond the Namecheap API.
Troubleshooting
Common issues:
- Invalid domain name or domain not registered with Namecheap.
- Incorrect or missing API credentials leading to authentication failures.
- Providing invalid DNS record values (e.g., malformed IP addresses or unsupported record types).
- TTL values outside the allowed range (60-86400 seconds).
Error messages:
"The operation "setHosts" is not known for resource "dns"!"— indicates a misconfiguration of the operation parameter.- API errors returned from Namecheap will be surfaced in the
errorfield whencontinueOnFailis enabled.
Resolutions:
- Verify domain ownership and registration status.
- Ensure API credentials are correctly set up and have necessary permissions.
- Validate all DNS record inputs before execution.
- Use valid TTL values within the specified range.