Redirect to another domain or link, if the main one is not available

Good afternoon. Faced with a problem that stopped working hosting (database hangs) and sites on it have stopped responding. Question: is it possible to make an automatic redirection to another domain or link, if the main domain is not available? Perhaps there are other solutions to this problem.

Hi,

You won’t be able to use either Redirect Rules or Transform Rules because they are based on conditions found in the incoming requests, not in the response from the origin.

You should investigate:

  1. Load Balancing Cloudflare Load Balancing · Cloudflare Load Balancing docs
  2. Workers Examples · Cloudflare Workers docs