Polling APIs every few minutes to check domain status is wasteful and unreliable. Webhook notifications flip the model entirely. Instead of your systems constantly asking whether anything changed, a monitoring service pushes updates to your endpoint the moment something happens. For domain management, this means instant alerts when expiry dates shift, WHOIS records update, or transfer locks change. According to a 2025 Catchpoint survey, 73% of DNS-related outages trace back to expired or misconfigured domains. Webhooks give engineering teams the real-time signals they need to prevent those failures before users notice. This guide covers how domain expiry webhooks work, how to secure them with HMAC signatures, and how to wire them into Slack, PagerDuty, or your own automation pipelines.
What Are Webhook Notifications?
A webhook is an HTTP POST request sent from a server to your specified URL whenever a defined event occurs. Unlike traditional polling, where your application repeatedly queries an API for updates, webhooks deliver data only when something actually changes. This event-driven approach reduces unnecessary network traffic and gives you near-instant awareness of important state changes. In the context of domain monitoring, a webhook fires when a domain's expiry date changes, when WHOIS data updates, or when a domain enters the grace or redemption period. Your receiving endpoint processes the payload and triggers whatever action you need, whether that is a Slack message, a database update, or an automated renewal workflow.
- Instant delivery - no polling delay between event and notification
- Reduced API calls - your server only processes actual changes
- Reliable sequencing - events arrive in order with timestamps
- Flexible routing - send different domain events to different endpoints
- Payload rich - each notification includes full context so you rarely need a follow-up API call
Domain Events Worth Monitoring
Not every WHOIS change matters equally. The most critical event is an approaching expiry date. Most registrars send their own renewal reminders, but those emails often land in spam folders or go to an address nobody checks anymore. A Dynadot analysis from 2024 found that roughly 25% of accidental domain expirations happened because the registrant's contact email was outdated. Webhook notifications bypass that problem entirely by pushing alerts to infrastructure your team actually monitors, like a Slack channel or an incident management platform.
Beyond expiry dates, there are several domain events worth tracking through webhooks. Transfer lock status changes deserve attention because a missing clientTransferProhibited flag means someone could initiate an unauthorized transfer. Nameserver changes can indicate a hijacking attempt or an accidental misconfiguration. Registrar changes signal that a domain has been transferred, which matters if you are watching competitor domains or tracking acquisitions. WHOIS privacy changes can reveal ownership shifts. Finally, status code changes like clientHold or serverHold mean the domain has stopped resolving, which is an emergency for any production service.
Setting Up Domain Expiry Webhooks
Setting up a webhook receiver takes about fifteen minutes for a basic implementation. You need an HTTPS endpoint that accepts POST requests, parses JSON payloads, and returns a 200 status code quickly. The key word is quickly. Webhook senders typically enforce timeouts between 5 and 30 seconds. If your endpoint takes too long to respond, the sender may retry, leading to duplicate processing. The best practice is to acknowledge receipt immediately and handle the actual processing asynchronously through a job queue. Tools like DomainExpiryCheck.com let you configure a webhook URL in your account settings, specify which events you care about, and test the connection before going live.
Your endpoint should validate every incoming request before processing it. Start by checking the Content-Type header to confirm it is application/json. Parse the payload and verify that required fields like event type, domain name, and timestamp are present. Log every incoming webhook, including ones that fail validation, because those logs become essential for debugging. Implement idempotency by tracking event IDs so that retried deliveries do not trigger duplicate actions. If you are running behind a load balancer or reverse proxy, make sure the webhook sender's IP ranges are not blocked by your firewall or rate limiter.
Webhook Security and HMAC Signing
An unsecured webhook endpoint is an open door. Anyone who discovers your URL can send fake payloads to trigger false alerts or, worse, manipulate your automation workflows. HMAC-SHA256 signing solves this problem. The webhook sender and your server share a secret key. On each delivery, the sender computes a hash of the request body using that secret and includes the signature in a header. Your server recomputes the hash with the same secret and compares the two values. If they match, the request is authentic. If not, you reject it. This is the same mechanism that Stripe, GitHub, and Slack use for their own webhooks. According to OWASP's 2024 API Security report, unsigned webhooks rank among the top 10 API vulnerabilities exploited in production systems.
- Always use HMAC-SHA256 or stronger - never MD5 or plain SHA1
- Compare signatures using a constant-time comparison function to prevent timing attacks
- Rotate your webhook secret periodically and update it on both sides
- Reject requests with timestamps older than 5 minutes to prevent replay attacks
- Use HTTPS exclusively - never accept webhooks over plain HTTP
- Store your webhook secret in environment variables, not in source code
- Log rejected requests with their source IP for security auditing
Integrating with Slack and Automation Tools
The simplest integration is forwarding domain expiry webhooks to a Slack channel. Slack's Incoming Webhooks feature gives you a URL that accepts JSON payloads and posts them as messages. You can build a small middleware service that receives domain monitoring webhooks, formats them into Slack's Block Kit structure, and forwards them. For richer workflows, tools like Zapier, Make, or n8n can receive your webhooks and route them to hundreds of destinations without writing code. A common setup pipes domain expiry warnings into both Slack for visibility and a project management tool like Jira or Linear for tracking. For engineering teams that prefer code, a simple Node.js or Python service running on a cloud function works well. The function validates the HMAC signature, checks the event type, and dispatches alerts accordingly. More advanced setups integrate with PagerDuty for critical domains or trigger automated renewal scripts through registrar APIs. DomainExpiryCheck.com supports webhook testing, so you can send a sample payload to verify your integration works correctly before relying on it for production alerts.
Monitor Your Domains Today
Track domain expiration dates, get alerts before domains expire, and never lose a domain again. Free for up to 3 domains.
Start Monitoring Free