Lightweight RDAP client library to check if a domain is registered.
Supports all TLDs via IANA bootstrap data + built-in fallback for TLDs not yet registered with IANA.
- Check domain registration status (registered / available)
- Supports all TLDs (including IDN TLDs) via IANA bootstrap + curated fallback
- Automatic RDAP server discovery per TLD
- Fallback across multiple RDAP servers per TLD
- Custom server registration for unsupported TLDs
- IDN/Punycode support
- Nameserver extraction from RDAP responses
- Thread-safe, cached IANA bootstrap
- Zero heavy frameworks – just Java 11+ and
org.json - ~5 KB library code
- Java 11+
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>Download the JAR from Releases.
import com.slxca.rdap.RDAPClient;
import com.slxca.rdap.RDAPResult;
RDAPClient client = new RDAPClient();
RDAPResult result = client.checkDomain("google.com");
if (result.isRegistered()) {
System.out.println(result.getDomain() + " is registered");
} else {
System.out.println(result.getDomain() + " is available");
}Output:
google.com is registered
RDAPResult result = client.checkDomain("google.com");
for (String ns : result.getNameservers()) {
System.out.println("NS: " + ns);
}client.registerServer("io", "https://rdap.afilias.net/rdap/");
RDAPResult result = client.checkDomain("example.io");java -jar rdap-java.jar google.com| Method | Returns | Description |
|---|---|---|
RDAPClient() |
Creates client with default HttpClient |
|
RDAPClient(HttpClient) |
Creates client with custom HttpClient |
|
checkDomain(String domain) |
RDAPResult |
Queries RDAP for the domain |
registerServer(String tld, String serverUrl) |
void |
Registers a custom RDAP server for a TLD |
| Method | Returns | Description |
|---|---|---|
getDomain() |
String |
The queried domain |
isRegistered() |
boolean |
true if HTTP 200, false if 404 |
getServerUrl() |
String |
RDAP server used |
getNameservers() |
List<String> |
Nameservers from the RDAP response |
RDAPException– network errors or no RDAP server found for TLDIllegalArgumentException– null/blank/invalid domain
- TLD extraction – Extracts the top-level domain from the input (e.g.
example.com→com) - Server lookup – Checks custom servers → IANA bootstrap → built-in fallback
- RDAP query – Sends
GET {serverUrl}/domain/{domain}withAccept: application/rdap+json - Result – HTTP 200 → registered, HTTP 404 → not registered
| Source | Count | Examples |
|---|---|---|
| IANA bootstrap | ~1200 | .com, .org, .net, .uk, .fr |
| Built-in fallback | 5 | .de, .ch, .us, .no, .nl |
Missing a TLD? Open an issue or use registerServer() to add it yourself.