Dev.to Security 🔐 Cybersecurity 👁 0 📖 3 min read

How to Find Out the Age of Any Domain Name (3 Quick Ways)

An online store says "Trusted since 2012," but was its domain registered last week? Before you pay a shop you've never heard of, buy a domain from someone, or size up a competitor, it's worth knowing how long the domain

An online store says "Trusted since 2012," but was its domain registered last week?

Before you pay a shop you've never heard of, buy a domain from someone, or size up a competitor, it's worth knowing how long the domain has really existed. That date isn't secret: in most cases the registry that runs the domain ending (Verisign for .com, for example) publishes it. Here are three ways to look it up.

1. The quickest way: a free online checker

Paste a domain or any full URL into the Domain Age Checker (disclosure: I built it). It shows:

  • the exact age in years, months and days
  • the registration, expiry and last-updated dates
  • the registrar, nameservers and DNSSEC status

The lookup runs in your browser against the official registry data, so the domains you check aren't logged on any server.

2. From the terminal

whois

macOS includes whois. On Ubuntu or Debian, install it with sudo apt install whois.

whois github.com | grep -i "creation date"
   Creation Date: 2007-10-09T18:20:50Z
Creation Date: 2007-10-09T18:20:50.000+00:00

You get two lines because whois asks both the registry and the registrar, and each writes the date its own way. That's the main problem with WHOIS: it's free-form text, and every server formats it differently.

RDAP, the modern replacement

RDAP (Registration Data Access Protocol) is the official successor to WHOIS. It answers in JSON over HTTPS, with dates in one standard format. Since January 2025, RDAP, not WHOIS, is the official source of registration data for generic domain endings like .com, .org and .dev.

You don't need to know which registry runs a domain, because rdap.org forwards your request to the right one:

curl -sL https://rdap.org/domain/github.com \
  | jq -r '.events[] | select(.eventAction == "registration") | .eventDate'
2007-10-09T18:20:50Z

Keep the -L: rdap.org answers with a redirect to the registry's own server (rdap.verisign.com for .com). If you don't have jq, install it with sudo apt install jq on Ubuntu or brew install jq on macOS.

The same events list also has expiration and last changed entries, so one request also tells you when the domain is up for renewal.

3. In code (Node.js)

Here's the same RDAP lookup as a small function for Node.js 18 or later:

async function getDomainAge(domain) {
  const res = await fetch(`https://rdap.org/domain/${domain}`, {
    // rdap.org blocks Node's default User-Agent, so give your script a name
    headers: { "User-Agent": "domain-age-script/1.0" },
  });
  if (!res.ok) throw new Error(`RDAP lookup failed (${res.status})`);

  const data = await res.json();
  const reg = data.events?.find((e) => e.eventAction === "registration");
  if (!reg) throw new Error("This registry doesn't publish a registration date");

  const days = Math.floor((Date.now() - new Date(reg.eventDate)) / 86_400_000);

  return {
    domain,
    registered: reg.eventDate.slice(0, 10),
    days,
    years: Number((days / 365.25).toFixed(1)),
  };
}

getDomainAge("github.com").then(console.log);
// { domain: 'github.com', registered: '2007-10-09', days: 6994, years: 19.1 }

Watch out for that User-Agent header. Without it, Node's fetch gets a 403 from rdap.org, even though the same request works with curl. The firewall in front of rdap.org rejects Node's default identity.

What the date can and can't tell you

  • It's the age of the current registration. If a domain expires and someone registers it again later, the date starts over. Moving to another registrar or changing nameservers doesn't reset it.
  • A brand-new domain is a warning sign, not proof. Many scam and phishing sites are only days or weeks old, but so is every honest new project.
  • Age alone doesn't boost your Google ranking. Older sites tend to have more content and more links pointing to them, and that's what helps.
  • Some country-code domains don't support RDAP yet, or hide the creation date. For those, use the registry's own WHOIS service.
  • Want to know how long the website has existed, not just the domain? The Wayback Machine shows the oldest saved copy of a site.

Wrapping up

  • Just need the answer? Use the Domain Age Checker.
  • Writing a script? Request https://rdap.org/domain/<domain> and read the registration event.

If you work with DNS or email setups, I've also put a free DNS lookup and an SPF & DMARC checker on the same site.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.