Domain Name Lookup with RDAP

Switch operates an RDAP server for looking up registration data of .ch and .li domain names. It supports the class "Domain" (Domain Object Class). The answer is provided in JSON format. The RDAP server can be accessed via any HTTP client.

Anonymous users are not shown any information about holders or the technical contact for domain names. Authenticated users with an user account receive the full registration data, depending on their authorisations.

  • with a REST client (stand-alone or as a browser extension)
  • using Terminal (command line)
  • using a browser (Firefox recommended)

See examples below.

In addition to GET, you can also use HEAD requests. These are used to ascertain whether a domain name is already registered, without providing further data.

With a REST client

Method: GET (or HEAD)
URL: https://rdap.nic.li/domain/xyzdomainname.li

Using Terminal (command line)

curl https://rdap.nic.li/domain/xyzdomainname.li

HEAD request:

curl -I https://rdap.nic.li/domain/xyzdomainname.li

Using a browser

Enter into address field:

https://rdap.nic.li/domain/xyzdomainname.li

With a REST client

Method: GET (or HEAD)
URL: https://rdap.nic.li/domain/xyzdomainname.li

Use "Basic Authentication" and enter the user name and password of your user account.

Using Terminal (command line)

curl -u username https://rdap.nic.li/domain/xyzdomainname.li

HEAD request:

curl -I https://rdap.nic.li/domain/xyzdomainname.li

Using a browser

Enter into address field:

https://rdap.nic.li/domain/xyzdomainname.li?login

The browser will display a log-in prompt; enter the user name and password of your user account.

If the domain name is registered, the RDAP server responds with data in JSON format and the HTTP status code 200 (or 401). If the domain name or input cannot be found, the server responds solely with HTTP status codes. In a browser lookup, these codes are not directly visible. The result may be an error message or a blank page. In a HEAD request, the server always responds solely with HTTP status codes, without data.

Meaning of HTTP status codes

404 (Not Found)

The domain name as entered was not found. Usually, this means that the domain name isn't registered. But that doesn't always mean that the domain name can be registered.

200 (OK)

The domain name is registered and/or cannot be registered at this time.

400 (Bad Request)

Invalid request, for example, may contain prohibited characters or wrong TLD (change the query before next attempt).

401 (Unauthorized)

Username/password incorrect. The domain name is registered, but you only receive the same data as an anonymous user would.

429 (Too Many Requests)

Access restricted (wait for a while and try again).

 

RDAP stands for Registration Data Access Protocol. It replaces the Whois protocol, which no longer satisfies current technical requirements.

  • Standardised, machine-readable answers in JSON format.
  • HTTP-based and REST-compliant.
  • Secure access to data via HTTPS.
  • The registry is able to define different access rights for different user groups.

There are multiple RFCs for the RDAP protocol. RFC 7480 and 7483 are particularly important for the implementation of .ch and .li domain name queries.

  • RFC 7480 HTTP Usage in the Registration Data Access Protocol (RDAP)
  • RFC 7483 JSON Responses for the Registration Data Access Protocol (RDAP)
  • RFC 7481 Security Services for the Registration Data Access Protocol (RDAP)
  • RFC 7482 Registration Data Access Protocol (RDAP) Query Format