F FreeCronJob
← Blog

How to Monitor Domain Expiration with a Web Cron Job

How to Monitor Domain Expiration with a Web Cron Job

A domain can expire even while its website, DNS, and TLS certificate still look healthy. The result may be downtime, lost email, or an opportunity for another party to acquire a valuable name. Scheduled domain-expiration monitoring adds an independent control: a web cron job checks authoritative registration data, compares it with an approved inventory, and escalates well before renewal becomes urgent.

Build an owned-domain inventory

List production, redirect, campaign, email, API, and defensive domains. Record the business owner, registrar, renewal method, billing owner, criticality, and expected expiration date. Discovery should include domains referenced by DNS, certificates, and public applications.

Prefer RDAP over fragile scraping

Use RDAP where the registry or registrar supports it because the response is structured and easier to normalize. Fall back to WHOIS only when necessary, respecting rate limits and privacy redaction. Never scrape registrar dashboards as the primary monitoring source.

Keep the cron endpoint small

The scheduled endpoint should authenticate, create a run ID, enqueue the inventory, and return quickly. A worker performs lookups, comparison, storage, and alerts. Protect the trigger with the controls in secure web cron endpoints.

Normalize dates and statuses

Convert timestamps to UTC, retain the original value, and distinguish expiration from last update or registration dates. Record registry status codes separately. Missing or ambiguous dates should become a data-quality warning rather than an invented deadline.

Use staged alert thresholds

Critical domains may need alerts at ninety, sixty, thirty, fourteen, seven, and three days. Lower-risk domains can use fewer stages. Each threshold should notify the people capable of renewing, with escalation when acknowledgement is missing.

Verify automatic renewal

Auto-renew reduces risk but is not proof of renewal. Track whether it is enabled, whether the payment method is valid, and whether the registrar has applied the new expiration date. Continue monitoring until authoritative data confirms the extension.

Separate domain and certificate expiry

A renewed certificate does not renew a domain, and a renewed domain does not update a certificate. Keep both controls and link incidents where useful. Use SSL certificate expiration monitoring for the TLS side.

Watch nameserver and registrar changes

An unexpected registrar, nameserver, lock, or transfer status change can be as important as the deadline. Compare these fields with the approved inventory and correlate them with DNS record change monitoring.

Schedule by portfolio size

Daily checks are usually sufficient for expiration dates, while newly transferred or high-risk domains may warrant more frequent checks. Spread large inventories across the day and use cron expression examples to make schedules readable.

Respect lookup limits

Cache successful responses, limit concurrency per registry, and apply backoff when services throttle. Do not treat a rate-limit response as proof that a domain is missing. Keep the last known good record with a freshness indicator.

Make runs idempotent

Use one alert key per domain, deadline, and threshold so repeated runs update the incident instead of creating duplicates. Record acknowledgements and close the incident only after renewal is confirmed.

Prevent overlapping checks

A slow registry must not make two portfolio scans collide. Use a distributed lock or unique batch key with safe expiry. The techniques in preventing overlapping cron jobs keep state consistent.

Retry transient failures

Retry timeouts and temporary server errors with backoff and jitter. Invalid inventory data and persistent lookup failures need investigation. Follow the limits in cron retry strategies.

Create actionable alerts

Include the domain, verified expiration time, days remaining, registrar, renewal state, owner, source freshness, and next action. Never include account credentials, payment data, or private registrar links.

Protect the renewal process

Use registrar lock, strong multifactor authentication, role separation, and documented recovery contacts. Monitoring should not require broad registrar access; keep lookup and renewal privileges separate.

Maintain an audit trail

Store lookup source, retrieval time, normalized values, differences, alert stage, acknowledgement, and renewal confirmation. Retain enough history to explain incidents without keeping unnecessary personal data.

Monitor the monitor

Track inventory coverage, stale records, lookup failure rate, last successful batch, and unacknowledged alerts. Apply the broader practices in reliable cron monitoring.

Test before relying on it

Use test records to simulate threshold crossings, missing owners, rate limits, ambiguous dates, failed auto-renew, duplicate triggers, and recovery. The checklist for testing web cron jobs covers scheduler behavior.

Launch with a practical checklist

  • Inventory every business-relevant domain.
  • Use structured authoritative registration data.
  • Verify owners, auto-renew, and billing readiness.
  • Deduplicate staged alerts and require acknowledgement.
  • Protect registrar access and keep an audit trail.
  • Monitor lookup freshness and portfolio coverage.

Domain-expiration monitoring works best as an ownership process, not a date reminder. An accurate inventory, authoritative verification, and independently scheduled web cron job give teams time to renew safely before a domain becomes an emergency.