Webhooks

A webhook sends a notification to a URL you choose whenever a monitored DNS record starts passing or failing. Each of those changes is an event, either dns_record.failing or dns_record.passing, and we send it to each of your enabled webhooks as a delivery. Each delivery is a signed HTTPS request to the webhook's URL, so your own services, automation tools, and chat or push notification apps can act on DNS changes as they happen.

Plans and Limits

Webhooks are available on Enterprise plans: up to 5 webhooks on Enterprise, 10 on Enterprise x2, and 15 on Enterprise x3. Basic and Professional plans don't include webhooks.

See our Pricing page for plan details.

The account holder and team members with the Admin role can add and manage webhooks.

Set Up a Webhook

  1. Click the Account menu in the top-right corner, then click Notification Settings:

    DNS Check Notification Settings Menu

  2. Click the Webhooks tab, then click Add webhook.
  3. Enter a Name and the URL that should receive deliveries, then click Save:

    The Add Webhook form, with fields for the webhook's name and the URL that receives deliveries, and a Show advanced options link

The URL must start with https:// and include a full hostname, such as https://hooks.example.com/dnscheck. It can include a query string (the part starting with ?), but it can't contain a username and password (use a custom header instead), or a fragment (the part starting with #).

By default, a webhook sends the Envelope payload and no custom header. Click Show advanced options to choose a different payload format or envelope version, or to add a custom header.

After you save, we show the webhook's Signing secret, hidden until you click Show. Click Copy to copy it into your endpoint so it can verify that each delivery came from DNS Check. You can return to it anytime by editing the webhook.

The webhook's Signing secret, hidden behind dots, with an information icon and Show and Copy buttons

Your webhooks are listed on the Webhooks tab, with each one's name, host, payload format, and whether it's enabled:

The Webhooks tab listing three webhooks with their names, hosts, payload formats, and enabled state, with the first row's actions drop-down menu open to show Edit, Send test event, Roll secret, Disable, and Delete

Each row's drop-down menu has these actions:

Send a Test Event

To check that your endpoint works, click the webhook's drop-down menu on the Webhooks tab, then select Send test event. We send the webhook a dns_record.failing event with sample data, so your endpoint's handling for failing records runs just as it would for a real event. To keep it from being mistaken for a real failure:

Reload the page after a few seconds to see the test's result under Recent Deliveries, where it's marked Test:

The Recent Deliveries table, showing a delivered test event marked with a Test label above a real dns_record.passing delivery

A test is sent once and isn't retried, so fix the problem the last result points to, then send another.

When Events Are Sent

We send an event to each enabled webhook when a monitored DNS record starts failing, and another when it starts passing again. While a record keeps failing, we don't send more events for its later checks.

Webhooks follow the same rules as your other notifications. No event is sent:

So events don't always come in pairs. For example, if a record fails while its group's notifications are off, and passes after they're turned back on, you receive a passing event without a failing one before it. Treat each event as the record's current state, not as a change from the last event you received.

Chat and Push Notification Apps

For Slack, use DNS Check's Slack integration instead, which is available on every plan.

The apps below aren't part of DNS Check, and they can change how they accept webhooks at any time. If these instructions become stale, let us know.

Discord

  1. In Discord, open the channel's settings (Edit Channel), click Integrations, then Create Webhook.
  2. Give the webhook a name, select a channel, then click Copy Webhook URL. It looks like https://discord.com/api/webhooks/1234567890/abcdEFGH....
  3. In DNS Check, add a webhook with that URL. Under Show advanced options, choose Message only and set the Message key to content.

Discord rejects a payload without a content field, so the Envelope and the default text key won't work.

Google Chat

  1. In Google Chat, open the space, click the space's name, then click Apps & integrations.
  2. Click Add webhooks, name the webhook, save it, and copy its URL. It looks like https://chat.googleapis.com/v1/spaces/AAAA.../messages?key=...&token=....
  3. In DNS Check, add a webhook with that URL. Under Show advanced options, choose Message only and leave the Message key set to text.

Google Chat rejects fields it doesn't recognize, so the Envelope format won't work. Incoming webhooks are available in Google Workspace accounts, and your Workspace administrator may need to allow them.

Mattermost and Rocket.Chat

  1. In Mattermost or Rocket.Chat, create an incoming webhook for the channel, and copy its URL.
  2. In DNS Check, add a webhook with that URL. Under Show advanced options, choose Message only and leave the Message key set to text.

Mattermost reads the Envelope's type field as its own message type and rejects the delivery, so the Envelope won't work there.

ntfy

ntfy sends push notifications to your phone or desktop for anything posted to a topic URL.

  1. Pick a topic name that's hard to guess, and subscribe to it in the ntfy app. Anyone who knows a topic's name on ntfy.sh can read its messages.
  2. In DNS Check, add a webhook with the topic's URL, such as https://ntfy.sh/dnscheck-7f3a9c2e. Under Show advanced options, choose Plain text.
  3. If the topic requires an access token, set the custom header's name to Authorization and its value to Bearer followed by a space and the token.

Use Plain text rather than JSON because ntfy shows a JSON payload as-is.

Automation Tools

Automation tools can start a workflow from a webhook. The tools below give you a URL to paste into DNS Check and can read the default Envelope format, so you can use its fields, such as type and data.dns_record.name, in later steps. To give the tool a sample to work from, send a test event once the URL is in place:

Like the chat apps above, these tools aren't part of DNS Check and can change how they accept webhooks, or which plans include them.

Recent Deliveries

The Recent Deliveries table on the Webhooks tab shows the 500 most recent deliveries across all your webhooks, along with each outcome and the result of its latest attempt. You can search them, for example, by webhook name, and sort by any column. Deliveries are kept for 30 days.

For when we retry a delivery or disable a failing webhook, see Retries and Repeated Failures.

The Recent Deliveries table with a search box and sortable columns, listing each delivery's time, webhook, event, message, outcome, number of attempts, and last result

Outcomes

Outcome Meaning
Delivered Your endpoint responded with a 2xx status code.
Queued The delivery hasn't been attempted yet. It's usually sent within seconds, or about 2 minutes later if the webhook's previous delivery got no response.
Retrying The latest attempt failed, and we'll try again. The Last result column says why the attempt failed.
Gave up Every attempt over 24 hours failed. The Last result column shows the final failure.
Rejected Your endpoint responded with a status code that isn't retried, so we stopped after that attempt. The Last result column shows the code.
Blocked The webhook's hostname resolved to a private or other non-public IP address, so nothing was sent. The Last result column shows the address.
Webhook disabled The webhook was disabled before this delivery succeeded, so we stopped trying. Enabling the webhook doesn't resend it.
Test failed A test event's only attempt failed. The Last result column says why.

Last Results

The Last result column shows what the latest attempt returned. An HTTP 2xx result means the delivery succeeded. Anything else points to a problem to check:

Last result What to check
HTTP 3xx: redirect not followed The endpoint redirected the request. Check the URL for a missing or extra trailing slash, http redirecting to https, or a changed path, and enter the final URL. See Responding to a Delivery.
HTTP 400 The endpoint didn't accept the payload. Check that the payload format and message key match what the endpoint expects, and, if your endpoint verifies signatures, that it uses the raw body.
HTTP 401 or HTTP 403 The endpoint rejected the credentials. Check the custom header or the token in the URL, and that your endpoint has the current signing secret.
HTTP 404 or HTTP 410 The URL doesn't exist, or has been removed, as happens when the webhook is deleted in the chat app. Check the URL, or delete the webhook in DNS Check.
HTTP 429 or HTTP 5xx The endpoint is rate-limiting requests or having trouble on its own. We retry, so this often clears up on its own. If it doesn't, check the endpoint's logs.
Host not found The URL's hostname doesn't resolve. Check for typos, and confirm that its DNS records exist.
Connection timed out Nothing answered within 3 seconds. Check that the endpoint is running, and that its firewall allows our IP addresses.
Connection refused The server is reachable, but nothing is listening on the port. Check that the endpoint is running, and that the URL has the right port (443 unless you've specified one).
Host unreachable No network route to the host. Check the host's IP addresses and your network's routing and firewall.
TLS error (for example, an expired or self-signed certificate) The HTTPS connection couldn't be verified. Check that the certificate is valid and unexpired, matches the hostname, is issued by a public certificate authority rather than self-signed, and that the server sends its full certificate chain.
No response before the timeout The endpoint accepted the connection but didn't respond within 15 seconds. Respond first and do slow work afterward. The endpoint may still have processed the delivery, so expect a duplicate on retry.
Connection closed before a response The endpoint or something in front of it, such as a proxy or load balancer, closed the connection without responding. Check their logs.
Host resolves to address The hostname resolves to that private, loopback, or other non-public IP address, so nothing was sent. Use a URL that's reachable from the Internet, and check the host's DNS records if you expected a public address.
Request failed Any other error. If it keeps happening, contact us.

DNS monitoring illustration

Protect your DNS infrastructure with automated monitoring

Get notified immediately when DNS records change. Start monitoring your critical DNS infrastructure for free in under 5 minutes.

No credit card required • Cancel anytime