The All Secure Domains DNS control panel allows you to set any A record as a dynamic record. Once enable you can then use our API (or a dyndns2 compatible client) to update that record from a script. This guide will walk you through the process of setting this up.
The only requirements are that your domain DNS is hosted with All Secure Domains and that you have (or create) an A record for the hostname you wish to dynamically update.
The steps below walk through creating a new A record on an existing domain but the process if very similar if you're enabling an existing record.
Your DNS Entries list will now show your new A record and just underneath it in the table will be the Dynamic Key for that entry. Take a note of this key as you'll need it later on. Eg:
Dynamic key: a1b4002e-04f4-4c84-86d7-00ef66781d93
You can now make an API call to dynamically update that DNS entry at any time. Each update will take up to 15 minutes to appear in the public DNS system.
The dynamic DNS API endpoint is intended to be extremely simple and hence will accept requests using either GET or POST to the following endpoint:
https://www.allsecuredomains.com/api/dns/setDynamic
The following parameters are accepted:
domain: The domain name for the entry to update hostname: The host to update within the domain key: The Dynamic Key provided by the control panel myip: The new IP address to set for this entry
All parameters are required with the exception of the IP address. If no IP address is provided the IP for the source of the API request will be used.
A successful change will return an HTTP status of 200 and the text "good". Any other response represents a failure to update the record and will include an error message.
An example API call using curl:
curl "https://www.allsecuredomains.com/api/dns/setDynamic?domain=example.com&hostname=test&key=a1b4002e-04f4-4c84-86d7-00ef66781d93&myip=127.0.0.1"
Although not all features are supported it is also possible to use this API in a way compatible with the (dyndns2) DynDNS dynamic DNS updates that are embedded in many routers and other devices.
When used in this way the domain should be used as the username and the Dynamic Key as the password:
curl "https://example.com:a1b4002e-04f4-4c84-86d7-00ef66781d93@www.allsecuredomains.com/nic/update?hostname=test.example.com&myip=127.0.0.1"