To query RDAP instead of WHOIS: Send an HTTPS GET request to https://rdap.org/domain/<domain> (or resolve the authoritative server from IANA's dns.json bootstrap file per RFC 9224) with Accept: application/rdap+json, follow HTTP 302 redirects, and extract structured domain, DNSSEC, and expiry fields from the standardized RFC 9083 JSON payload.[3][5][8]
Follow this technical runbook to migrate monitoring scripts, security pipelines, and domain lookup workflows off unencrypted TCP Port 43 WHOIS onto standards-compliant RDAP endpoints.
Why RDAP Replaced Port-43 WHOIS Under ICANN Policy
Legacy WHOIS (RFC 3912) operates over unencrypted TCP Port 43 and returns unstructured plain-text responses whose layouts differ across every registrar and registry.[1][4] Regular-expression scrapers built around WHOIS frequently break when an operator changes field labels, redacts personal contact data, or serves non-ASCII internationalized domain names.[4]
Developed by the IETF and standardized across STD 95 (RFC 9082, RFC 9083, RFC 9224) alongside RFC 7480 and RFC 7481, the Registration Data Access Protocol (RDAP) delivers registration records over HTTPS as machine-readable JSON.[1][4][5]
As of January 28, 2025, ICANN-contracted gTLD registries and registrars are no longer required to operate legacy WHOIS services—with narrow exceptions for .com, .name, and .post—and must serve registration data via the February-2024 gTLD RDAP Profile after August 20, 2025.[1][2]
| Protocol Attribute | Legacy WHOIS (RFC 3912) | RDAP (RFC 7480 / 9082 / 9083 / 9224) |
|---|---|---|
| Transport & Port | Cleartext TCP Port 43[4] | Encrypted HTTPS (TCP Port 443)[3] |
| Response Format | Unstructured, vendor-specific plain text[4] | Standardized application/rdap+json schema[3][5] |
| Server Discovery | Hardcoded referral tables | Automated IANA JSON bootstrap files (RFC 9224)[6] |
| Access Control | All-or-nothing public output[4] | Role-based differentiated access & authentication[1] |
| Internationalization | Limited ASCII conventions[4] | Native UTF-8 and IDN support[1][4] |
| ICANN gTLD Mandate | Sunsetted January 28, 2025 (except .com, .name, .post)[1] |
Mandatory across all gTLD registries and registrars[1] |
How to Query RDAP Instead of WHOIS from the Command Line
Teams managing DNS zones and asset inventories through Nextgen Domain Registration can query gTLD domains, IP blocks, and ASNs directly using standard HTTP utilities instead of a whois binary. RFC 9082 defines uniform RESTful lookup path segments—including domain/, ip/, autnum/, nameserver/, and entity/—that work identically across domain registries and Regional Internet Registries.[4]
1. Fast Lookups with curl, jq, and PowerShell
For interactive checks and low-volume automation, rdap.org operates as a public bootstrap redirector that responds with an HTTP 302 Location header pointing to the authoritative registry.[8] Always pass -L to curl so it follows the redirect and -H "Accept: application/rdap+json" per RFC 7480:[3][8]
# Query a gTLD domain and pretty-print the RFC 9083 JSON response
curl -Ls -H "Accept: application/rdap+json" https://rdap.org/domain/example.com | jq .
# Query an IPv4/IPv6 network or Autonomous System Number (ASN)
curl -Ls https://rdap.org/ip/8.8.8.8 | jq '{handle, name, country, startAddress, endAddress}'
curl -Ls https://rdap.org/autnum/15169 | jq '{handle, name, status}'
On Windows hosts running PowerShell, Invoke-RestMethod follows redirects automatically and parses JSON into native objects:[8]
$rdap = Invoke-RestMethod -Uri "https://rdap.org/domain/example.com" -Headers @{ Accept = "application/rdap+json" }
$rdap | Select-Object ldhName, status
$rdap.events | Format-Table eventAction, eventDate
2. Extracting Expiry Dates, EPP Status, and DNSSEC DS Records with jq
Because RFC 9083 enforces a consistent JSON schema, monitoring agents running on Nextgen Hosting Dedicated Servers can parse lifecycle timestamps, nameservers, and DNSSEC dsData records without brittle string splitting:[5]
curl -Ls https://rdap.org/domain/example.com | jq '{
domain: .ldhName,
status: .status,
expires: (.events[] | select(.eventAction == "expiration") | .eventDate),
nameservers: [.nameservers[].ldhName],
dnssec_signed: .secureDNS.delegationSigned,
ds_keytags: [.secureDNS.dsData[]?.keyTag]
}'
When you only need to test whether an object exists without transferring a full JSON body, RFC 9082 Section 3.1 permits sending an HTTP HEAD request (curl -ILs --head) and inspecting the 200 OK or 404 Not Found status code.[4]
Pitfall: Exceeding Public Bootstrap Rate Limits in Cron Jobs: Cloudflare enforces a strict limit of 10 requests per 10 seconds on rdap.org, returning HTTP 429 Too Many Requests if exceeded.[8] Under RFC 7480, automated clients receiving HTTP 429 must back off and honor the Retry-After response header.[3]
Direct IANA Bootstrapping Under RFC 9224 (Zero Third-Party Reliance)
For high-volume security scanners, domain portfolio monitors, and billing platforms deployed on Nextgen Hosting Pakistan Dedicated Servers, querying rdap.org introduces an unnecessary intermediary hop and rate ceiling.[8] Instead, download and cache IANA’s official RFC 9224 JSON bootstrap registries locally:[6]
| Resource Scope | Official IANA Bootstrap Endpoint | Key Mapping Structure |
|---|---|---|
| Domain Names (DNS) | https://data.iana.org/rdap/dns.json |
TLD strings (e.g., ["com"]) mapped to HTTPS base URLs[6][7] |
| IPv4 Address Blocks | https://data.iana.org/rdap/ipv4.json |
CIDR prefixes mapped to ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC[6] |
| IPv6 Address Blocks | https://data.iana.org/rdap/ipv6.json |
IPv6 CIDR prefixes mapped to Regional Internet Registry URLs[6] |
| AS Numbers (ASNs) | https://data.iana.org/rdap/asn.json |
Numeric ASN ranges mapped to authoritative RIR endpoints[6] |
| Object Tags | https://data.iana.org/rdap/object-tags.json |
Service provider object tags mapped to registry base URLs |
The shell snippet below resolves the authoritative RDAP server directly from IANA’s dns.json registry—which covers 1,205 TLDs—and queries it without touching any third-party proxy:[7]
DOMAIN="example.com"
TLD="${DOMAIN##*.}"
BASE_URL=$(curl -s https://data.iana.org/rdap/dns.json | \
jq -r --arg tld "$TLD" '.services[] | select(.[0][] == $tld) | .[1][0]')
curl -s -H "Accept: application/rdap+json" "${BASE_URL}domain/${DOMAIN}" | jq .
Pro Tip: Cache dns.json Locally and Handle Missing ccTLDs: Refresh IANA's dns.json file once every 24 hours via cron rather than fetching it per lookup. When inspecting .pk domains registered under PKNIC, note that pk is currently absent from IANA's RDAP bootstrap file—querying https://rdap.org/domain/nextgen.pk returns HTTP 404, so your script should fall back to PKNIC's Domain Lookup tool for .pk zones.[7][8][10]
Verification Checklist: Migrating Scripts from WHOIS to RDAP
Run these four checks before retiring legacy Port-43 WHOIS integrations in production:
- Verify Redirect and Header Handling: Confirm your HTTP client follows HTTP
301,302,303, and307redirects and sendsAccept: application/rdap+jsonper RFC 7480.[3] - Validate Against RFC 9083 Keys: Replace text regex matchers with deterministic JSON lookups against
.status,.events[](registration,expiration,last changed),.nameservers[].ldhName, and.secureDNS.dsData.[5] - Implement Local RFC 9224 Bootstrap Caching: Cache
dns.json,ipv4.json,ipv6.json, andasn.jsonlocally and honor429+Retry-Afterbackoff headers.[3][6] - Add ccTLD Fallback Routing & Interactive Cross-Checks: Route unsupported ccTLDs such as
.pkto PKNIC’s official lookup workflow, and verify edge cases manually using the official ICANN Lookup portal.[9][10]
Frequently Asked Questions
Why Did ICANN Sunset Port-43 WHOIS in Favor of RDAP?
ICANN ended the contractual obligation for gTLD registries and registrars to operate legacy WHOIS services on January 28, 2025 (with exceptions for .com, .name, and .post) because Port-43 WHOIS transmitted cleartext data in inconsistent formats, lacked internationalization, and could not enforce role-based privacy controls.[1][4] RDAP resolves these gaps with HTTPS transport, structured JSON, and differentiated access.[1]
How Does IANA RDAP Bootstrapping (RFC 9224) Find the Authoritative Server?
Under RFC 9224, IANA publishes machine-readable JSON files (dns.json, ipv4.json, ipv6.json, and asn.json) mapping every supported TLD, CIDR block, and ASN range to its authoritative registry base URL.[6] An RDAP client matches the requested domain’s TLD or IP prefix against that map and appends /domain/<name> or /ip/<address> per RFC 9082.[4][6]
Does RDAP Work for .pk and Country-Code Top-Level Domains (ccTLDs)?
ICANN’s RDAP mandate binds generic top-level domains (gTLDs), whereas ccTLDs operate under national registry policies.[1] Currently, .pk is not included in IANA’s dns.json bootstrap registry, so RDAP queries for .pk domains return HTTP 404; administrators should continue using PKNIC’s official lookup portal for .pk records.[7][10]
What Happens If My Script Hits HTTP 429 Rate Limits on RDAP.org?
Public redirectors such as rdap.org enforce a Cloudflare limit of 10 requests per 10 seconds and return HTTP 429 Too Many Requests when exceeded.[8] Per RFC 7480, your client must slow down, respect any Retry-After header, and switch to direct registry queries via IANA’s RFC 9224 bootstrap JSON files for batch workloads.[3][8]
Manage Enterprise Domains & Resilient DNS with Nextgen Hosting
Register global gTLDs and .pk domains with full DNSSEC, automated SSL lifecycle management, and high-availability infrastructure engineered in Pakistan.
Disclaimer: This post is for informational and educational purposes only, accurate to the best of our knowledge at publication. It does not constitute advice. We do not guarantee accuracy or completeness and accept no liability for any decisions or losses resulting from reliance on this content.
Sources & Official References
- ICANN: Registration Data Access Protocol (RDAP) Overview & January 28, 2025 WHOIS Sunset. https://www.icann.org/en/contracted-parties/registry-operators/resources/registration-data-access-protocol
- ICANN: Registration Data Access Protocol (RDAP) Timeline & February-2024 gTLD RDAP Profile Milestones. https://www.icann.org/en/contracted-parties/registry-operators/registration-data-access-protocol/rdap-timeline-31-08-2018-en
- IETF RFC 7480: HTTP Usage in the Registration Data Access Protocol (RDAP). https://datatracker.ietf.org/doc/html/rfc7480
- IETF RFC 9082: Registration Data Access Protocol (RDAP) Query Format (STD 95). https://datatracker.ietf.org/doc/html/rfc9082
- IETF RFC 9083: JSON Responses for the Registration Data Access Protocol (RDAP) (STD 95). https://datatracker.ietf.org/doc/html/rfc9083
- IETF RFC 9224: Finding the Authoritative Registration Data Access Protocol (RDAP) Service (STD 95). https://datatracker.ietf.org/doc/html/rfc9224
- IANA: RDAP Bootstrap Service Registry for DNS (
dns.json). https://data.iana.org/rdap/dns.json - RDAP.org: Bootstrap Server Usage, Status Codes, and Rate Limits. https://about.rdap.org/
- ICANN Lookup: Official Web-Based RDAP Registration Data Lookup Tool. https://lookup.icann.org/en
- PKNIC: Official .PK ccTLD Registry Portal & WHOIS Domain Lookup. https://pknic.net.pk/
