How do I add a maintenance page for CMS 12 DXP sites?

  • Page Owner: Not Set
  • Last Reviewed: 2022-04-11

What is Optimizely's requirement for a maintenance page? How do we test maintenance pages?


Additional Posts

https://world.optimizely.com/documentation/developer-guides/digital-experience-platform/development-considerations/custom-maintenance-page/

When running Optimizely DXP, you can create a customized maintenance page, to be displayed if you have to take down the site during for example deployments.  Create an HTML page called maintenancepage.htm, and add it in the root directory of your application, to be used for deployments.

This maintenance page cannot use any other files in the environment. Resources such as CSS, Javascript, images must either be hosted somewhere else or embedded in the HTML file to be visible during maintenance.

For testing, open the static file in a browser and verify styles are working and all links work.

Chris also found that we have to copy the maintenance page on build, so add the following to your csproj:

<ItemGroup>
    <Content Include="maintenancepage.htm">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

Note that the maintenance page should be place in root of the main web project