Let’s face it. It is kind of embarrassing when our Magento 2 or 1 site goes down with an ugly “Service Unavailable” message to your customers. Either on purpose for maintenance, or without your knowledge due to a system fault, the default “Service Unavailable” or Magento error pages are just screaming stay away from your store.
A low cost DIY aMiSTACX solution
Step 1. Leverage Cloudflare CDN’s Page Rule features.
https://www.cloudflare.com/features-page-rules/
Free accounts get three to start. Set up a forwarding URL for your domain. So when Page Rule = ON, forward to the AWS S3 static page.
Step 2. Get a Free One-Page Bootstrap Landing Page
https://startbootstrap.com/themes/landing-pages/
Step 3. Host a redirection landing page on AWS S3.
Just create a bucket, upload your static page, and set AWS S3 to hosting.
https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
Looks something like this when finished:
https://s3-us-west-2.amazonaws.com/a51.amistacx.com/index.html
Then create a CNAME like alert and map it to your AWS bucket: s3-us-west-2.amazonaws.com/a51.amistacx.com
The final URL will look like this to your customers: https://alert.example.com
Finally create a CF page rule to redirect to the full path. This is your ON/OFF switch.
Step 4. [Optional] Automate it all with A51 Health Checks and Alerts w/ Cloudflare API Page Rule Integration.
When your store goes offline for any reason, the health check will send out an SMS alert to you and/or your Team, and as an additional feature you can set a Cloudflare Page Rule to toggle ON.
The result is an automated alert and friendly maintenance page automated switch that avoids an ugly unprofessional error page. Making you look like a Pro, and building confidence with your customers.
Note: When you bring the site back online, you must manually toggle the page rule OFF so your customers will continue their experience with your site.
~ Lead Robot