ShieldX Toolly
Open a tool Donate
Home Home
Blog Blog
FAQ FAQ
Open a tool Donate
Back to cheatsheets
Web Security

WHOIS / RDAP Domain Lookup

Query domain registration data via RDAP — registrar, dates, name servers, and status flags.

2 snippets Beginner whois-lookup
WHOISRDAPdomain registrationregistrar

What you'll learn

  • RDAP query (JavaScript)
  • CLI WHOIS

How to use these snippets

  1. Click the Copy button next to any snippet to copy it to your clipboard.
  2. Paste the code into your project, IDE, or terminal.
  3. Replace placeholder values (like example.com or your-secret) with your actual data.
  4. Review the code comments for important security notes and caveats.
  5. Try the interactive related tool to see the concept in action.
Code Snippets

Copy-paste code snippets

2 ready-to-use snippets for whois / rdap domain lookup. Click copy and paste into your project.

RDAP query (JavaScript)
                async function rdapLookup(domain) {
  // RDAP is the modern replacement for WHOIS
  const res = await fetch(
    `https://rdap.org/domain/${domain}`
  );
  const data = await res.json();

  return {
    registrar: data.events?.find(e =>
      e.eventAction === 'registration')?.eventDate,
    expiry: data.events?.find(e =>
      e.eventAction === 'expiration')?.eventDate,
    nameservers: data.nameservers?.map(n => n.ldhName),
    status: data.status,
  };
}
              
CLI WHOIS
                # Basic WHOIS lookup
whois example.com

# RDAP via curl
curl -s https://rdap.org/domain/example.com | jq

# Domain age calculation
whois example.com | grep "Creation Date"
# Then: today - creation date = domain age
              
Tool

Try this concept hands-on with the interactive tool.

100% Free · No signup · No cost

Generate something unguessable right now

148 bits of entropy, a crack-time estimate you can trust, and a clipboard that clears itself after 30 seconds.

Open the toolkit

Part of the Toolly ecosystem · secure.toolly.site