All host commands: (check) (create) (delete) (info) (modify)
Check the existence of a hostname by sending a host:check
command. For speed purposes, the system will only return if the object exists, no extra information is returned.
In this example we are checking ns1.checkthishost.com and ns2.checkthishost.com for availability.
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0">
<command>
<check>
<host:check>
<host:name>ns1.docu-test-case.com</host:name>
</host:check>
</check>
<clTRID>57d147ecf2458</clTRID>
</command>
</epp>
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<host:chkData>
<host:cd>
<host:name avail="true">ns1.docu-test-case.com</host:name>
</host:cd>
</host:chkData>
</resData>
<trID>
<svTRID>MTR_bbf690435c0616142f23e2aed39e246c1bfe86bd</svTRID>
<clTRID>57d147ecf2458</clTRID>
</trID>
</response>
</epp>
If you want to use a nameserver that lives somewhere on the internet, it is not necessary to check or create the nameserver name first. If you still check a hostname or nameserver that is not in your portfolio, you receive this response:
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:ext="http://www.metaregistrar.com/epp/ext-1.0" xmlns:command-ext="http://www.metaregistrar.com/epp/command-ext-1.0" xmlns:command-ext-domain="http://www.metaregistrar.com/epp/command-ext-domain-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<host:chkData>
<host:cd>
<host:name avail="false">ns1.metaregistrar.com</host:name>
<host:reason lang="en">Host possibly exists, domain is not yours</host:reason>
</host:cd>
</host:chkData>
</resData>
<trID>
<svTRID>MTR_9859b910106a60f194b9f68f480a0f13654d79b7</svTRID>
<clTRID>57d1494abe34c</clTRID>
</trID>
</response>
</epp>
The most common result of a host:check
command is listed above. The avail=false
result above means that the host might or might not exist, but since the associated domain name is not in your portfolio, it is not of your concern.