RU-CENTER - Russian Network Information Center

Dynamic DNS for developers

To develop an application with support of dynamic DNS, you need to get a username and a password in the section "Manage your account → DNS-hosting: Dynamic DNS".

Request for getting an IP address looks like this:

GET https://api.nic.ru/dyndns/checkip

Response will return HTTP code 200; response body will look like this:

Content-Type: text/html; charset=UTF-8

<html><head><title>Current IP Check</title></head><body>Current IP Address: 127.0.0.1</body></html>

Request for IP address update looks like this:

GET https://api.nic.ru/dyndns/update?hostname=myhost1.test.ru,myhost2.test.ru&myip=192.168.1.1
Authorization: Basic <base64-encoded-string>

Alternative option:

GET https://username:password@api.nic.ru/dyndns/update?hostname=myhost1.test.ru,myhost2.test.ru&myip=192.168.1.1&ipv6=::1

Parameters transferred in the query:

hostname - receives a list of hostnames for which IP addresses are to be assigned, separated with commas;
myip – new IPv4 address;
ipv6 – new IPv6 address.

Parameters myip and ipv6 are optional. If a request has no myip, then will be set IPv4 address from which connection was made. If a request has no ipv6, then IPv6 address will not be set.

In case of success, HTTP code 200 will be returned; response body will look like this:

good 192.168.1.1

good ::1

If IP address for domain myhost2.test.ru is not updated because record is absent, then response body will look like this:

good 192.168.1.33

nohost

In case of authentication error, HTTP code 200 will be returned; response body will look like this:

badauth

The response may also include character codes notfqdn and dnserr.

After processing of a request for IP address update, all A records of the same name will be changed in TLDs under agreement for all DNS-master services. All unsaved changes will be lost after request processing.