Domain Expiration Checker: Protect Your Domain Portfolio
Never lose a domain to expiration again. Learn how to build automated domain expiration monitoring using WHOIS data and API integrations.
Why Domain Expiration Monitoring Matters
Domain expiration is one of the most preventable yet devastating risks to any online business. When a domain expires, it can be registered by anyone, leading to brand impersonation, traffic theft, and data loss. The recovery process is expensive and time-consuming.
The Cost of Domain Expiration
What Happens When a Domain Expires
| Phase | Duration | What Happens | Recovery Cost |
|---|---|---|---|
| Active | 1-10 years | Domain works normally | Standard renewal |
| Grace Period | 0-45 days | Domain inactive, can renew at normal price | Normal + late fee |
| Redemption Period | 30 days | Domain in quarantine, expensive recovery | $200 - $2,000 |
| Pending Delete | 5 days | Domain being removed from registry | Very difficult |
| Available | - | Anyone can register | Lost |
Using the WHOIS API for Expiration Tracking
Query Domain Expiration
curl -X GET "https://api.ops.tools/v1/whois?domain=example.com" \ -H "Authorization: Bearer YOUR_API_KEY"
Parse the Response
{
"domainName": "example.com",
"expirationDate": "2026-08-13T04:00:00Z",
"registrationDate": "1995-08-14T04:00:00Z",
"daysUntilExpiration": 148,
"registrar": "GoDaddy.com, LLC"
}Automated Monitoring Scripts
Python
import requests
apiUrl = "https://api.ops.tools/v1/whois"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
domains = ["example.com", "yourdomain.com", "partner.com"]
for domain in domains:
response = requests.get(apiUrl, headers=headers, params={"domain": domain})
data = response.json()
days = data.get("daysUntilExpiration", 0)
if days <= 14:
print(f"ALERT: {domain} expires in {days} days!")
elif days <= 30:
print(f"WARNING: {domain} expires in {days} days")
else:
print(f"OK: {domain} - {days} days remaining")Node.js
const domains = ["example.com", "yourdomain.com"];
const headers = { "Authorization": "Bearer YOUR_API_KEY" };
for (const domain of domains) {
const res = await fetch(
`https://api.ops.tools/v1/whois?domain=${domain}`,
{ headers }
);
const data = await res.json();
const days = data.daysUntilExpiration;
if (days <= 30) console.log(`WARNING: ${domain} expires in ${days}d`);
else console.log(`OK: ${domain} - ${days}d remaining`);
}Best Practices
- Set alerts at 90, 60, 30, and 14 days before expiration
- Enable auto-renewal wherever possible (GDPR-compliant registrars)
- Consolidate domains under one registrar for easier management
- Use WHOIS privacy services where appropriate
- Conduct quarterly portfolio audits to catch orphaned domains
- Monitor registrar changes as potential security indicators
For more on WHOIS data, see our WHOIS Lookup API guide.
Frequently Asked Questions
Q: How do I check when a domain expires?
Use the Ops.Tools WHOIS Lookup API to query domain expiration dates. Send a request with the domain name, and the API returns the registration date, expiration date, and days remaining until expiry. Professional plans start at $29/month.
Q: What happens when a domain expires?
When a domain expires, it goes through phases: active period (renewal at normal price), grace period (renewal with late fee), redemption period (expensive recovery), pending delete, and finally becomes available for anyone to register. Recovery costs increase dramatically at each phase.
Q: How to automate domain expiration monitoring?
Use the WHOIS Lookup API to query expiration dates programmatically. Schedule daily checks, compare days remaining against thresholds (90, 60, 30, 14 days), and send alerts when domains approach expiration.
Q: What is reverse WHOIS lookup?
Reverse WHOIS lookup finds all domains associated with a specific registrant email, name server, or IP address. This is useful for competitive research, fraud investigation, and discovering all domains in a portfolio.
Related Articles
SSL Certificate Checker: Complete Guide to SSL Verification
Learn how to check SSL certificate validity, understand SSL errors, and monitor certificate expiration. Includes automation examples with the Ops.Tools API.
Read ArticleDNS Lookup API: How to Check DNS Records Programmatically
Complete developer guide to querying DNS records via API. Includes working code examples in Python, Node.js, Go, and PHP with caching best practices.
Read ArticleDNS Records Explained: A Complete Guide to All DNS Record Types
Master every DNS record type: A, AAAA, MX, CNAME, TXT, NS, SOA, PTR and more. Understand how DNS resolution works with practical examples.
Read ArticleStart Monitoring Domain Expiration Dates
Automated WHOIS monitoring for your entire domain portfolio. Plans from $29/month.