Domains-domainName-nameservers:PUT
From Hostway API Documentation
PUT /domains/{domainName}/nameservers
Set (overwrite) the name servers used to serve the Domain Name System (DNS) records for the domain. Name servers are a set of 0 to 13 distinct hostnames that may be assigned to a domain. Once the name servers are modified using this command, the changes are sent immediately to the registry. However these changes may take several hours to propagate depending on the individual zone files and possible registry zone file publication delays.
Contents |
Request
PUT /domains/{domainName}/nameservers
URI Parameters
- domainName - string
- The domain name. IE: example.com is a valid domain name, whereas http://www.example.com or www.example.com are not. If the domain name is invalid, or is otherwise not registerable such as for a non-existent or non-supported TLD, an error will be returned. Domain names are case insensitive. The domain name must be an open or suspended product under the authenticated franchise.
Request Headers
None.
Request Body
- Name server array
- An array (list) of name server host names. Name servers are assigned in the order listed.
- Example: ["a.dns.hostway.net","b.dns.hostway.net"]
Response
Status Code
- 204 OK (No Content)
- Domain nameservers successfully updated
- 400 Bad Request
- The domain name, or one of the given hostnames is not valid or is not a registered name server at the registry.
- The request was not completed even if one or more of the name servers is considered valid.
- 403 Forbidden
- Domain is not registered in this account and cannot be accessed.
- 404 Not Found
- No domain records found for the given domain name.
Response Body
- None
Example updating nameservers on a domain.
Request
PUT /domains/example.com/nameservers ["ns0.example.com","ns1.example.com","ns2.example.com","ns3.example.com","ns4.example.com","ns5.example.com","ns6.example.com"]
Response
204 No Content
Example updating nameservers using one or more name server that is not registered.
Request
PUT /domains/example.com/nameservers ["not-registered.example.com","ns1.example.com","ns2.example.com","ns3.example.com","ns4.example.com","ns5.example.com","ns6.example.com"]
Response
400 Bad Request "not-registered.example.com" is not a registered name server and cannot be used to update the domain.
See also