Skip to content

Password page

While a store is password-protected (Storefront › Preferences), every page shows the password page: templates/password.json, drawn in layout/password.liquid when the theme has one.

sections/main-password.liquid
<div class="password">
<h1>{{ shop.name }}</h1>
{%- if shop.password_message != blank -%}<p>{{ shop.password_message }}</p>{%- endif -%}
{%- form 'storefront_password' -%}
{%- if form_error -%}<p class="form-error" role="alert">{{ form_error }}</p>{%- endif -%}
<label for="Password">{{ 'general.password_page.login_form_password_label' | t }}</label>
<input type="password" id="Password" name="password" autocomplete="current-password" required>
<button>{{ 'general.password_page.login_form_submit' | t }}</button>
{%- endform -%}
</div>
  • shop.password_message is the merchant’s message.
  • The form posts password to /password. A wrong password shows the page again with form_error set.
  • A newsletter form works on the password page too: collect emails before launch.

Search engines are asked not to index a store while it’s password-protected.

Was this page helpful?