前書き
Experience Cloud(コミュニティ)のメンテナンス時に、ログイン画面ではなくメンテナンス画面が表示されるようにする方法についてご紹介しますノ
設定手順1(Salesforce標準のメンテナンス画面)
①対象サイトのワークスペースにおいて、「管理」>「ログイン&登録」を順にクリック


②「ログインページ設定」までスクロールし、ログインページ種別を「Visualforceページ」に変更した上で”InMaintenance”を選択

③画面下部の「保存」をクリック
以上の設定を行うと、ログイン画面の代わりに下記のようなメンテナンス画面が表示されるようになります。

設定手順2(独自のメンテナンス画面)
①メンテナンス画面用のVisualforceページを作成する

サンプルコード↓
<apex:page id="CommunityInMaintenance" standardStylesheets="false" sideBar="false" showHeader="false" applyHtmlTag="true" applyBodyTag="false">
<style>
.centered{
text-align: center;
}
</style>
<div class="centered">
<h1 class="text-center">メンテナンス中です。</h1>
<p class="text-center">メンテナンス予定時間:2021/04/10の0:00~7:00</p>
</div>
</apex:page>
②コミュニティのゲストプロファイルに対して、上記Visualforceページへのアクセス権を付与する。

③ワークスペースから「管理」>「ログイン&登録」を順にクリック


④「ログインページ設定」までスクロールし、ログインページ種別を「Visualforceページ」に変更した上で、①で作成したVisualforceページを選択

⑤画面下部の「保存」をクリック
以上の設定を行うと、ログイン画面の代わりに作成したVisualforceページが表示されるようになります。
