Redirect traffic if site is offline?

I want to redirect traffic from an offline site to another url.


I have a rest api site that is:
With no routes, I return a “status” - “ok”

However, when the rest api service is not running or if the server is down, anything but 200 code, I want to redirect it to:

Is the possible with cloudflare? Thanks!

If it’s not Port 443, it might be difficult to do this. Only the following ports may be :orange: Proxied through Cloudflare unless you’re on an Enterprise Plan with Spectrum:

Yes, this is only for testing purposes. But I would just like to figure out if im able to do a fallback server, unless I use an api on top of it. Check if is online then point to it. If not, point to

Another approach would be to script this on a separate server. Do your checks, and if it fails, use the API to make a DNS change. This would be completely independent of its :orange:/:grey: proxy status.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.