A lightweight, high-performance RDAP client library for Java. A modern, structured alternative to legacy WHOIS socket queries to check domain registration status and availability.
Supports all TLDs via IANA bootstrap data, automatic RDAP server discovery, and built-in fallbacks.
- Domain Availability Check: Instantly determine if a domain is registered or available.
- Universal TLD Support: Covers ~1200+ TLDs via dynamic IANA bootstrap + curated fallbacks for unlisted registries.
- Automatic Server Discovery: Resolves official RDAP base URLs per TLD automatically with thread-safe caching.
- Server Failover: Built-in fallback mechanism across multiple RDAP servers per TLD.
- IDN & Punycode Ready: Native handling for internationalized domain names (e.g., umlauts, non-Latin scripts).
- Nameserver Extraction: Easily extract authoritative nameservers from RDAP responses.
- Custom Endpoints: Register custom RDAP server endpoints at runtime.
- Zero Heavyweight Frameworks: Uses pure Java 11+
HttpClientandorg.json(~5 KB library overhead).
- Java 11 or higher
repositories {
mavenCentral()
}
dependencies {
implementation("com.slxca:rdap-java:1.0.0")
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.slxca:rdap-java:1.0.0'
}
<dependency>
<groupId>com.slxca</groupId>
<artifactId>rdap-java</artifactId>
<version>1.0.0</version>
</dependency>
Grab the latest pre-built .jar from the Releases page.
import com.slxca.rdap.RDAPClient;
import com.slxca.rdap.RDAPResult;
import com.slxca.rdap.RDAPException;
public class Main {
public static void main(String[] args) {
RDAPClient client = new RDAPClient();
try {
RDAPResult result = client.checkDomain("example.com");
if (result.isRegistered()) {
System.out.println(result.getDomain() + " is already taken.");
System.out.println("RDAP Server: " + result.getServerUrl());
} else {
System.out.println(result.getDomain() + " is available for registration!");
}
} catch (RDAPException e) {
System.err.println("RDAP lookup failed: " + e.getMessage());
}
}
}RDAPResult result = client.checkDomain("google.com");
if (result.isRegistered()) {
System.out.println("Nameservers:");
for (String ns : result.getNameservers()) {
System.out.println(" - " + ns);
}
}If a registry is not part of the IANA bootstrap registry or uses a dedicated endpoint, register it manually:
client.registerServer("io", "[https://rdap.afilias.net/rdap/](https://rdap.afilias.net/rdap/)");
RDAPResult result = client.checkDomain("example.io");Pass your own configured HttpClient (e.g., custom timeouts, proxy settings):
import java.net.http.HttpClient;
import java.time.Duration;
HttpClient customHttp = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(5))
.build();
RDAPClient client = new RDAPClient(customHttp);Run the packaged JAR directly from your terminal:
java -jar rdap-java.jar google.com
| Method | Returns | Description |
|---|---|---|
RDAPClient() |
Creates an instance using the default HttpClient. |
|
RDAPClient(HttpClient client) |
Creates an instance using a custom HttpClient. |
|
checkDomain(String domain) |
RDAPResult |
Performs an RDAP lookup for the given domain. |
registerServer(String tld, String serverUrl) |
void |
Registers or overrides an RDAP server URL for a specific TLD. |
| Method | Returns | Description |
|---|---|---|
getDomain() |
String |
Returns the queried domain. |
isRegistered() |
boolean |
Returns true if HTTP 200 (registered), false if HTTP 404 (available). |
getServerUrl() |
String |
Returns the RDAP endpoint URL used for the query. |
getNameservers() |
List<String> |
Returns authoritative nameservers parsed from the RDAP response. |
RDAPException– Thrown on network issues, HTTP errors other than 404, or if no RDAP endpoint was discoverable.IllegalArgumentException– Thrown when passing null, empty, or malformed domain strings.
- TLD Extraction: Normalizes the input and isolates the top-level domain (e.g.,
sub.example.co.ukormünchen.devia IDN Punycode). - Endpoint Resolution: Checks custom registered servers first, then queries cached IANA bootstrap data, and falls back to curated registry lists.
- HTTP Query: Sends an authenticated HTTP GET request with header
Accept: application/rdap+json. - Status Evaluation: Treats HTTP 200 as registered and parses details; treats HTTP 404 as available.
| Registry Source | Count | Examples |
|---|---|---|
| IANA Bootstrap | ~1200+ | .com, .org, .net, .uk, .fr |
| Built-in Fallbacks | Curated | .de, .ch, .us, .no, .nl |
Missing a TLD? Feel free to open an issue or submit a Pull Request.
This project is licensed under the MIT License