Error Page for When Site is Down Due to an Outage or Unknown problem

Hi, I think this question is likely something that a more experienced developer would know the answer to and is only partially applicable to Backendless. I am hoping you might be able to point me in the right direction though.

A couple weeks back we had a short outage on the US server. During that time visitors to my application saw a blank screen with an error message from the browser. It wasn’t like a 404 or something where I could change what they saw - the site was completely gone.

Is it possible to setup something (either with Backendless or perhaps my domain host) where, if a serious error / outage at that level occurs I can then load a specific page where I could provide information, including a phone number the app user should call so that they can continue their business without the app?

Thanks!
James

Hello @James_Hereford

Yes, it’s possible to set up a custom outage page on the Cloudflare CDN. This is a page that users see when your origin server is down, and Cloudflare is unable to reach it. Here’s how you can set it up:

Steps to Set Up a Custom Error Page on Cloudflare:

  1. Create the Custom Error Page:
  • Design an HTML page that you’d like your users to see when your origin server is unavailable. Keep it simple and ensure it’s under 1 MB in size since Cloudflare has limitations on the size of custom pages.
  1. Upload the Page to a Publicly Accessible Location:
  • The custom error page should be hosted on a server or storage bucket that remains accessible even when your main server is down. For example, you can use a different server or a service like Amazon S3.
  1. Log in to Cloudflare:
  • Go to the Cloudflare dashboard and select the site you want to configure.
  1. Go to the Custom Pages Section:
  • Navigate to the “Rules” section in the dashboard, and under “Custom Pages,” find the section labeled “Custom Error Pages.”
  1. Set Up the Custom Error Page:
  • You will see various error codes that you can configure, such as 500, 502, 503, and 504.
  • For each error code, you can provide the URL of your custom page. Cloudflare will use this URL to display the custom error page when the corresponding error occurs.
  1. Save and Test:
  • Save your settings and test the setup by simulating an outage (for example, temporarily taking your origin server offline) to ensure that the custom error page is displayed correctly.

Things to Keep in Mind:

  • Page Size: Ensure your custom page is less than 1 MB.
  • CORS Policy: If you’re hosting the custom page on a different server, ensure that the server has proper CORS policies to allow Cloudflare to serve the page.
  • SSL Considerations: If your site uses HTTPS, ensure that the custom page is also accessible over HTTPS.

By setting up a custom outage page, you can provide a better user experience even during server downtime, ensuring users see a friendly message instead of a generic error page.

You may also wish to review the following documentation. Cache and CDN Integration - Backendless REST API Documentation

Regards,
Inna

Thank you!