A domain that lapses takes its website and email down with it, and an expired SSL certificate breaks the site even when the domain is fine. Here is how to look up both dates for free, and what to do when a registry publishes no date at all.
curl -sL https://rdap.org/domain/yourdomain.com and read the expiration event, or run whois yourdomain.com and look for the expiry line. For many country-code domains neither gives a date; ask the registrar. Check the SSL certificate separately with openssl x509 -enddate.RDAP (Registration Data Access Protocol) is the JSON-over-HTTPS replacement for WHOIS, and ICANN requires it for generic TLDs such as .com, .net and .org. rdap.org forwards your request to the right registry server. With jq you can pull out just the date or the registrar:
curl -sL https://rdap.org/domain/example.com |
jq -r '.events[] | select(.eventAction=="expiration") | .eventDate'
# 2027-08-13T04:00:00Z
# registrar name
curl -sL https://rdap.org/domain/example.com |
jq -r '.entities[] | select(.roles | index("registrar")) | .vcardArray[1][] | select(.[0]=="fn") | .[3]'
Other useful events in the same list are registration (created) and last changed. The status array shows flags such as client transfer prohibited (normal registrar lock) or redemption period (already expired and about to be released).
whois example.com | grep -iE 'expir|paid-till'
# Registry Expiry Date: 2027-08-13T04:00:00Z
# (field names differ by registry: "Expiration Date", "paid-till", "renewal date" ...)
WHOIS output is free-form text, so the field name changes from registry to registry, and many registrars now redact the owner's contact details. The registrar's own lookup page on its website shows the same data in a browser.
.de and .ae both returned 404). Use WHOIS or the registry's own lookup instead.2027-08-13T04:00:00Z may already be 12 August where you are.For most generic TLDs the domain doesn't vanish on the day. The registrar usually keeps it in a renewal grace period, often up to about 45 days for .com, during which the website and email may stop working. After that comes a redemption period of about 30 days with a higher restore fee, then a short pending-delete phase before anyone can register it. Exact periods and fees depend on the registry and the registrar, so check your registrar's terms rather than relying on these numbers. Turning on auto-renew is the simplest fix.
The certificate has its own expiry, and with free certificates that's every 90 days or less. Two openssl one-liners cover it:
# when does the certificate end?
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null |
openssl x509 -noout -enddate
# notAfter=Feb 22 23:53:08 2027 GMT
# exit code 1 if it expires within 30 days (2592000 seconds)
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null |
openssl x509 -noout -checkend 2592000
The -checkend form is handy in cron or CI: it exits with 1 when the certificate expires inside the window you give it.
VerifAI is a remote MCP server (Streamable HTTP, no install) at https://manhourplan.com/mcp. Its domain_intel tool returns, in one call, the domain's DNS records (A, AAAA, MX, NS, TXT), RDAP registration data from rdap.org (registrar, created, expires, updated, status) and the number of days left on the SSL certificate served on port 443. It costs 1 credit per domain. It uses the same rdap.org lookup as step 1, so for TLDs that rdap.org doesn't cover the registration field comes back as an error code instead of dates; the DNS and SSL parts still work.
# Claude Code
claude mcp add --transport http verifai https://manhourplan.com/mcp
# then ask: "get a free VerifAI key and tell me when example.com and its SSL certificate expire"
# raw JSON-RPC tools/call (after initialize + register_free_key, see the VerifAI page)
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"domain_intel",
"arguments":{"domain":"example.com","api_key":"YOUR_KEY"}}}
Result shape:
{"domain": "example.com",
"dns": {"A": [...], "AAAA": [...], "MX": [...], "NS": [...], "TXT": [...]},
"registration": {"registrar": "...", "created": "1995-08-14T04:00:00Z",
"expires": "2027-08-13T04:00:00Z", "updated": "...", "status": [...]},
"ssl_days_left": 85}
register_free_key gives 25 free credits with no signup, email or card. After that, card packs: $9 for 1,000 credits, $29 for 10,000, $99 for 100,000; credits never expire. The same key also covers verify_email (1 credit) and verify_emails (up to 50 addresses, 1 credit each).VerifAI reads public registry, DNS and certificate data. It doesn't renew domains, send alerts or have access to your registrar account.
Query RDAP, the JSON successor to WHOIS: curl -sL https://rdap.org/domain/example.com and read the event whose eventAction is expiration. The whois command and the registrar's own lookup page show the same date as text.
Both come from the registry or registrar. WHOIS returns free-form text whose field names vary by registry; RDAP returns structured JSON over HTTPS with standard event names such as registration, expiration and last changed. ICANN requires RDAP for generic TLDs like .com, .net and .org.
Many country-code TLDs are not in the RDAP bootstrap that rdap.org uses, so the lookup returns 404, and some registries (DENIC for .de, for example) do not publish an expiry date in WHOIS either. Ask the registrar that manages the domain, or check its control panel.
No. The domain registration and the TLS certificate expire separately. Check the certificate with openssl s_client piped to openssl x509 -noout -enddate, or with -checkend to test a number of seconds ahead.
Yes. VerifAI is a remote MCP server at https://manhourplan.com/mcp. Its domain_intel tool returns DNS records, RDAP registration data (registrar, created, expires, updated, status) and SSL certificate days left for 1 credit per domain. register_free_key gives 25 free credits; card packs start at $9 for 1,000 credits.