skip to Main Content

I have a single-page application (SPA) built with React, which is currently hosted on Netlify. I have a need to temporarily display an "Under Construction" message to visitors, essentially putting the site in a maintenance or pre-launch mode. Does Netlify specifically let you do this?

I tried looking for a feature in Netlify. I know I can do it with React but I am wondering if this feature exist or if there is a way to not avoid the code.

2

Answers


  1. Not sure Netlify offers that feature. But what you can do is create a branch under-construction for the maintenance mode feature (assuming your repository is directly linked to your Netlify account) and you can always publish the deployed branch on Netlify when you want to switch to maintenance mode

    Login or Signup to reply.
  2. I wrote up a support guide for doing exactly this – which will work regardless of whether your repo is linked to netlify or not: https://answers.netlify.com/t/support-guide-what-s-the-easiest-way-to-create-a-temporary-maintenance-page-for-my-site/338 . This allows you to pre-deploy the maintenance page to browse it as a preview and confirm it looks like you want, and then/also publish it on demand, or perhaps even automate the publishing/unpublishing of it, based on a pre-planned timetable or in reaction to something like another party’s statuspage via this API call: https://open-api.netlify.com/#tag/deploy/operation/restoreSiteDeploy

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search