Lock With Passcodes
You can lock pages of products, collections & any CMS pages with passcodes.
The passcode is a key created by the store merchant, using which customers can get access to a locked section of the website.
Step #1 - Passcode Title
For the first step for all, give the passcode a title from this respective field.

Step #2 - Select Restrict type
Select the Passcode button, and enter the passcode that you want to set.

Step #3 - Passcode Expiration Settings
You can now set expiration limits for passcodes, giving you greater control over how long a passcode remains valid. This helps improve security and ensures access is granted only for the intended time period.
How it works
When passcode expiration is enabled, the passcode will automatically stop working after the defined expiry. The passcode input field may still appear on the storefront, but the expired code will no longer be accepted.
Expiration options
1. Expire on a specific date and time
Choose an exact date and time when the passcode should expire. This is ideal for:
Limited-time access
Event-based content
Seasonal or promotional access
2. Expire after a duration
Set a time duration (for example, 2 hours, 30 minutes) after which the passcode expires automatically. This is useful for:
Temporary access
One-time or short-term usage
Controlled entry periods
Benefits
Enhances security by preventing long-term passcode reuse
Gives flexible access control based on time or date
Reduces manual management of passcodes

Step #4 - Customer Segments
The Customer Segments feature allows you to control access to restricted content based on customer login status, customer tags, or specific customer accounts.
Bypass Restrictions for Logged-in Users
Enable this option to allow all logged-in customers to bypass the restriction and access the protected content.
Example: If your store has a wholesale section, enabling this option will allow any customer who is logged into their account to view it.

Bypass Restriction by Customer Tags
Allow customers with specific Shopify customer tags to bypass the restriction and access the protected content.
Example: If you add the tags VIP, Wholesale, or Premium, customers with those tags will be able to access the restricted page, product, or collection even when restrictions are active.

Bypass Restriction by Customers
Allow specific customer accounts to bypass the restriction and access the protected content.
Example: You can select individual customers who should always have access to the restricted content, regardless of the active restriction settings.

Step #5 - Lock Products
Select the option on which you want to apply the set passcode will be applied to all products of your store.
If you want to set the passcode for specific products only instead of all products, you can easily search for the products from this search bar and apply the passcode to it.
If you want to set the passcode for majority of your store products excluding a few products, then you can search for the products from the search bar and select the is excluded checkbox.
With this selection, the set passcode will be applied to all the products except the products you have selected from the search bar.

Step #6 - Lock Collections
Select the option on which you want to apply the set passcode, which will be applied to all collections of your store.
If you want to set the passcode for specific collections only instead of all products, you can easily search for the collections from this search bar and apply the passcode to them.
If you want to set the passcode for the majority of your store products, excluding a few collections, then you can search for the collections from the search bar and select the is excluded checkbox.
With this selection, the set passcode will be applied to all the collections except the products you have selected from the search bar.

Step #7 - Lock Pages
Select the option on which you want to apply the set passcode, which will be applied to all pages of your store.
If you want to set the passcode for specific pages only instead of all products, you can easily search for the pages from this search bar and apply the passcode to them.

Step #8 - Lock Blogs
The Lock Blogs feature allows you to restrict access to specific blogs or all blogs in your store.
All Blogs: Apply restrictions to all blogs.
Selected: Apply restrictions only to selected blogs.
Is Excluded: Exclude selected blogs from the restriction, keeping them publicly accessible.
Add Blog: Search and add blogs to include or exclude from the restriction.
Example:
Restrict only selected blogs by choosing Selected and adding the desired blogs.
Restrict all blogs except a few by selecting All Blogs, enabling Is Excluded, and adding the blogs you want to keep public.

Step #9 - Lock Articles
The Lock Articles feature allows you to restrict access to specific blog articles or all articles in your store.
All Articles: Apply restrictions to all blog articles.
Selected: Apply restrictions only to selected articles.
Is Excluded: Exclude selected articles from the restriction, keeping them publicly accessible.
Add Article: Search and add articles to include or exclude from the restriction.
Example:
Restrict only selected articles by choosing Selected and adding the desired articles.
Restrict all articles except a few by selecting All Articles, enabling Is Excluded, and adding the articles you want to keep public.

Step #10 - Lock Countries
Select the option on which you want to apply the set passcode, which will be applied to all countries of your store.
If you want to set the passcode for specific countries only, instead of all products, you can easily search for the pages from this search bar and apply the passcode to them.

Step #9 - Lock Website
If you want to restrict the whole website, select the whole website restricted checkbox.
If you want to restrict specific websites, search for them from the search bar.
And, if you want to set the passcode for the majority of website excluding a few pages, then you can search for the websites from the search bar and select the is excluded checkbox.
With this selection, the set passcode will be applied to all the websites except the website URLs you have selected from the search bar.

Step #10 - Date-Based Restriction
Restrict website by date range
To restrict website access for a specific time period, enable the “Restrict Website by Date Range” option. The site will be accessible only via passcode during that period.
After that, choose the start date and end date for which you want to apply the restriction.
The selected websites will be restricted only to the specified date range and will automatically become accessible once the period ends.

Repeat restrictions on specific days
If you want to restrict website access on specific days of the week, enable the “Repeat restrictions on specific days” option.
After that, choose the days on which you want the passcode to be active, such as Monday, Wednesday, or Sunday.
The selected pages or products will be restricted only on the chosen days, giving you flexible and controlled access.


Enhanced Passcode Preview with Real-Life Scenario
We’ve improved the Passcode section by replacing the basic passcode preview with a real-life textual scenario.
Instead of showing only static passcode details, the preview now explains how the passcode behaves in real store conditions, including who can access the page, what restricted users will see, and how customer tags or segments affect access.
How it works
As you configure the passcode settings (such as restriction type, customer tags, or locked products), the preview updates instantly to reflect:
Whether a passcode is required or not
Which customers are allowed access
What message will unauthorized users see
Which products or pages are restricted
This enhancement provides better clarity and confidence when setting up passcode-based access control.

Last updated