Nameservers wrong or ?

superior

New member
Joined
Jul 28, 2014
Messages
3
Hello,

I'm working with the API for DNS settings from my customer panel to the DirectAdmin account. But on adding MX or NS records there seems to be going something wrong in the order i guess?

Adding records the same way as the A record that's going without any issues.

Example A record:
PHP:
somevalue   A     127.0.0.1
PHP:
$dns->query('/CMD_API_DNS_CONTROL', array('domain' => 'domain.tld', 'action' => 'add', 'type' => 'A', 'name' => 'somevalue', 'value' => '127.0.0.1');

Example NS record:
PHP:
domain.tld.  NS    ns1.domainserver.tld.
PHP:
$dns->query('/CMD_API_DNS_CONTROL', array('domain' => 'domain.tld', 'action' => 'add', 'type' => 'NS', 'name' => 'domain.tld.', 'value' => 'ns1.domainserver.tld.');

The A record is adding it correctly as submitted, but the NS record is the otherway around, the name is set as ns1.domainserver.tld and the value domain.tld. should this not be the otherway ?
 
Back
Top