Domain age is one of those numbers you need more often than you'd expect. Link builders use it to spot sites that bought their authority last quarter. Domain investors use it to price a name. Fraud and trust-and-safety teams treat a three-week-old domain on a payment page as a red flag. And the old way of getting it, parsing WHOIS text, has been getting steadily worse.
Why WHOIS is a pain now
WHOIS output was never a standard format. Every registry and registrar prints the creation date differently (Creation Date:, created:, Registered on:), in different date formats, and some ccTLDs leave it out. Since GDPR most of the contact data is redacted anyway, and ICANN no longer requires gTLD registries and registrars to run the old port-43 WHOIS service at all. Its replacement is RDAP.
RDAP in one request
RDAP is WHOIS as JSON over HTTPS. rdap.org redirects you to the right registry server for any domain:
curl -sL https://rdap.org/domain/python.org The dates live in an events array. For python.org that gives registration: 1995-03-27, expiration: 2033-03-28 and a last changed date. Age is just today minus the registration date:
import requests from datetime import datetime, timezone def domain_age_years(domain): data = requests.get(f"https://rdap.org/domain/{domain}", timeout=30).json() events = {e["eventAction"]: e["eventDate"] for e in data.get("events", [])} created = datetime.fromisoformat(events["registration"].replace("Z", "+00:00")) return round((datetime.now(timezone.utc) - created).days / 365.25, 1) print(domain_age_years("python.org")) # 31.7 It works for ccTLDs that run RDAP too: nrk.no comes back with a registration date of 14 November 1999.
What goes wrong at scale
For ten domains, the script above is all you need. For a few thousand, three things bite:
- rdap.org and the registry servers rate-limit you, so you need retries with backoff and a polite pace.
- Not every TLD has an RDAP server yet, and some return a 404 for unregistered names while others return an error object. You want "not registered" as an answer, not as a crash.
- Some registries skip the
registrationevent entirely.
The bulk version
I built a WHOIS lookup and domain checker on Apify that does this for up to 1,000 domains per run (it's mine, for what that's worth). There's a ready-made domain age checker setup if age is all you want. Each row has:
-
domain_age_years,created_at,expires_atanddays_until_expiry(negative once a domain has lapsed) -
is_registered, the registrar company and its IANA ID, nameservers, DNSSEC - optionally DNS records, the mail provider, and an SPF/DMARC/DKIM grade from A to F
It never returns registrant contact data, only the registrar, which is a company. Pricing is $2.50 per 1,000 domains checked.
A quick rule of thumb for link vetting
Pull age next to authority. A site that's 8 years old with DA 35 earned it. A site that's 5 months old with DA 35 almost certainly bought it, and those links tend to stop counting the day Google notices.

