# Website down alerts on your iPhone

> Get one push when your website or shop goes down and one when it’s back up, with a small check script and cron, or with Uptime Kuma’s webhook.

Source: https://honk-me.app/guides/website-down-alerts

You want to know your site is down before a customer tells you. That takes two things: something that checks the site every few minutes, and something that tells your phone once, without repeating itself every five minutes until you fix it.

Honk is the second. It doesn’t check your site on its own, so this guide pairs it with a checker: a small script on any machine that’s always on, or Uptime Kuma if you already run it.

## Before you start

- A Honk account. Honk is invite-only for now: [request access](https://honk-me.app/request-access).
- A project for your sites, with an ingestion key: in the web app, open the project, then **Keys**.
- A machine that’s always on and is **not** the server that hosts the site: a small VPS, a Raspberry Pi or a NAS. A check that runs on the same server goes down with it.

## Option 1: a check script and cron

Install the `honk-me` CLI ([how](https://honk-me.app/integrations/cli#install)) and put `HONK_URL` and `HONK_KEY` in the crontab, as in the [cron guide](https://honk-me.app/guides/cron-job-push-notifications). Then save this script as `/usr/local/bin/check-site` and make it executable:

```sh
#!/usr/bin/env bash
# check-site <url> [text]: a Blast when the site is down, one recovery when it's back.
# Down means: no 2xx answer within 10 s (after 2 retries), or the page lacks the text.
set -uo pipefail
url=$1 text=${2:-}
host=$(printf '%s' "$url" | sed -E 's#^https?://##; s#/.*$##')
key="site/$host"
state="${XDG_STATE_HOME:-$HOME/.local/state}/check-site/$host.down"
mkdir -p "$(dirname "$state")"

if body=$(curl -fsS --max-time 10 --retry 2 --retry-delay 5 "$url" 2>&1) &&
  { [ -z "$text" ] || grep -qF -- "$text" <<<"$body"; }; then
  if [ -e "$state" ]; then
    honk-me recovery --group-key "$key" --source "$(hostname)" --category infrastructure \
      --title "$host is back" --message "$url answers again." || true
    rm -f "$state"
  fi
else
  # sent on every failed check while it's down: Honk folds them into calm updates
  honk-me problem --group-key "$key" --source "$(hostname)" --category infrastructure \
    --severity blast --title "$host is down" --message "$url
${body:0:600}" || true
  touch "$state"
fi
```

It counts the site as down when it doesn’t return a success within 10 seconds, after two retries, or when the page is missing a phrase you choose. That second check catches the “site loads, but shows an error page” case: pick words that only appear when the page really works, like the “Add to cart” button in your shop.

Run it every five minutes, one line per site:

```sh
*/5 * * * * /usr/local/bin/check-site https://shop.example.com/ "Add to cart"
*/5 * * * * /usr/local/bin/check-site https://www.example.com/
```

What happens when the shop goes down:

- The first failed check pushes a **Blast** with the error, titled “shop.example.com is down.”
- Every check while it’s down sends the same problem again. Honk folds them into one group and sends at most one calm update every 5 minutes, with a count.
- The first good check sends a **recovery** titled “shop.example.com is back.” The incident closes, and if a Live Activity was showing it, it switches to Recovered.

## Option 2: Uptime Kuma

[Uptime Kuma](https://github.com/louislam/uptime-kuma) is a free, self-hosted monitor. Its webhook notification can send Honk’s JSON directly, because you can write the request body yourself as a template.

In Uptime Kuma, open **Settings ▸ Notifications ▸ Setup Notification** and choose **Webhook**:

- **Post URL**: `https://honk-me.app/v1/messages`
- **Request Body**: Custom Body, with this template:

```json
{
  "title": {% if heartbeatJSON.status == 1 %}{{ name | append: " is back" | json }}{% else %}{{ name | append: " is down" | json }}{% endif %},
  "message": {{ msg | json }},
  "severity": "{% if heartbeatJSON.status == 1 %}beep{% else %}blast{% endif %}",
  "event_type": "{% if heartbeatJSON.status == 1 %}recovery{% else %}problem{% endif %}",
  "group_key": "uptime/{{ monitorJSON.id }}",
  "source": "uptime-kuma",
  "category": "infrastructure"
}
```

- **Additional Headers**:

```json
{ "Authorization": "Bearer honk_…" }
```

Uptime Kuma notifies you when a monitor changes state, so you get one problem when a site goes down and one recovery when it comes back. Each monitor gets its own group. Custom body templates need a recent version of Uptime Kuma, and the **Test** button sends a sample event you can delete from the inbox.

## Hosted uptime services

Many hosted uptime checkers can call a webhook, but they send their own format. Point the webhook at n8n, Make or Zapier, and send Honk a `problem` when the check fails and a `recovery` when it passes, with the same `group_key` for both. The [forms guide](https://honk-me.app/guides/form-submissions-to-your-phone) shows the HTTP module in Make.

## Waking up for it

Quiet hours hold pushes at night. If your shop going down should wake you up, send the problem with `--priority urgent`, allow urgent events on that project’s ingestion key, and allow urgent events in your quiet hours. Save that for the one or two sites that really matter.
