Password protection for your online store

You can restrict customer access to your online store by enabling the password page. The password page is a landing page that adds password protection to your online store. You can create a password and give it to only the customers that you want to be able to visit your store.

The password page

Add password protection to your online store

To add password protection to your online store:

  1. From your Shopify admin, go to Online Store > Preferences.

  2. Go to the Password protection area.

  3. Check Enable password.

  4. In Password, enter the password that you'll give to the customers who you want to be able to access your online store. Don't use the same password that you use to log into your admin.

  5. In Message for your visitors, enter the message that you want to show on the password page. If you don't want to show a message, then leave this field blank.

  6. Click Save.

Remove password protection from your online store

If you remove password protection, then anyone can visit your online store.

To remove password protection from your online store:

  1. From your Shopify admin, go to Online Store > Preferences.

  2. Go to the Password protection area.

  3. Uncheck Enable password.

  4. Click Save.

Edit your password page settings

You can edit the content that shows on your password page, such as the text, colors, and typography.

To edit your password page settings:

  1. Find the theme that you want to edit and click Customize.

  2. Select Password page from the top bar drop-down menu. If you don't see Password page in the menu, then you need to add password protection to your online store.

  3. To edit the sections on the password page, do the following tasks:

    1. Click Sections.
    2. Click on the section that you want to edit. Most themes have header, content, and footer sections.
    3. Make changes to the section settings.
    4. Click Save.
  4. To edit the theme settings for the password page, do the following tasks:

    1. Click Theme settings.
    2. Click on the settings category that you want to edit. Most themes have color, typography, social, and favicon settings.
    3. Make changes to the theme settings.
    4. Click Save.

The password page for your theme might include a footer section.

To hide the footer:

  1. From your Shopify admin, go to Online Store > Preferences.

  2. Go to the Password protection area.

  3. In Message for your visitors, paste the following code:

    <style>footer { display: none; }</style>
    

    You can paste this code either above or below any existing content.

  4. Click Save.

Hide your store name on your password page

The password page for your theme might show your store name.

To hide the store name:

  1. From your Shopify admin, go to Online Store > Preferences.

  2. Go to the Password protection area.

  3. In Message for your visitors, paste the following code:

    <style>h1 { display: none; }</style>
    

    You can paste this code either above or below any existing content.

  4. Click Save.

Edit the code templates for your password page

If you want to make customizations that are not available in the theme settings, then you can edit the theme code for the password page.

To edit the code templates for your password page:

  1. Find the theme you want to edit, and then click Actions > Edit code.

  2. In the Templates directory, click password.liquid.

  3. In the password.liquid template, you will see Liquid tags that include the sections that make up the password page. Your theme might include the following Liquid tags:

    {% section 'password-header' %}
    
    {% section 'password-content' %}
    
    {% section 'password-footer' %}
    
  4. To modify the content of any of the above sections, in the Sections directory, click one of the following files:

    • password-header.liquid
    • password-content.liquid
    • password-footer.liquid
  5. Edit the code to suit your needs.

  6. Click Save.

The password.liquid file in the Templates directory is included in your theme by the {{ content_for_layout }} Liquid tag, which is found in the password page layout file. To make any changes to the password page layout file, click password.liquid in the Layout directory.

To learn more about the password.liquid template, see password.liquid.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free