Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — upordown.online

Almost every uptime monitor has a checkbox for it, and almost nobody thinks about it when setting up a check: follow redirects, yes or no.

It sounds like a detail. It decides whether your monitor notices some very real outages, and it has strong defenders on both sides. Let's argue about it.

The case for following redirects

It checks what visitors actually experience. A visitor typing example.com gets redirected to https://www.example.com/, maybe to /en/, and then sees a page. If the final page is broken, the visitor is affected, whatever the first response was. A monitor that follows redirects checks the same thing.

Redirects are normal. HTTP to HTTPS, apex to www, trailing slashes, language prefixes, login pages for authenticated areas. A monitor that treats every 301 as noteworthy will either alert constantly or get configured to accept 3xx as success, which is worse (see below).

It catches broken destinations. If example.com redirects to www.example.com and the www host is down, a monitor that stops at the first response sees a healthy 301 and stays green while the site is unreachable. This is one of the most common blind spots in basic monitoring.

The case against following redirects

A redirect can be the outage. Some of the nastiest incidents end with a 200:

  • A misconfigured deploy redirects every page to the homepage. The homepage is fine. The monitor follows the redirect, gets 200, stays green, while every product page is gone.
  • An expired domain or a hijacked DNS record redirects to a parking page or a spam site, which returns a perfectly healthy 200.
  • An authentication change redirects every request to /login, which loads nicely.
  • A CDN or WAF misconfiguration sends everyone to a challenge page.

In each case, "follow redirects and check for 200" reports success. A monitor that doesn't follow, and expects a specific status, notices the change immediately.

Redirect loops and chains hide in the follow setting. Many monitors follow up to N hops and then give up with a vague error. If the chain grows from one hop to four after a config change, a following monitor keeps passing until it hits the limit, so nobody notices the slow degradation.

It's less precise. A check is most useful when it tells you exactly which layer broke. "The final page after an unknown number of redirects returned 200" is less information than "/pricing returned 301 to / instead of 200".

Where I've landed

I don't think either checkbox is right on its own. The setting that works is "follow, but verify where you ended up":

  1. Follow redirects, and assert the final URL. If you expect https://www.example.com/pricing, the check should fail if the final URL is anything else, even with a 200. Many monitors support an expected final URL or a check on the Location chain; if yours doesn't, this is a reason to look elsewhere.
  2. Assert content, not just status. A keyword that only appears on the real page ("Add to cart", the product name, a specific heading) catches redirects to the homepage, login page or parking page, because those pages don't contain it.
  3. Add a separate no-follow check for the redirects you care about. If http://example.com must return a 301 to HTTPS, check exactly that, with redirect following off and the expected status and Location set. Then you know when the redirect itself changes.
  4. Never treat "any 3xx" as success. That configuration combines the weaknesses of both approaches.
  5. Cap the hop count low. If your normal chain is two hops, fail at four. Long chains are a bug worth hearing about.

With checks like these, a monitor such as upordown.online will tell you both when the page is down and when it has quietly started pointing somewhere else.

Not sure what your current monitor does with a redirect? upordown.online lets you choose how redirects are followed, and alerts you when the destination isn't the one you expect.

The parts I'm still unsure about

  • Login-protected pages. Should a monitor for /dashboard expect the redirect to /login (proving the auth layer works) or log in and check the dashboard (proving the app works)? Doing both doubles the checks.
  • Geo and language redirects. If visitors from different countries get redirected to different places, should every monitoring location expect a different final URL? That gets complicated fast.
  • Third-party redirects. If your "Pay" button redirects to a payment provider, should your checks follow it off your own domain?

What this looks like with curl

You can see the whole chain, and where it ends, in one command:

curl -sIL -o /dev/null -w '%{num_redirects} hops, final %{http_code} %{url_effective}\n' http://example.com/pricing 

And the no-follow version that checks one hop exactly:

curl -sI http://example.com/ | grep -iE '^(HTTP|location)' 

If the first command ever prints a final URL you didn't expect, or the hop count creeps up after a deploy, that's the moment a monitor should have told you. Writing both commands down for your key URLs is also a good way to decide what the expected values in your checks should be.

A quick test for your current setup

Pick your three most important URLs and answer two questions about each check:

  • If this page started redirecting to the homepage, would the check fail?
  • If the domain started redirecting to a page you don't own, would the check fail?

If either answer is "no" or "not sure", that's the redirect blind spot.

Related reading

So: do your checks follow redirects or not? And has a redirect ever been the outage for you, while everything stayed green?