Server Down SMS Alerts: Get a Text the Moment Your Site Goes Offline
If your site goes down at 2am, an email alert waits until morning. A text wakes you up. Here's how to set up a server down SMS alert using an uptime monitor or a simple script, without drowning in false alarms.

On this page
- Rule one: monitor from outside
- What to check
- Option 1: an uptime service with a webhook
- Option 2: a simple script on another server
- Option 3: alerts from your existing monitoring
- Avoiding alert fatigue
- Don't forget the slow failures
- Who gets the text?
- Write alerts that tell you what to do
- Why SMS from a phone gateway works well for alerts
Websites rarely go down at convenient times. A certificate expires overnight, a disk fills up during a backup, a deploy goes wrong on Friday evening. If your only alert is an email, you find out when you check your inbox, or when a customer tells you. By then you may have lost hours of orders and a chunk of trust.
A server down sms alert closes that gap. A text gets noticed even when email doesn't, and it works on any phone. Here's how to set one up properly, and how to keep it from crying wolf.
Rule one: monitor from outside#
A monitoring script running on the same server as your website has an obvious flaw. When the server dies, the monitor dies with it, and nobody gets told. Always check from somewhere independent: a hosted uptime service, a small server with a different provider, or at the very least a different machine on a different network.
What to check#
- The homepage or a dedicated health endpoint returns HTTP 200.
- The response contains an expected word, so a blank page or a hosting error page with a 200 status still counts as down.
- Key pages work: checkout, login, the API your app uses.
- The SSL certificate isn't about to expire. Many outages are really expired certificates.
- Response time stays under a threshold, since a site that takes 30 seconds to load is down as far as visitors are concerned.
A good health endpoint, such as /health, checks the things that matter internally, like database connection, cache and disk space, and returns 200 only if they're fine. That catches problems a homepage check would miss.
Option 1: an uptime service with a webhook#
Most uptime monitoring services check your URLs every minute or few minutes from several locations and notify you when checks fail. Many include email and app notifications on free plans, and either built-in SMS (sometimes with limited credits) or a webhook you can point anywhere.
The webhook route lets you send texts through your own SMS API. The monitoring service POSTs to a small endpoint you control, which then sends the text. Because the endpoint needs to be up when your main site is down, host it somewhere separate, such as a serverless function or a different server.
Option 2: a simple script on another server#
If you have a second server or a small VPS, a script run by cron every minute can do the job. Here's a minimal bash version using curl and the SMS Gora API:
#!/bin/bash
# check-site.sh, run every minute by cron: * * * * * /opt/monitor/check-site.sh
URL="https://example.com/health"
STATE=/var/tmp/site-state
FAILS=/var/tmp/site-fails
code=$(curl -s -o /dev/null -w '%{http_code}' --max-time 10 "$URL")
if [ "$code" = "200" ]; then
if [ "$(cat $STATE 2>/dev/null)" = "down" ]; then
msg="RECOVERED: $URL is back up at $(date +%H:%M)"
curl -s -X POST https://tekservix.com/smsgora/api/v1/send-sms \
-H "x-api-key: $SMSGORA_KEY" -H "Content-Type: application/json" \
-d "{\"recipients\":[\"+447700900123\"],\"message\":\"$msg\"}" >/dev/null
fi
echo up > $STATE; echo 0 > $FAILS
else
n=$(( $(cat $FAILS 2>/dev/null || echo 0) + 1 )); echo $n > $FAILS
if [ "$n" -eq 3 ]; then
msg="DOWN: $URL returned $code (3 checks in a row) at $(date +%H:%M)"
curl -s -X POST https://tekservix.com/smsgora/api/v1/send-sms \
-H "x-api-key: $SMSGORA_KEY" -H "Content-Type: application/json" \
-d "{\"recipients\":[\"+447700900123\"],\"message\":\"$msg\"}" >/dev/null
echo down > $STATE
fi
fi
Set SMSGORA_KEY in the cron environment or the script, not in a public repository. The script only alerts after three consecutive failures, sends one message per incident, and texts again when the site recovers. Those three details make the difference between a useful alert and one you learn to ignore.
Option 3: alerts from your existing monitoring#
If you already use server monitoring or error tracking tools, many can call a webhook on alerts. Point those at a small SMS sender for your most serious alerts, like disk almost full, database down or error rate spiking, and keep everything else in email or chat. Our guide to Slack webhook notifications covers the chat side.
Avoiding alert fatigue#
An alert system that texts you about every blip will soon be muted. A few rules:
- Require several failed checks in a row before alerting.
- Check from more than one location, so a single network hiccup doesn't count.
- One text per incident, not one per failed check.
- Always send a recovery message, so you know whether to keep working.
- Only text for things that need action now. A slow page at 3am can wait for an email.
- During planned maintenance, pause alerts.
Don't forget the slow failures#
Not every outage is sudden. Some of the most damaging problems creep up: a disk filling a little more each day, a certificate counting down to expiry, a backup job that quietly stopped running last month, a queue of unsent emails growing for hours. A homepage check won't catch any of these until they turn into a full outage.
Add a few daily checks that text you only when something needs attention: disk usage above 85%, a certificate expiring within 14 days, the newest backup older than 26 hours. These are easy to script, and because they warn you days ahead, you can fix them during working hours instead of at 2am.
Who gets the text?#
For a small business, it might be the owner and whoever manages the site. For a team, rotate who's on call and send to that person, with a second person if there's no acknowledgement. Keep the recipient list in one place so it's easy to update when someone goes on holiday.
Write alerts that tell you what to do#
"Site down" is less useful than "DOWN: shop.example.com/checkout returned 502 at 02:14 (3 checks)". Include what failed, how, and when. If you have a runbook, add a short link. At 2am, nobody wants to work out which of five sites the message is about.
Why SMS from a phone gateway works well for alerts#
Alerts are low-volume and high-importance, which suits a phone-based gateway. Messages go out from a real SIM on the mobile network, so they're not tied to the health of your own servers or email provider. One honest caveat applies to any hosted service: your alerting depends on that service being up too. For critical systems, keep a second channel, like the uptime service's own app notifications, as a backup.
SMS Gora sends through your Android phone with a simple REST API, so a curl command like the one above is all you need. Delivery reports show whether each alert arrived, and plans start at $3.99 a month with unlimited SMS. Set up the check, break your health endpoint on purpose once to test it, and you'll sleep better knowing your phone will tell you first.
Frequently asked questions
What's the simplest way to get a text when my website goes down?
Use an external uptime monitoring service that checks your site every minute or few minutes and can call a webhook or send SMS when checks fail. Point its webhook at an SMS API, or use its built-in SMS if it offers one.
Should the monitoring run on the same server as my site?
No. If the server goes down, so does the monitor. Run checks from somewhere else: a monitoring service, a different server or a different cloud provider.
How do I avoid getting woken up by false alarms?
Only alert after two or three consecutive failed checks, check from more than one location if possible, and send one alert per incident rather than one per failed check. Send a recovery message when it's back up.



